WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#38801 new defect (bug)

Terms with the same name indistinguishable in Menu section

Reported by: eclare Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Menus Keywords: needs-patch
Focuses: ui, administration Cc:
PR Number:

Description

Problem

Let's say we have a WooCommerce site (although likely all taxonomies/terms are liable to this problem) with the following categories: Men, Women. Each of the categories has a subcategory called Shoes.

When in Appearance -> Menu and trying to add a link to Shoes (whichever), there's no way to distinguish the 2 Shoes categories, as the parents are not displayed and no indenting is applied. No matter if we use the Latest, All or Search filter.

Solution

Keep in mind that "All" uses pagination, so indenting might not be the best solution. An idea is a hover with the parents listed, but this would be tricky on mobile. Maybe just make a "Show parents" switch above the field (or in the Screen Options) and if it's checked, show the parents after the taxonomy/term's name? Like: Shoes (Women -> Shoes).

Just getting rid of pagination in the "All" view could cause problems with a lot of values and would not help the Search function within the menu creator.

Change History (6)

#1 @eclare
3 years ago

  • Type changed from defect (bug) to enhancement
  • Version trunk deleted

#2 @afercia
3 years ago

  • Focuses accessibility removed

Actually, the "All" tab shows the parent > children tree, for both default categories and custom hierarchical taxonomies (custom categories):

https://cldup.com/xK7bqwZ41a.png

https://cldup.com/1hXjNIklLx.png

They're indented with nested lists, so there's also some semantics.

About the "Most Used" and "Search" tabs, I'm not sure showing the tree would be easy, since there would be the need to check and get the ancestors tree for all the most used terms and the terms in the search results. I guess the query would be a bit complicated and very likely pretty expensive, but I'll defer to someone more expert than me in querying things :)

#3 @eclare
3 years ago

Thanks for validating this. I was a bit wrong in my assumption.

It looks like the nesting and indention is lost when in "View All" mode after page 1 of the paginated results and in search results.
I have checked that that is the case in my install. Please verify by adding a bunch of nested categories (you'd need a few dozen to trigger pagination).

The issue is still valid when having more categories than the 1st page of pagination shows. You can't distinguish between them if they have the same name, using any of the 3 available methods ("Most Used" might not have them displayed).

Please verify this. I can't verify any of it again for the Search form, as for some reason it doesn't currently work on my sites.

Last edited 3 years ago by eclare (previous) (diff)

#4 @afercia
3 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Type changed from enhancement to defect (bug)

Right, the nesting gets lost in all the following pages so after the first 50 categories is not possible to see which ones are parent and which children. Looks like something to fix :)

#5 @eclare
3 years ago

Thanks so much for your validation! :)

#6 @bellmountain
2 years ago

any updates on this?

Note: See TracTickets for help on using tickets.