Bug 1938392 - Add integratedSidebar pref to Nimbus. r=shopping-reviewers,firefox-desktop-core-reviewers ,sidebar-reviewers,mossop,Gijs,rking

Adds the integratedSidebar pref to the `shopping2023` Nimbus feature and separates the enabling prefs for the migrated Review Checker in the main sidebar and the Shopping sidebar.

- Updates `browser.shopping.experience2023.integratedSidebar` to be the only enabling pref for the migrated Review Checker sidebar.
- Prevents `browser.shopping.experience2023.enabled` from disabling the migrate sidebar and uses it as the pref for the ShoppingSidebar actors.
- Removes the `browser.shopping.experience2023.shoppingSidebar` pref as it is no longer needed.
- Updates any tests the used these prefs to the new use.
- Init's the two sidebar differently in `ShoppingUtils` based on the Nimbus prefs.
- Unset the `SidebarController._state.command` when a sidebar tool pref sets it to `visible=false` otherwise it will try to re-open when the sidebar is opened again.

Differential Revision: https://phabricator.services.mozilla.com/D242053
This commit is contained in:
Fred Chasen
2025-03-27 00:05:15 +00:00
parent 7e4cb3f680
commit 8fa2242721
17 changed files with 55 additions and 90 deletions

View File

@@ -47,8 +47,12 @@ var SidebarController = {
let switcherMenuitem;
const updateMenus = visible => {
// Hide the sidebar if it is open and should not be visible.
if (!visible && this.isOpen && this.currentID == commandID) {
// Hide the sidebar if it is open and should not be visible,
// and unset the current command and lastOpenedId so they do not
// re-open the next time the sidebar does.
if (!visible && this._state.command == commandID) {
this._state.command = "";
this.lastOpenedId = null;
this.hide();
}