Closed Bug 1187846 Opened 4 years ago Closed 4 years ago

Badged button's minimum width is wrong

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 42
Tracking Status
firefox42 --- fixed

People

(Reporter: zer0, Assigned: neil)

Details

(Keywords: regression)

Attachments

(2 files, 2 obsolete files)

Attached image small badge (obsolete) —
This is a regression probably caused by Bug 1029937.
Previously, we had a minimum width set for the badges, where now it seems we doesn't, causing a very narrow and small badges if we set single digit content. See the attachment, compared to: https://mdn.mozillademos.org/files/9803/badge.png
Keywords: regression
Attached image badges comparison
Added a better screenshot for comparison. On the left of the screenshot, we have the UX mockup and how it was used to be. On the right, there is the current badge after the fix of bug 1029937.
After a couple of check, it seems to me that `min-width` is totally ignored on the XUL label element that is used for the badge, as well as `max-width`. Not sure if it's depends by the stack or what else.

Neil, you've implemented the stack solution, do you have any idea about that?

If we didn't find a good solution for that, to mitigate the difference we could just add some extra padding on right and left, like 3px or 4px instead of 2px.

Brian, what do you think?
Attachment #8639225 - Attachment is obsolete: true
Flags: needinfo?(neil)
Flags: needinfo?(bgrinstead)
Attached patch Possible patch (obsolete) — Splinter Review
Flags: needinfo?(neil)
Bugzilla, please let me finish filling the attachment form before submitting it. Thanks!
Attached patch Possible patchSplinter Review
Stack layout doesn't seem to honour min/max sizes for unstretched elements.
Attachment #8639924 - Attachment is obsolete: true
Attachment #8639925 - Flags: review?(enndeakin)
(I can work around the problem by wrapping the label in a box; the label's minimum width then becomes the box's preferred width.)
It'd be great if we could fix this in the stack layout.  Alternatively adding a few extra px padding on the side to prevent the really narrow badge seems reasonable.
Flags: needinfo?(bgrinstead)
Thanks for the quick response guys! I'm assigning this patch to you, Neil.
Assignee: nobody → neil
Comment on attachment 8639925 [details] [diff] [review]
Possible patch

Could use a test though.
Attachment #8639925 - Flags: review?(enndeakin) → review+
https://hg.mozilla.org/mozilla-central/rev/71d335f1a4a3
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Notice that the Look & Feel is still wrong, compared to the screenshot, but now that the `min-width` is working, it would be fixed by bug 1188001.
You need to log in before you can comment on or make changes to this bug.