Template Field popup "mode" and "click" rendering issues

  • 2
  • Problem
  • Updated 4 years ago
  • Solved
  • (Edited)
Hello -

Easier to see in action that try to describe in written form.  In summary, when using a custom template popup the popup opens in read mode on subsequent invocations.  Also, the template field itself becomes "single clickable" instead of requiring a double click to open the popup.

Steps to reproduce:
1) Create new page from XML below
2) Attempt to single click either the "Name - Default Popup" or "Name - Custom Popup" field.  Expected Result is encountered, single click does nothing on either field
3) Double click the "Name - Default Popup" field or click the pencil for the field
4) Dismiss the dialog with "Done" or "X"
5) Hover over the "Name - Default Popup" field and you will notice the cursor pointer.  Single click the field and the popup will appear.  Note that the popup is in edit mode.

Actual Result:
Field "edit" can be triggered via single click

Expected Result:
Field Requires double click same as on initial display

6) Dismiss the "Name - Default Popup" dialog via "Done" or "X"
7) Hover over the "Name - Custom Popup" field and you will notice cursor pointer.  Single click the field and the popup will appear.  Note that the popup is in read mode.

Actual Result:
a) Field "edit" can be triggered via single click;
b) Popup is in "read" mode

Expected Result: 
a) Field Requires double click same as on initial display
b) Popup should be in edit mode

Notes/Analysis
1) For custom popups, it appears the dialog is not being destroyed on close (dialog is destroyed on default popup) and hence not rebuilt/re-rendered on subsequent invocations
2) If the pencil edit icon is clicked in Step #7 instead, the dialog displays in edit mode as expected.  The problems described above revolve around the "single click" on the field (and the dialog not getting destroyed)
3) For the single click behavior, after the first time edit mode is invoked, click events are registered and mouse pointer set.  The challenge here is two-fold: 1) The behavior is different for the user the first time and subsequent times; and 2) if the template contains hyperlinked information (e.g. reference field), depending on where they single click, they could go to another object or trigger the edit dialog.

Suggested Solution :)
1) Destroy popup on close for custompopup or ensure components are re-rendered in edit mode on open
2) Remove the click event handler and mouse pointer on the field element so that behavior 1st time and subsequent times is consistent and to avoid confusion with other hyperlinked items in the template field.

Sample Page

<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="Account">   <models>
      <model id="Account" limit="1" query="true" createrowifnonefound="false" sobject="Account">
         <fields>
            <field id="Name"/>
            <field id="CreatedDate"/>
         </fields>
         <conditions>
            <condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
         </conditions>
         <actions/>
      </model>
   </models>
   <components>
      <basicfieldeditor showsavecancel="false" showheader="true" model="Account" mode="read">
         <columns>
            <column width="100%">
               <sections>
                  <section title="Basics" collapsible="no">
                     <fields>
                        <field id="Name"/>
                        <field type="COMBO" valuehalign="" editmodebehavior="autopopup">
                           <label>Name - Default Popup</label>
                           <template>{{Name}}</template>
                        </field>
                        <field type="COMBO" valuehalign="" editmodebehavior="custompopup">
                           <label>Name - Custom Popup</label>
                           <template>{{Name}}</template>
                           <editmodepopup title="Template Field" width="450">
                              <components>
                                 <basicfieldeditor showsavecancel="false" mode="edit" model="Account">
                                    <columns>
                                       <column width="100%">
                                          <sections>
                                             <section title="">
                                                <fields>
                                                   <field id="Name"/>
                                                </fields>
                                             </section>
                                          </sections>
                                       </column>
                                    </columns>
                                 </basicfieldeditor>
                              </components>
                           </editmodepopup>
                        </field>
                     </fields>
                  </section>
               </sections>
            </column>
         </columns>
      </basicfieldeditor>
   </components>
   <resources>
      <labels/>
      <css/>
      <javascript/>
   </resources>
</skuidpage>
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb

Posted 4 years ago

  • 2
Photo of JD Bell

JD Bell, Senior Product Engineer

  • 2,996 Points 2k badge 2x thumb
Thanks for such a detailed bug report, Barry!

I can confirm that behavior you've described. Definitely seems like a bug. We'll look into it and update you when we know more.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Agreed. Barry is awesome with his documentation. 
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Thanks Pat!  The Skuid team is awesome, just trying to reduce the load as much as possible :)
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Thanks for confirming JD.  Will keep an eye out for an update once you guys have a chance to investigate further.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Hey guys - Any updates on this one?
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,470 Points 10k badge 2x thumb
Hi Barry,

I'm going to take a look at this today.
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,470 Points 10k badge 2x thumb
This has been fixed in dev, and should make it into our next patch release.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Awesome news, thanks Ben!
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,004 Points 20k badge 2x thumb
The fix for this is now available in patch 6.8.7, available from www.skuidify.com/skuidreleases
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Tested and confirmed, thank you!