Page MenuHomePhabricator

Allow creation of nested menus
Closed, DuplicatePublic


OOjs-UI menus should have a way to define nested menus, to contain a big number of tools that shouldn't be visible all at once.

Use case:
For WikiEditor I had a script that can add buttons to the toolbar to insert templates for links to sister projects of Wikipedia. This script adds a dropdown with 9 entries to WikiEditor's toolbar. It has some more options, allowing users to add even more tools. Even adding 60 different tools is possible and doesn't make the toolbar unusable.
In VisualEditor anything similar is currently more or less impossible. Of course I can add tools to the toolbar, but "Insert" already has 12 entries when uncollapsed, adding 9 more would make this menu very hard to use.
A nested menu, that would show "Sister projects" in the "Insert" menu, and only show these 9 tools once the user selects that item would help a lot.