Unique label or selector for every context menu

Use case or problem

The various context menus can get quite long and bothersome, especially with plugins. Despite only having four extra buttons from plugins, the file menu is so long it oft cuts off the very bottom “delete” button on my screen. Which is an issue as that is one of the most used buttons. But as all context menus share the same label, it is really hard to remove anything with css without breaking another context menu.

Proposed solution

Give each context menu (file menu, more options, editor menu, folder menu, non-folder menu etc.) their own label, selector, or something. So you can target it specifically, without affecting all the other menus.

Current workaround (optional)

There is one plugin I know off which can remove items from the context menus and the redundant separators. But it currently appears to be broken. And the current css solution means affecting all context menus in the exact same way. Which means you have to compromise somewhere.

1 Like

I’d also like a way to target specific context menu types and their options using CSS and/or JavaScript. For the context menus, assigning a unique id or another attribute to each core menu would be helpful. As for the menu options, their id could follow the format plugin-id:option-id, where option-id is the option’s label converted to kebab-case if no explicit ID is provided. This approach should ensure compatibility with plugins that haven’t yet adopted the new convention.