[wp-trac] [WordPress Trac] #36202: Menus screen: fix persistence of toggles for displayed nav menu item properties

WordPress Trac noreply at wordpress.org
Tue Nov 1 22:29:02 UTC 2016


#36202: Menus screen: fix persistence of toggles for displayed nav menu item
properties
-------------------------------------+-----------------------------
 Reporter:  afercia                  |       Owner:  ryankienstra
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.7
Component:  Menus                    |     Version:  4.4
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:  ui, javascript
-------------------------------------+-----------------------------

Comment (by afercia):

 Sorry for the late replay. Tested [attachment:36202.diff] and seems to me
 it works just on the menus screen and just for the "Boxes" checkboxes, not
 for the "Show advanced menu properties" ones.
 On `edit.php` doesn't work as intended since, as you pointed out,
 `immediate` is set to true so on a first click the request is triggered
 immediately and any subsequent click in the following 2 seconds doesn't
 trigger a new request: nothing happens. You have to wait two seconds to
 actually trigger a new requests. The columns disappear just because the
 `hidden` CSS class gets applied but, for example, when quickly unchecking
 the columns, wait a few seconds, and then refresh the page, their state is
 not saved. Just the first one is saved.
 Preventing the form submit when clicking "Apply" is not so ideal, I think,
 since it could lead to unexpected results and mislead users. They could
 think everything is saved, while it is not.

 Overall, I think we're trying to solve with JS an issue that it's
 intrinsic to the UI. Maybe we should reconsider the reasons why the
 settings tab is using two different save methods in the same UI. I'd say
 if they work in a different way, that should be self-evident in the UI
 itself. I'd also consider to entirely remove the AJAX saving as pointed
 out by @helen in a [https://core.trac.wordpress.org/ticket/38365#comment:7
 similar case on the Customizer].

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36202#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list