Closed Bug 1967464 Opened 1 year ago Closed 10 months ago

Mute/unmute button on tabs unaligned vertical sidebar

Categories

(Firefox :: Sidebar, defect, P3)

Firefox 138
defect

Tracking

()

VERIFIED FIXED
142 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox-esr140 --- verified
firefox138 --- wontfix
firefox139 --- wontfix
firefox140 --- wontfix
firefox141 --- verified
firefox142 --- verified

People

(Reporter: dontseemyass, Assigned: astor, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [fidefe-sidebar])

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0

Steps to reproduce:

  1. Start Firefox by clicking on the desktop icon at Linux
  2. Open a new tab and go to any website where any media plays.
  3. Look vertical sidebar.
  4. Sound icon is unaligned.

Actual results:

Sound icon is not aligned in tab container where favicon and text reside.

Expected results:

All favicon, sound icon and tab name text should be aligned.
Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0
The problem can be reproduced in a new profile and Nightly build
Name Firefox
Version 140.0a1
Build ID 20250520091341
User Agent Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
OS Linux 6.14.6-300.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 9 20:11:19 UTC 2025
OS Theme Breeze / Adwaita

The Bugbug bot thinks this bug should belong to the 'Firefox::Sidebar' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Sidebar
QA Contact: sbadau

Setting this bug to NEW as I can reproduce the issue by following the steps from the Description. Confirmed using the latest Nightly 140.0a1, Firefox 139, and Firefox 138.0.4. The issue is more evident on Ubuntu 24.04 and Windows 11. On macOS 15, the misalignment is not as obvious, but the text appears slightly lower than expected.

Status: UNCONFIRMED → NEW
QA Whiteboard: [qa-triage-done-c140/b139]
Ever confirmed: true
Severity: -- → S4
Priority: -- → P3
Whiteboard: [fidefe-sidebar]
Mentor: kcochrane
Keywords: good-first-bug

I would like to work on this issue.

Poking around I see that vertical tabs have a <html:moz-button> with a tab-audio-button class[1] that default to display:none to hide its content.
When an expanded tab has media playing in it, display is set to "block" and becomes visible. Inspecting the box model layout, the moz-button has 24x27 size. Both width and height is set as fit-content[2].

For some reason, if I change the tab-audio-button display:flex, now moz-button will be a 24x24 square and fit align correctly in the tab. The same happens changing the aria labelel button inside it (making it display:flex instead of inline-block will make moz-button box size be 24x24). I will check later why height:fit-content changes value depending the display settings, because I don't really know.

[1] https://searchfox.org/mozilla-central/rev/d3789aee7456dcb6702a2fb10b5e540b0ccb2d12/browser/themes/shared/tabbrowser/tabs.css#731
[2] https://searchfox.org/mozilla-central/source/toolkit/content/widgets/moz-button/moz-button.css#7

Flags: needinfo?(kcochrane)

Hi, thanks for picking this up! It looks like you're onto something with the display property. I see that changing the .tab-audio-button element to have a display value of flex or grid rather than block here seems to resolve the alignment issues on Linux. Feel free to submit a patch for me to review whenever you get the chance.

Flags: needinfo?(kcochrane) → needinfo?(gaastorgano)
Assignee: nobody → gaastorgano
Status: NEW → ASSIGNED

You are right, changing to grid solves the issue. Thanks for the clarification

Flags: needinfo?(gaastorgano)
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/bfddd6f94124 https://hg.mozilla.org/integration/autoland/rev/ffcb9173b0ca Align tab audio button r=kcochrane,desktop-theme-reviewers,tabbrowser-reviewers,dao,emilio
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.

The patch landed in nightly and beta is affected.
:astor, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(gaastorgano)

Comment on attachment 9499295 [details]
Bug 1967464 Align tab audio button r=kcochrane

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: Tab audio (mute/unmute) button won't be vertically centered on Linux
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: On Linux, mute an unpinned tab and ensure the audio button is vertically centered in the tab
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): One line CSS change
  • String changes made/needed: N/A
  • Is Android affected?: No
Attachment #9499295 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Flags: needinfo?(gaastorgano)

Comment on attachment 9499295 [details]
Bug 1967464 Align tab audio button r=kcochrane

Approved for 141.0rc1 and 140.1esr.

Attachment #9499295 - Flags: approval-mozilla-esr140+
Attachment #9499295 - Flags: approval-mozilla-beta?
Attachment #9499295 - Flags: approval-mozilla-beta+
QA Whiteboard: [qa-triage-done-c140/b139] → [uplift][qa-triage-done-c140/b139][qa-ver-needed-c142/b141]
QA Contact: sbadau → csasca

Reproduced the issue on Firefox 140.0a1 (2025-05-20) on Ubuntu 24.04 by following the STR from Comment 0.

The issue is fixed on Firefox 140.1.0esr, Firefox 141.0b10 (treeherder builds) and Firefox 142.0a1 (2025-07-13). Tests were performed on Ubuntu 24.04, Windows 11 and macOS 15.5.

Status: RESOLVED → VERIFIED
QA Whiteboard: [uplift][qa-triage-done-c140/b139][qa-ver-needed-c142/b141] → [uplift][qa-triage-done-c140/b139][qa-ver-done-c142/b141]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: