Closed Bug 1954056 Opened 1 year ago Closed 1 year ago

Closing a panel with "X" also hides the launcher (and vertical tabs in show/hide mode).

Categories

(Firefox :: Sidebar, defect, P1)

defect

Tracking

()

VERIFIED FIXED
138 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox136 --- unaffected
firefox137 --- unaffected
firefox138 --- verified

People

(Reporter: muffinresearch, Assigned: sfoster)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [fidefe-sidebar])

Attachments

(1 external file)

STR:

  • Using Nightly 138.0a1 (2025-03-13) (aarch64)
  • With sidebar.revamp set to true.
  • Open a panel e.g. History.

What happens

  • Clicking the "X" to close it also hides the launcher (and vertical tabs in show/hide mode if enabled).
  • Showing the sidebar also shows the panel again.

What should happen

  • I'd expect just the panel to close.
  • I think this might also be impacting state because there's now no way to stop the panel always being opened.
  • Expand collapse of vertical tabs seems to be unaffected.

Running mozregression found:

Bug 1921536 - Make the SidebarState the source of truth for the current sidebar command/panel and re-open previous panel when toggling the sidebar open. r=sidebar-reviewers,jsudiaman

  • We retain the behavior from legacy sidebar which re-opens the previously open sidebar panel when the sidebar is toggled open
  • Rename SidebarState's '#previousLauncherVisible' to '#previousLauncherExpanded' as it actually tracks expandedness
  • Don't persist the panel/command id when the panel isn't open
  • Ensure all the sidebar tests reset the sidebar state when they are done

Differential Revision: https://phabricator.services.mozilla.com/D234773

2025-03-14T11:03:09.517000: DEBUG : Did not find a branch, checking all integration branches
2025-03-14T11:03:09.519000: INFO : The bisection is done.
2025-03-14T11:03:09.520000: INFO : Stopped

Keywords: regression
Regressed by: 1921536

Set release status flags based on info from the regressing bug 1921536

:sfoster, since you are the author of the regressor, bug 1921536, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Thanks for the STR. I'll look into this.

Assignee: nobody → sfoster
Severity: -- → S3
Status: NEW → ASSIGNED
Flags: needinfo?(sfoster)
Priority: -- → P1

Its currently a bit difficult to differentiate between toggling the whole sidebar (launcher + box/panel) and just closing a panel. Now we know more about the cases we need to handle I'm going to unpick some of this implementation and try to make it more explicit in what happens when. So, hiding the panel should just hide the panel and have no side-effects. If we also want to hide the launcher the caller should do that. I'm hoping that will make all this easier to reason about and isolate cause and effect so we can more easily pinpoint and change this logic as we go.

  • Remove some of the overloading of SidebarState.updateVisibility
  • SidebarController.hide() just hides the panel (same as legacy/original API)
Attachment #9473152 - Attachment description: Bug 1954056 - Avoid closing the sidebar launcher when just closing the open panel. r?#sidebar-reviewers! → WIP: Bug 1954056 - Avoid closing the sidebar launcher when just closing the open panel. r?#sidebar-reviewers!
Attachment #9473152 - Attachment description: WIP: Bug 1954056 - Avoid closing the sidebar launcher when just closing the open panel. r?#sidebar-reviewers! → Bug 1954056 - Avoid closing the sidebar launcher when just closing the open panel. r?#sidebar-reviewers!
Pushed by sfoster@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a99655962ea6 Avoid closing the sidebar launcher when just closing the open panel. r=sidebar-reviewers,kcochrane

Backed out changeset a99655962ea6 (Bug 1954056) for turning browser_toolbarKeyNav.js into permafail.

Push with failures

Failure log

Backout link

Flags: needinfo?(sfoster)

Thanks. I was keeping an eye on those browser_toolbarKeyNav.js failures but had not been able to reproduce locally. I'll dig into it.

Flags: needinfo?(sfoster)

Looks like the failure is in the testCharacterNavigation test in browser_toolbarkeyNav.js. This TABs over to the pageActionButton, then sends 'h' expecting focus to land on the home button. But it goes to the #sidebar-button instead. The #sidebar-button has the tooltiptext of "Hide sidebar" at this point, and I've confirmed changing that to something that doesn't start with 'h' "fixes" the bug so focus goes to the Home button as expected.

When sidebar.revamp=true, we expect the collapsed sidebar launcher to be visible in this state, which means the sidebar-button is visible and checked, so the label "Hide sidebar" is correct. Which means this is likely only ever passing erroneously and my patch changes the timing so it (correctly) fails every time. If we do in fact expect the home-button to get focus when pressing 'h' in this state, we'll probably need to change the logic in browser-toolbarKeyNav.js to weight matches in some way to prioritize Home over Hide sidebar?

I'll skip browser_toolbarKeyNav.js for sidebar.revamp=true and link to the existing bug 1775713 which has been tracking this failure.

See Also: → 1775713
Pushed by sfoster@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/adfb3dd79e0e Avoid closing the sidebar launcher when just closing the open panel. r=sidebar-reviewers,kcochrane
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
Flags: qe-verify+
Regressions: 1959121

I have reproduced this issue using Firefox 138.0a1 (2025.03.13) on Windows 11 ARM.
I can confirm this issue is fixed, I verified using Firefox 139.0a1 and 138.0b5 (with sidebar.revamp set to true) on Windows 11 ARM, Ubuntu 22 and macOS 10.15.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: