Opened 8 years ago
Closed 8 years ago
#38499 closed defect (bug) (fixed)
Customize: newly-added pages should show that they were added to the menu
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Customize | Keywords: | has-screenshots good-first-bug has-patch commit |
Focuses: | ui, javascript | Cc: |
Description
When adding new pages in menus, the pages should show as "checked" or added within the available nav menu items panel.
Attachments (3)
Change History (12)
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
8 years ago
#2
@
8 years ago
- Focuses javascript added
- Keywords good-first-bug added
We need to add the item-added
class the the menu item handle in the newly-added item's template in the available nav menu items panel. Should be a one-line addition to customize-nav-menus.js
.
#3
@
8 years ago
Working On A Patch
Hi @celloexpressions,
If it's alright, I'm working on this now. I'll have a patch ready soon.
#5
@
8 years ago
Request For Review
Hi @celloexpressions,
Could you please review the attached patch, or the identical GitHub pull request?
This passes the available-menu-item template a value of true
for is_new_item. The template will then output the class item-added
, as you suggested.
Background:
Adding a new page to a menu in the Customizer uses the template available-menu-item. Existing pages also use this template, so this can't simply output the class for all of them.
#7
@
8 years ago
An Approach With Only JavaScript
Hi @celloexpressions,
Thanks for reviewing this PR. Is this patch what you had in mind in your comment?
#8
@
8 years ago
- Keywords commit added
- Owner set to westonruter
- Status changed from new to reviewing
Thanks @ryankienstra, alt-38499.diff looks ready for commit. It's a bit simpler with that approach I think.
Currently, the new items are added to the menu and the top of the available items list, but not shown as checked.