Closed Bug 1798896 Opened 2 years ago Closed 2 years ago

Migrate extension widgets in the palette and overflow menu to the ADDONS area, and add rules to prevent them from going back

Categories

(Firefox :: Toolbars and Customization, task, P1)

task

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

(Blocks 1 open bug)

Details

(Whiteboard: [addons-jira])

Attachments

(5 files)

Once we introduce the ADDONS area, with the Unified Extensions UI enabled, the spec calls for extension widgets to only be able to exist in either toolbars or the ADDONS area. We want to prevent them from existing or being moved to the palette or the overflow menu.

This will involve adding some logic at the beginning of CUI initialization that:

  1. Identifies any extension widgets in the palette and moves them to the bottom of the ADDONS area
  2. Takes any extension widgets in the overflow panel and moves them to the top of the ADDONS area in the same order.
  3. Adds rules to canWidgetMoveToArea which prevents the extension widgets from going to the palette or the overflow menu.
  4. Adds tests for the above.

Bonus:
5. In the event that the Unified Extension pref is turned off again, we should move all extension budgets from the ADDONS area into the overflow panel. Yes, that'll include the items that had been in the palette. This isn't a usecase that we're going to support in the long run, but what we don't want to happen is that we're backed into a corner where disabling the Unified Extensions UI in an emergency situation during rollout results in people losing their addon buttons. This will need testing as well.

In terms of timing for this work, I'd definitely like to aim it for the very beginning of the 109 cycle. My goal is to have this work written, reviewed and rigorously tested before it lands on the first day of the 109 cycle.

Severity: -- → N/A
Priority: -- → P1

Another thing to test is the "reset" behaviour. When resetting, all browser action buttons should move to the addons panel.

This isn't a migration just yet. I'm following the same technique that we seemed to follow
when we first introduced the original overflow menu (see bug 1354117) - I'm going to add
a function to do the migration here, with a mechanism for (somewhat) reversing the
migration if the preference gets flipped back to false at some point.

There is no expectation that this preference will be flipped back to false - it's more of
a safety mechanism. Once we're confident that the routine in the function properly moves
items to right places, we can convert it to a proper migration so that it only runs
once on startup for folks who upgrade.

Depends on D161721

Attachment #9302947 - Attachment description: Bug 1798896 - Test Unified Extension upgrade and downgrade behavior. r?Gijs! → WIP: Bug 1798896 - Test Unified Extension upgrade and downgrade behavior. r?Gijs!
Attachment #9302948 - Attachment description: Bug 1798896 - Test Unified Extension behaviours for CustomizableUI.jsm. r?Gijs! → WIP: Bug 1798896 - Test Unified Extension behaviours for CustomizableUI.jsm. r?Gijs!
Attachment #9302947 - Attachment description: WIP: Bug 1798896 - Test Unified Extension upgrade and downgrade behavior. r?Gijs! → Bug 1798896 - Test Unified Extension upgrade and downgrade behavior. r?Gijs!
Attachment #9302948 - Attachment description: WIP: Bug 1798896 - Test Unified Extension behaviours for CustomizableUI.jsm. r?Gijs! → Bug 1798896 - Test Unified Extension behaviours for CustomizableUI.jsm. r?Gijs!
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/372c43168f40
Move extension buttons to the addons panel if Unified Extensions is enabled on startup. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/7be99ada0759
Prevent extension buttons from moving to the palette or overflow panel if Unified Extensions is enabled. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/d7031981a11d
Update WebExtension tests to account for browser actions being locked out of the overflow menu. r=willdurand,extension-reviewers
https://hg.mozilla.org/integration/autoland/rev/7ce899ab5fd5
Test Unified Extension upgrade and downgrade behavior. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/765bd4c601ff
Test Unified Extension behaviours for CustomizableUI.jsm. r=Gijs
Regressions: 1801097
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: