Closed Bug 1705867 Opened 4 years ago Closed 2 years ago

Add type option to action buttons to add support for menu buttons

Categories

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

Thunderbird 89
enhancement

Tracking

(thunderbird115? fixed)

RESOLVED FIXED
116 Branch
Tracking Status
thunderbird115 ? fixed

People

(Reporter: john, Assigned: john)

References

Details

Attachments

(5 files)

To make action buttons more useful, add a type option to the manifest. Per default this is "button", but can be set to "menu" or "menubutton". This cannot be changed after the button has been created.

For "menu" and "menubutton" the action button will have drop-down-selector which opens a menu, which is accessible from the menus API via the *_action_menu context.

If "menu" is selected, the onClicked event is disabled and a click on the button will open the menu. This also means no popup support for this type.

yes, that sounds very useful

Assignee: nobody → john
Status: NEW → ASSIGNED

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/6730027e6753
Add type option to action buttons to add support for menu buttons. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

Sorry, I pulled this out. The test is broken on all platforms, and times out for a different reason on macOS.

Back out:
https://hg.mozilla.org/comm-central/rev/41797fb66229aec9494966f0eec75e3c8e7425a7

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Re-worked this for the "menu" option and adapted it for changes to the unified toolbar. When the "menu-button" option is officially supported by the unified toolbar, we are going to add that option here as well.

Attachment #9217504 - Attachment description: Bug 1705867 - Add type option to action buttons to add support for menu buttons. r=darktrojan → Bug 1705867 - Support "menu-button" type for action buttons. r=darktrojan
Attachment #9338580 - Attachment description: Bug 1705867 - Add support for 'menu' typed action buttons. r=darktrojan,aleca → Bug 1705867 - Add support the 'menu' typed action buttons. r=darktrojan,aleca
Attachment #9338580 - Attachment description: Bug 1705867 - Add support the 'menu' typed action buttons. r=darktrojan,aleca → Bug 1705867 - Add support for the 'menu' typed action buttons. r=darktrojan,aleca
Attachment #9338580 - Attachment description: Bug 1705867 - Add support for the 'menu' typed action buttons. r=darktrojan,aleca → Bug 1705867 - Add support the 'menu' typed action buttons. r=darktrojan,aleca
Target Milestone: 90 Branch → 116 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/3144c38dd2b5
Add support the 'menu' typed action buttons. r=darktrojan,freaktechnik

Status: REOPENED → RESOLVED
Closed: 4 years ago2 years ago
Resolution: --- → FIXED

Comment on attachment 9338580 [details]
Bug 1705867 - Add support the 'menu' typed action buttons. r=darktrojan,aleca

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
Missing the helpful option for add-on developers to replace multiple legacy toolbar buttons into a single menu based action button in the new unified toolbar will make it more difficult for developers to get their add-on ready for 115.

Testing completed (on c-c, etc.):
Just landed, but tested thoroughly.

Risk to taking this patch (and alternatives if risky):
None that I am aware of.

Attachment #9338580 - Flags: approval-comm-beta?

Comment on attachment 9338580 [details]
Bug 1705867 - Add support the 'menu' typed action buttons. r=darktrojan,aleca

[Triage Comment]
Approved for beta

Attachment #9338580 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9340154 [details]
Bug 1705867 - Fix wrong menu entries of menu typed action buttons if multiple extensions and multiple entries are used. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
During development of this feature, I simply did not test it with multiple extensions being installed and each extension adding multiple entries. It turned out to be badly broken (duplication of entries and added to the wrong buttons). Without this fix, the feature is broken and not useable. I will add dedicated tests for this after my PTO.

Testing completed (on c-c, etc.):
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=c94dedfd4248cbde943f667775ce2066d396d125

Risk to taking this patch (and alternatives if risky):
Try run looks good.

Attachment #9340154 - Flags: approval-comm-beta?

Comment on attachment 9340154 [details]
Bug 1705867 - Fix wrong menu entries of menu typed action buttons if multiple extensions and multiple entries are used. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

But we should test the beta. Does this only affect add-ons that attempt to use the new feature?

Flags: needinfo?(john)
Attachment #9340154 - Flags: approval-comm-beta? → approval-comm-beta+

Yes it only affects add-ons which use the new feature. Adding two test extensions. Install both to see the breakage without the fix.

Flags: needinfo?(john)
Attached file menu.zip
Attached file menu_other.zip
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Pushed by elizabeth@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/3a11b65072b5
Fix wrong menu entries of menu typed action buttons if multiple extensions and multiple entries are used. r=mkmelin

Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: