Conditionally Rendered Wizard Buttons Not Being Fully Removed when conditionally rendered out

  • 1
  • Problem
  • Updated 3 years ago
When buttons in a wizard have conditionally rendering applied, after the button has shown at least one time, it is never fully removed when its condition evaluates to false.

There is a small piece of the button image still visible, it's clickable and the button responds to hotkeys when it has been conditionally rendered out.

Steps to reproduce:
1) Create page using XML below
2) preview page picking an account

Expected = Actual
"Not Option 1 (Ctrl+Shift+M)" shows, "Option 1 (Ctrl+Shift+L)" does not show and there is no button fragment showing nor does it respond to hotkeys

3) Change Mode to "Option 1"
4) Press Ctrl+Shift+M

Expected
"Not Option 1" is completely hidden/removed and does not respond to hotkey

Actual
There is a button fragment visible, the fragment is clickable and hotkey is fired



5) Change Mode to "None"
6) Press Ctrl+Shift+L

Expected
"Option 1"  is completely hidden/removed and does not respond to hotkey

Actual
There is a button fragment visible, the fragment is clickable and hotkey is fired



Sample Page XML

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account">   <models>
      <model id="Account" limit="1" query="true" createrowifnonefound="false" sobject="Account" adapter="" type="">
         <fields>
            <field id="Name"/>
            <field id="CreatedDate"/>
            <field id="Mode" uionly="true" displaytype="PICKLIST" label="Mode">
               <picklistentries>
                  <entry value="one" label="Option 1"/>
                  <entry value="two" label="Option 2"/>
               </picklistentries>
            </field>
         </fields>
         <conditions>
            <condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
         </conditions>
         <actions/>
      </model>
   </models>
   <components>
      <wizard deferstepcontentsrendering="false" uniqueid="sk-NJUyL-429">
         <steps>
            <step stepid="step1" steplabel="Step 1">
               <components>
                  <basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="Account" buttonposition="" uniqueid="sk-NJiRA-465" mode="edit">
                     <columns>
                        <column width="100%">
                           <sections>
                              <section title="Section A">
                                 <fields>
                                    <field id="Mode" valuehalign="" type=""/>
                                 </fields>
                              </section>
                           </sections>
                        </column>
                     </columns>
                  </basicfieldeditor>
               </components>
               <actions>
                  <action type="multi" label="Not Option 1 (Ctrl+Shift+M)" stepid="step1" window="self" icon="sk-icon-cancel">
                     <actions>
                        <action type="blockUI" message="Not Option 1 (Ctrl+M)" timeout="2000"/>
                     </actions>
                     <hotkeys>
                        <hotkey modifiers="ctrl,shift" key="m"/>
                     </hotkeys>
                     <renderconditions logictype="and">
                        <rendercondition type="fieldvalue" enclosevalueinquotes="true" fieldmodel="Account" sourcetype="fieldvalue" nosourcerowbehavior="skipandnorender" sourceproperty="data.length" operator="!=" value="one" field="Mode"/>
                     </renderconditions>
                     <enableconditions/>
                  </action>
                  <action type="multi" label="Option 1 (Ctrl+Shift+L)" stepid="step1" window="self" icon="sk-icon-add">
                     <actions>
                        <action type="blockUI" message="Option 1 (Ctrl+Shift+L)" timeout="2000"/>
                     </actions>
                     <renderconditions logictype="and">
                        <rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="Account" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="Mode" value="one"/>
                     </renderconditions>
                     <enableconditions/>
                     <hotkeys>
                        <hotkey modifiers="ctrl,shift" key="l"/>
                     </hotkeys>
                  </action>
               </actions>
            </step>
         </steps>
      </wizard>
   </components>
   <resources>
      <labels/>
      <css/>
      <javascript/>
   </resources>
   <styles>
      <styleitem type="background" bgtype="none"/>
   </styles>
</skuidpage>
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Skuid Team - Any input on this?
Photo of David Giger

David Giger

  • 1,758 Points 1k badge 2x thumb
Hi Barry

I once faced the same issue as you do and after trying for about 8 hours to find a proper workaround for the problem, I gave it up.
I figured out a hacky workaround never the less: I hid the buttons completely using CSS (assign/remove the class conditionally using a snippet in model actions).
The only difference was that there were no hotkeys for the user, which made my solution passable. I don't think that this will work for you, but you could give it a try. Give me a shout if you need some sample snippets :)

Looks like it's a skuid bug never the less :(

Cheers
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Thanks David, appreciate the insight and offer to help!  Yes, I've managed a very hacky workaround with limited success but as you mention, definitely a skuid bug that should be addressed.
(Edited)
Photo of David Giger

David Giger

  • 1,758 Points 1k badge 2x thumb
Always glad to help :)

Do you know if it got acknowledged by the team?
(Edited)
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
As far as I know, this has not been officially acknowledged yet.

Skuid Team?
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Just tested this with Skuid 8.8 and it appears to have been resolved in a recent build.

Skuid Team - Can you confirm that this has been resolved and if so, in which build it was fixed?
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
I believe this got fixed in conjunction with SKUID-1897. Mentioned in the newly added technical release notes on skuid.com/releases.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Thanks Ben!