Open Bug 1848463 Opened 2 years ago Updated 2 years ago

messenger.menus API provides no way to add items to submenus that are part of core Thunderbird

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement)

Thunderbird 115
enhancement

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: 52qtuqm9, Unassigned)

Details

I am trying to implement the ToggleReplied add-on for Thunderbird 115. The message list menu commands that this add-on creates are supposed to go in the "Mark" submenu of the message_list menu, but the messenger.menus API doesn't provide any way for my add-on to get the menu ID of the existing "Mark" menu so that my I can add children to it.

That is by design. WebExtensions should have a clear discovery path, so they cannot add themselves in other submenus, but always create a top level entry in the menu they want to add their functionality.

For the same reason, the icon of the top level menu entry cannot be changed, to make it recognizable from the icon it uses in the add-on manager (you can only change/set the icon of child entries).

Some counter-arguments...

  • My add-on doesn't have an icon, so it looks just like a regular Thunderbird menu item.
  • In fact, it has the name of a regular Thunderbird mail item, "Mark", because it's doing the exact same thing as that other menu, so that makes it even more confusing that it's a separate menu item (and makes the precautions you described even less effective).
  • Add-ons like ToggleReplied are specifically designed to overcome limitations in Thunderbird (see bug 128072). By preventing us from putting our menu entries where they belong, you're not making Thunderbird more usable, you're making it less so.

I hear what you're saying about the reasons for this. I am just feeling like maybe the benefit here outweighs the cost.

And if the goal really is "a clear discovery path", maybe add-ons should not be able to create menu entries with the same names as built-in menus.

(In reply to Jonathan Kamens from comment #2)

  • My add-on doesn't have an icon, so it looks just like a regular Thunderbird menu item.

Sounds like Thunderbird should default to a generic add-on item. Though having an icon for your add-on might be a good idea.

And if the goal really is "a clear discovery path", maybe add-ons should not be able to create menu entries with the same names as built-in menus.

The problem with that would be handling translations.

You need to log in before you can comment on or make changes to this bug.