Disabling revamp means that we also set expanded to false. However, since revamp is disabled, these changes are not reflected back to sidebar-main, resulting in a weird mismatch between SidebarState and what the launcher sees.
This was partially fixed by the lines in initializeState(), which updates the tab container, but not the launcher. This generalizes the solution to ensure that *all* components are kept up to date.
Differential Revision: https://phabricator.services.mozilla.com/D236240
- disable expand behaviour for horizontal tabs mode
- remove expand/collapse option from customize panel when horizontal mode (follow up bug to land immediately after - bug 1939917)
- default horizontal mode to show/hide with the launcher visible initially
- default vertical mode to expand/collapse
- remove auto collapsing behviour when expanded and opening a panel
Differential Revision: https://phabricator.services.mozilla.com/D234592
- disable expand behaviour for horizontal tabs mode
- remove expand/collapse option from customize panel when horizontal mode (follow up bug to land immediately after - bug 1939917)
- default horizontal mode to show/hide with the launcher visible initially
- default vertical mode to expand/collapse
- remove auto collapsing behviour when expanded and opening a panel
Differential Revision: https://phabricator.services.mozilla.com/D234592
- disable expand behaviour for horizontal tabs mode
- remove expand/collapse option from customize panel when horizontal mode (follow up bug to land immediately after - bug 1939917)
- default horizontal mode to show/hide with the launcher visible initially
- default vertical mode to expand/collapse
- remove auto collapsing behviour when expanded and opening a panel
Differential Revision: https://phabricator.services.mozilla.com/D234592
- disable expand behaviour for horizontal tabs mode
- remove expand/collapse option from customize panel when horizontal mode (follow up bug to land immediately after - bug 1939917)
- default horizontal mode to show/hide with the launcher visible initially
- default vertical mode to expand/collapse
- remove auto collapsing behviour when expanded and opening a panel
Differential Revision: https://phabricator.services.mozilla.com/D234592
- Move resize observer (setting max width) logic over to SidebarState.
- Add `command` property to SidebarState.
- Handle receiving legacy session restore data.
- Add unit tests along with mocking structures to get a better idea of state/controller coupling (which we should ultimately reduce).
Differential Revision: https://phabricator.services.mozilla.com/D232730
Any menu items that were added after `viewCustomizeSidebar` in `this.sidebars`, such as extensions, were previous ignored in `selectMenuItem` thus resulting in an incorrect checked state in the menu.
Differential Revision: https://phabricator.services.mozilla.com/D232648
- Ensure that init() does not clear existing state.
- Keep tab container's "expanded" attribute up to date, as that controls the tab styling.
Differential Revision: https://phabricator.services.mozilla.com/D232259
*Update SidebarState logic so that opening and closing panels reverts to the correct launcher visibility for the show and hide setting
*Add a test
Differential Revision: https://phabricator.services.mozilla.com/D231838
- Adds a remote content browser to contain `about:shoppingsidebar` in `review-checker.xhtml` and update the Review Checker sidebar to use that wrapper document.
- Adds ReviewChecker actors for the sidebar Review Checker panel.
- ReviewCheckerParent is a simplified version of the ShoppingSidebarParent as it does not need to handle the state of the sidebar opening or closing.
- ReviewCheckerChild is just extends ShoppingSidebarChild for now, though it will need to be separate in the future.
- Adds a browser.shopping.experience2023.shoppingSidebar boolean pref to disable ShoppingSidebar actors when they are not needed.
- Fixes `AbortError` error handling when the outer sidebar browser is removed.
Note that any auto-opening or closing behavior will need to be added afterwards, as these actors are not around to check product urls when the sidebar is closed.
Differential Revision: https://phabricator.services.mozilla.com/D222840
- Created a SidebarState API to manage reactive properties for the controller.
- Replaced usages of sidebarMain.hidden with state.launcherVisible.
- Replaced usages of sidebarMain.expanded with state.launcherExpanded.
- Removed toggleExpanded() and toggleHide(), replaced with equivalent state toggles.
Differential Revision: https://phabricator.services.mozilla.com/D229558
- Add a splitter that can be used to resize the launcher by dragging.
- Add "snapping points" to allow dragging to expand or collapse the launcher.
- Total sidebar width (launcher + panel) cannot exceed 75vw.
- Styling updates to show ellipses if labels are cut off due to resizing.
Differential Revision: https://phabricator.services.mozilla.com/D228705
- Add a splitter that can be used to resize the launcher by dragging.
- Add "snapping points" to allow dragging to expand or collapse the launcher.
- Total sidebar width (launcher + panel) cannot exceed 75vw.
- Styling updates to show ellipses if labels are cut off due to resizing.
Differential Revision: https://phabricator.services.mozilla.com/D228705
* Adds a `remoteType` attribute to the config when registering a sidebar to opt-in to using a remote content process when displaying that sidebar panel.
* Moves loading URLs into a `SidebarController._loadUrl` method, which can be passed a remoteType if the sidebar contents should be displayed in a remote content process. If needed it will replace the sidebar browser element with a remote or non-remote browser to match the remoteType passed.
* Adds browser load listeners methods, a `SidebarController._hasLoaded` promise for non-remote loading and a `SidebarController._hasProgressStopped` promise if the browser is remote.
* Adds a setter for `SidebarController.browser`.
* Adds a `shopping-sidebar` message manager group to avoid actor conflict.
Differential Revision: https://phabricator.services.mozilla.com/D223961
* Adds a `remoteType` attribute to the config when registering a sidebar to opt-in to using a remote content process when displaying that sidebar panel.
* Moves loading URLs into a `SidebarController._loadUrl` method, which can be passed a remoteType if the sidebar contents should be displayed in a remote content process. If needed it will replace the sidebar browser element with a remote or non-remote browser to match the remoteType passed.
* Adds browser load listeners methods, a `SidebarController._hasLoaded` promise for non-remote loading and a `SidebarController._hasProgressStopped` promise if the browser is remote.
* Adds a setter for `SidebarController.browser`.
* Adds a `shopping-sidebar` message manager group to avoid actor conflict.
Differential Revision: https://phabricator.services.mozilla.com/D223961
- Add a splitter that can be used to resize the launcher by dragging.
- Add "snapping points" to allow dragging to expand or collapse the launcher.
- Total sidebar width (launcher + panel) cannot exceed 75vw.
- Styling updates to show ellipses if labels are cut off due to resizing.
Differential Revision: https://phabricator.services.mozilla.com/D228705