Add "emphasized" to menu item options #3225
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is another idea that came about while trying to figure out how to handle #3199, but has utility outside that application so I'm making it a separate PR.
This proposes adding an "emphasized" property to menu items. If true, the menu item has a red "badge" next to it. Menu open buttons can also look to see if they have emphasized items and add a badge as well. This PR adds that support for the top-level menus and track menus:
This is what the menu items themselves look like:
If a submenu contains an emphasized item, it also has a badge. Also note, the menu itself has no logic for removing the emphasis when e.g. the menu item is clicked on, that will have to be handled by whatever adds the menu item.
It could also be called "alerted" or "badged" (since it uses the Badge component) instead of "emphasized."
One use case I see for this is that when a plugin is added, any new menus or menu items it adds could be emphasized, to help users know where to look for those new actions.