deprecate / metal-clay-components

10 stars 14 forks source link

Dropdown: Feature Request Alphbetical Sorting on Dropdown/up Menus #207

Closed pat270 closed 6 years ago

pat270 commented 6 years ago

Hey Guys, I got a feature request on the Clay Repo that I think fits better here. See https://github.com/liferay/clay/issues/391.

Have the ability to order drop down menus by alphabetical order ascending or descending based on a data attribute on the element containing the dropdown-menu class. Something like aria-sortby or data-sortby="alpha-asc" (alpha-asc, alpha-desc, none)

/cc @duracell80

matuzalemsteles commented 6 years ago

@pat270 Thanks.

Hey @duracell80, You can handle this before moving your list of items to Dropdown, it's an option. I see no need to create a specific resource for this. What do you think @carloslancha?

carloslancha commented 6 years ago

Hey @matuzalemsteles @duracell80 yeah, I don't feel like dropdown should be responsible of this kind of things. Items should be already passed in the desired order.

Thx!

duracell80 commented 6 years ago

I agree there. In cases where menus are not ordered though it would help increase usability and readability for the user if there was an option to control the order of the menus in the browser. Or if that was an ability a theme developer could tack on with a DOM script.

I realize this would be a low priority.

Short menus and application menus like "Edit", "Delete", "Export" not so much an issue ... but dynamic drop downs potentially containing lots of items such as "Document Type", "Web Content Structures" or even site navigation dropdowns where a section contains a huge list of sub pages; Having the ability to target a sort at those menus would be incredibly helpful.

Particularly on DXP right now for site navigation you'd have to manually drag and drop your site navigation into alphabetical order if you needed it that way as opposed to having an option right there to turn on sort.

carloslancha commented 6 years ago

@duracell80 in any case I think this is something to discuss with UX, to review current patterns, right now Lexicon doesn't support dropdown dynamic shorting feature, it does handle it in other ways (https://lexicondesign.io/docs/patterns/dropdowns.html), like for example filtering the items through searchbox.

I'm closing the issue for now but I've talked about your concerns with the Lexicon team.

Thx!