Closed Bug 1798377 Opened 3 years ago Closed 3 years ago

Hidden toolbarbuttons might cause overflow panel button to appear

Categories

(Firefox :: Toolbars and Customization, defect, P3)

defect

Tracking

()

VERIFIED FIXED
109 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox106 --- unaffected
firefox107 --- unaffected
firefox108 --- wontfix
firefox109 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [addons-jira])

Attachments

(2 files, 1 obsolete file)

Attached image Screenshot of problem

After bug 1797155 lands, it looks like we can get into situations where the overflow panel button will appear even when there's nothing in the panel.

STR:

  1. Install two or more WebExtensions that add toolbar buttons like uBlock, Mozilla Relay, etc.
  2. Enter Customize Mode, and reset the toolbar layout to defaults
  3. Put the WebExtension buttons on either side of the Downloads and Firefox Accounts button
  4. Exit Customize Mode
  5. Start shrinking the window until the left-most WebExtension button overflows, but no other buttons

ER:

The overflow button should not appear.

AR:

The overflow button appears, but when clicked, shows a panel that is empty. See screenshot.

This is necessary now because it's possible for things to be overflowed without
having gone into the default overflow panel. If we have, for example, extension
widgets on either side of some hidden toolbarbuttons (like the Downloads button),
and then those two extension widgets get overflowed into the Unified Extensions
panel, the hidden Downloads button will get moved into the overflow panel (which
is fine), but it'll also cause the anchor to appear, so that if the overflow
panel is opened, it shows an empty list.

This wasn't an issue before because all of the items were going into the same
overflow panel, so we knew that if a non-special widget overflowed, we should
go ahead and show the toggle.

We work around this by checking the dimensions of the overflowing item without
flushing before moving it. If it has 0 width or height dimensions, we don't
show the overflow panel anchor.

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

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

Attachment #9301206 - Attachment is obsolete: true
Attachment #9304474 - Attachment description: Bug 1798377 - Don't display the overflow button unless there's at least 1 item overflowed with non-zero width. r?sclements! → Bug 1798377 - Don't display the overflow button unless there's at least 1 item overflowed with non-zero width. r?Gijs!
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/943b9c54c361 Don't display the overflow button unless there's at least 1 item overflowed with non-zero width. r=Gijs
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch

:mconley since this was regressed in 108, would you like to nominate it for uplift to beta?

Flags: needinfo?(mconley)
Flags: needinfo?(mconley)

Mike, I'm trying to reproduce this bug using an affected Nightly build from 2022-10-31, on macOS 11 and Win 10 x64, but it does not reproduce on my end. Can you let me know on which OS did you reproduce the bug?

Flags: needinfo?(mconley)

I was using macOS to reproduce it. It was pretty intermittent and hard to reproduce it, but I did it more than once. I actually have a video recording of me reproducing it here:

https://www.youtube.com/watch?v=43lR7rPqU-o#t=35m59s

I had some WebExtension buttons in the toolbar, and as I made the window narrower, they (expectedly) overflowed into the addons button... and then I overflowed the Pocket button, and that caused the chevron to appear (expectedly), and then I widened the window slightly until the Pocket button came back, but the chevron remained with a (seemingly) empty overflow panel.

Flags: needinfo?(mconley)

Thanks, Mike! I took a look at the video where you reproduce the bug, but unfortunately, it did not reproduce on my macOS 11.

I suppose that you've already checked the fix before landing the patch in Nightly, in this case should we close the bug as verified fixed?

Flags: needinfo?(mconley)

Yes, I think that's probably fine. Thanks!

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

Attachment

General

Created:
Updated:
Size: