Page MenuHomePhabricator

Split Menu template into more specific templates
Closed, ResolvedPublic

Description

Background

Currently the Menu template handles 4 different types of UI (dropdowns, tabs, portal and default), each with their own separate visual, functional and accessibility requirements. Splitting up the Menu template would allow for markup that is specific to a particular use case, and more easily maintainable.

Should be completed after T291304

Suggested behavior

Menu.template is broken into templates corresponding to Dropdowns, Tabs, and a default generic Menu (perhaps it could be renamed simply to "List"?). Given that "portal" menus will eventually be removed from modern Vector, there isn't a need to create a template for that.
The original markup should be preserved for Legacy vector.

Developer notes

Dropdowns should include an input checkbox element linked to a label element. Other menus don't need a label element.

Event Timeline

Jdlrobson subscribed.

Funny enough when we began this project they were the same templates.

I think the challenge of splitting them if we'd have to keep consistency between the classes that are shared between them (in Vue this would use some kind of composition)