[wp-trac] [WordPress Trac] #18271: Item hierarchy should be maintained when adding to menu
WordPress Trac
noreply at wordpress.org
Tue Sep 30 02:49:55 UTC 2014
#18271: Item hierarchy should be maintained when adding to menu
-----------------------------------+---------------------------------
Reporter: JohnONolan | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.1
Component: Menus | Version: 3.2.1
Severity: minor | Resolution:
Keywords: has-patch 2nd-opinion | Focuses: ui, administration
-----------------------------------+---------------------------------
Comment (by celloexpressions):
Might be worth noting that this may not make sense UX-wise in various
scenarios. For the Menu Customizer project, I've also currently removed
the checkboxes entirely in favor of adding directly on click of the item.
If you add a sub-item but not the parent, should it be added as a top-
level item or as a child of something else? If you add a sub-item and its
parent is in the menu somewhere, should the new item be added as a child
of that parent, regardless of its position in the menu? If you add a
parent item, should children automatically be added with it?
In terms of the horrific scaling problems menus have right now, I'd be
very hesitant to add an additional field to all menu items to accomplish
this (`menu-item-parent-object-id`), that will make #14134 worse.
I think the best option might be to try to flag something from the JS when
the item is being added, to set the parent Id when it's first added, then
add it to the appropriate part of the menu instead of the bottom one the
ajax call comes back. But given the way that's structured right now, I'm
not sure something like that would be feasible. I'd also be interested in
a better/completely re-thought approach to all of this in the Menu
Customizer feature-plugin, if anyone's interested in helping there.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/18271#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list