Closed Bug 2066086 Opened 2 months ago Closed 1 month ago

Selecting 'Hide tabs and sidebar' and closing the menu causes the collapsed sidebar to show

Categories

(Firefox :: Sidebar, defect, P2)

defect
Points:
5

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: pannett, Assigned: sclements)

References

Details

(Whiteboard: [fidefe-sidebar])

Attachments

(1 external file)

Steps to reproduce:

  1. Enable vertical tabs
  2. Select the settings gear in the sidebar
  3. Select 'Hide tabs and sidebar'
  4. The vertical tabs immediately hide, as expected
  5. Close the sidebar

Expected:
6. Tab strip should remain closed
7. I can open it using the 'show sidebar' button in the toolbar

Actual:
6. Tab strip wrongly opens in its narrow state
7. Clicking the 'show sidebar' button in the toolbar closes it, and a second click opens the tab strip in its wide state

The severity field is not set for this bug.
:sfoster, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(sfoster)

Thanks for filing. Yeah we've had a few similar reports e.g. bug 2070375 and something clearly broke recently in how we manage sidebar state.

Severity: -- → S3
Flags: needinfo?(sfoster)
Priority: -- → P2
See Also: → 2070375
Whiteboard: [fidefe-sidebar]
Duplicate of this bug: 2070375
Assignee: nobody → sclements
Status: NEW → ASSIGNED
  • Refactor sidebar visibility and sidebar state logic, removing multiple properties in browser-sidebar and sidebarState that handle launcher visibility
  • Update test coverage, particularly for hide-sidebar setting

What I think is happening with this bug, which impacts both "hide-sidebar" and "hide-on-close" settings, is that when you're on another sidebar setting initially, opening the settings panel will call show in browser-sidebar, but at that point the we assign _launcherStateAtOpen the value of this._state.launcherVisible which actually points to the previous visiblity settings value here.
And if you close a panel via the close button, hide is called - and dismissPanel called every time except with the hide-launcher setting here. Since this._state.launcherVisible = this._launcherStateAtOpen is assigned in that block it will assign the wrong value and it continues to be wrong every time we open a panel because there's a conflict in how this.launcherVisible is being set.

We also have a new launcherHiddenWithPanel which was added in bug 2047653 which is only being used for the new hide-launcher setting and that is intersecting with _launcherStateAtOpen and determining whether sidebarVisibility is reset in the panelOpen setter. It is essentially showing the launcher when a panel is opened for every sidebar visiblity setting except "hide-launcher" here which is not what we want.

Since the logic handling sidebar panel and launcher visibility has gotten more complex with the evolution of certain visibility behaviors (with bug 2007183) and the addition of a new one setting, "hide-launcher" in bug 2047653 I propose a refactor to simplify how different properties are set.

Attachment #9645803 - Attachment description: WIP: Bug 2066086 - Fix hide tabs and sidebar logic and refactor sidebar state logic r=sfoster,kcochrane → Bug 2066086 - Fix hide tabs and sidebar logic and refactor sidebar state logic r=sfoster,jsudiaman
Points: --- → 3
Points: 3 → 5
Pushed by sclements@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/101266817b77 https://hg.mozilla.org/integration/autoland/rev/0a2f2d7185a7 Fix hide tabs and sidebar logic and refactor sidebar state logic r=sfoster,jsudiaman,sidebar-reviewers,nsharpley,sessionstore-reviewers,kcochrane
See Also: 2070375 →
Depends on: 2007183
See Also: → 2067960
See Also: → 2068002
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e53e56b9677a https://hg.mozilla.org/integration/autoland/rev/e2e23db0785a Revert "Bug 2066086 - Fix hide tabs and sidebar logic and refactor sidebar state logic r=sfoster,jsudiaman,sidebar-reviewers,nsharpley,sessionstore-reviewers,kcochrane" for causing failures at browser_ext_sidebarAction.js.
Flags: needinfo?(sclements)
Pushed by sclements@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0896f9cd23e0 https://hg.mozilla.org/integration/autoland/rev/76a26ecfc701 Fix hide tabs and sidebar logic and refactor sidebar state logic r=sfoster,jsudiaman,sidebar-reviewers,nsharpley,sessionstore-reviewers,kcochrane,extension-reviewers,rpl
Pushed by pstanciu@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4bd4ba1850d9 https://hg.mozilla.org/integration/autoland/rev/1cddf1f4902c Revert "Bug 2066086 - Fix hide tabs and sidebar logic and refactor sidebar state logic r=sfoster,jsudiaman,sidebar-reviewers,nsharpley,sessionstore-reviewers,kcochrane,extension-reviewers,rpl" for causing bc failures @ browser_remove_sidebar_button_and_sidebar.js

Backed out for causing bc failures @ browser_remove_sidebar_button_and_sidebar.js

Flags: needinfo?(sclements)
Pushed by sclements@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6b4126508e0f https://hg.mozilla.org/integration/autoland/rev/140841e7b366 Fix hide tabs and sidebar logic and refactor sidebar state logic r=sfoster,jsudiaman,sidebar-reviewers,nsharpley,sessionstore-reviewers,kcochrane,extension-reviewers,rpl
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c7b9d683393e https://hg.mozilla.org/integration/autoland/rev/13c81ddd9c41 Revert "Bug 2066086 - Fix hide tabs and sidebar logic and refactor sidebar state logic r=sfoster,jsudiaman,sidebar-reviewers,nsharpley,sessionstore-reviewers,kcochrane,extension-reviewers,rpl" for causing failures at browser_extensions_sidebar.js.
Pushed by rperta@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f384c89fc98f https://hg.mozilla.org/mozilla-central/rev/9f64bb532283 Revert "Bug 2066086 - Fix hide tabs and sidebar logic and refactor sidebar state logic r=sfoster,jsudiaman,sidebar-reviewers,nsharpley,sessionstore-reviewers,kcochrane,extension-reviewers,rpl" for causing failures at browser_extensions_sidebar.js.
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 159 Branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 159 Branch → ---
Flags: needinfo?(sclements)
Pushed by sclements@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6c3ca0366e25 https://hg.mozilla.org/integration/autoland/rev/0208767baff6 Fix hide tabs and sidebar logic and refactor sidebar state logic r=sfoster,jsudiaman,sidebar-reviewers,nsharpley,sessionstore-reviewers,kcochrane,extension-reviewers,rpl
Regressions: 2082617
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/34c1fb9c0b0b https://hg.mozilla.org/integration/autoland/rev/95b3b9f047b9 Revert "Bug 2066086 - Fix hide tabs and sidebar logic and refactor sidebar state logic r=sfoster,jsudiaman,sidebar-reviewers,nsharpley,sessionstore-reviewers,kcochrane,extension-reviewers,rpl" for causing mochitests failures in browser_opentabs_sidebar.js.

Reverted this because it was causing mochitests failures in browser_opentabs_sidebar.js.

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/components/sidebar/tests/browser/browser_opentabs_sidebar.js | test_opentabs_lists_current_window_tabs - Open tabs panel is shown. - false == true

Sigh, I did not see this failure on the latest try push or locally.

Pushed by sclements@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/51dae1931a6e https://hg.mozilla.org/integration/autoland/rev/b0886792a0eb Fix hide tabs and sidebar logic and refactor sidebar state logic r=sfoster,jsudiaman,sidebar-reviewers,nsharpley,sessionstore-reviewers,kcochrane,extension-reviewers,rpl
Status: REOPENED → RESOLVED
Closed: 1 month ago → 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
QA Whiteboard: [qa-triage-done-c161/b160]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: