Closed Bug 1938534 Opened 1 year ago Closed 1 year ago

Customize sidebar icons are not in the correct position after opening the addons page through the Customize Toolbar

Categories

(Toolkit :: UI Widgets, defect)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
136 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox133 --- unaffected
firefox134 --- unaffected
firefox135 --- wontfix
firefox136 --- verified

People

(Reporter: atrif, Assigned: emilio)

References

(Regression)

Details

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

Attachments

(4 files)

Attached image sidebar.gif —

Found in

  • 135.0a1 (2024-12-19)

Affected versions

  • 135.0a1 (2024-12-19)

Tested platforms

  • Affected platforms: Windows 10x64
  • Unaffected platforms: macOS 12

Preconditions

  • sidebar.revamp enabled

Steps to reproduce

  1. Open the Customize sidebar.
  2. Go to Customize Toolbar.
  3. Click on Manage Themes.

Expected result

  • The Customize sidebar icons are correctly positioned.

Actual result

  • The Customize sidebar icons are lifted.

Regression range

Additional notes

  • Attached a screen recording.
OS: Windows → All
Attached image macOS.png —

This is also happening on macOS

Changing the component to Toolkit > UI Widgets for the ReComp team to investigate further. We're using the moz-checkbox component for these radio buttons.

Component: Sidebar → UI Widgets
Product: Firefox → Toolkit

Mark, would someone be able to look into this and get a fix by 137?

Flags: needinfo?(mstriemer)

I was clicking around trying to figure out why this is happening...it still makes no sense to me, but getting rid of the relative/absolute positioning seems like a potential fix (which in turn maybe points towards what's causing this in the first place?):

diff --git a/toolkit/content/widgets/moz-input-common.css b/toolkit/content/widgets/moz-input-common.css
--- a/toolkit/content/widgets/moz-input-common.css
+++ b/toolkit/content/widgets/moz-input-common.css
@@ -48,10 +48,6 @@
     }
   }
 
-  .label-content {
-    position: relative;
-  }
-
   /* Input */
 
   #input {
@@ -76,7 +72,6 @@
   /* Icon */
 
   .icon {
-    position: absolute;
     width: var(--icon-size-default);
     height: var(--icon-size-default);
     margin-block: var(--icon-margin-block-adjust);
@@ -85,7 +80,8 @@
     stroke: currentColor;
 
     + .text {
-      margin-inline-start: calc(var(--icon-size-default) + var(--space-small));
+      margin-inline-start: var(--space-small);
+      vertical-align: top;
     }
   }

Setting inset: 0 on .icon also appears to fix this, but I don't know why. It seems like the stacking context has changed or something. Interestingly this doesn't reproduce in my release build. Running mozregression.

Actually there is a regressor on here already, but manually reverting that locally doesn't seem to fix it...

Flags: needinfo?(mstriemer)

My mozregression pointed to https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=68328f7bb0766007cf5acc0ac993e5c613bf39e4&tochange=840b6bd0d6e4f247b6111895bd33bd67ab08ed2f which seems more likely, but I still don't see what would have caused this (or realistically how this could possibly happen)

That push has changes from Bug 1917305 (hjones's changes related to the input, seems likely) and Bug 1936684 (emilio, build fixup related to margins, maybe also related but that just feels so unlikly for both of these to be together haha)

@emilio any idea how this absolute positioned element could shift like this? Interestingly inspecting the box around these inputs which is a shadow root fixes the issue

Flags: needinfo?(emilio)

No, this is due to the CSS, and it's a long-standing issue. The containing block is the .label-content, which is an inline, and this is using the hypothetical position (inset: auto).

We have some long-standing issues on this area, see bug 489100 and bug 255139.

That said, that seems like a rather odd styling choice? It seems it's so that the alignment doesn't affect the height of the line, is that right? That seems rather odd, you could just use vertical-align: top to prevent that. Or just make the label-content display: inline-block or so but...

Flags: needinfo?(emilio)
See Also: → 255139, 489100
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/20ab12263bfa Simplify input-common icon styling. r=reusable-components-reviewers,desktop-theme-reviewers,hjones
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch

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

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox135 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)

Verified fixed with Firefox 136.0a1 (2025-01-12) on Windows 10x64 and macOS 12.

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

Attachment

General

Created:
Updated:
Size: