Open Bug 1602924 Opened 6 years ago Updated 2 years ago

Refactor toolbarbutton-badge to get more consistent rendering of long badges

Categories

(WebExtensions :: Frontend, task, P3)

task

Tracking

(firefox72 disabled, firefox73 disabled, firefox74 disabled)

Tracking Status
firefox72 --- disabled
firefox73 --- disabled
firefox74 --- disabled

People

(Reporter: ntim, Unassigned)

References

Details

See Also: → 1602230

Hey Tim, do you plan to fix this?

Flags: needinfo?(ntim.bugs)
Priority: -- → P2
Flags: needinfo?(ntim.bugs) → needinfo?(bgrinstead)
Depends on: 1602230
See Also: 1602230

I won't have time to work on this before the new year. I put up a patch in Bug 1602230 that should unblock this I think, but I'm not positive. I'm also not sure if/when it will land. So if we for sure want this and Bug 1602230 fixed in 73 then we would need to back out the nsStackFrame removal in mozilla-central (currently backed out only on beta) and use legacy-stack as we did for beta in https://bugzilla.mozilla.org/show_bug.cgi?id=1602230#c15.

Tim, what do you think about that option?

Flags: needinfo?(bgrinstead) → needinfo?(ntim.bugs)

(In reply to (Mostly unavailable through Jan 1) Brian Grinstead [:bgrins] from comment #2)

I put up a patch in Bug 1602230 that should unblock this I think, but I'm not positive. I'm also not sure if/when it will land.

This patch should unblock things, in addition to your patch (which makes abspos work) and removing the negative margins from the badge, adding the following to .toolbarbutton-badge seems to fix things up:

position: absolute;
top: 0;
inset-inline-end: 0;

My concern is more about the time-consuming/tedious nature of getting it to a shippable state since there are the following things to do:

  • updating+testing all different types of badges to make them work as before... (CFR feature callout badges, warning and success update badges, #pageAction-panel-addSearchEngine, potentially others...)
  • potentially having automated tests to update (although this should be more trivial)

Doing this will be a really nice clean up though, since it'll remove special-case negative margins for different types of badges.

So if we for sure want this and Bug 1602230 fixed in 73 then we would need to back out the nsStackFrame removal in mozilla-central (currently backed out only on beta) and use legacy-stack as we did for beta in https://bugzilla.mozilla.org/show_bug.cgi?id=1602230#c15.
Tim, what do you think about that option?

I'd prefer having a proper fix for 73 (like using abspos), but given it isn't risk-free, I guess that would be fine.

I won't have time to handle this until the end of the month though. Is a proper fix and/or using legacy-stack on 73 you could look at?

Thanks and happy new year!

Flags: needinfo?(ntim.bugs) → needinfo?(bgrinstead)

(In reply to Tim Nguyen :ntim (blocking ni? until Jan 22th) from comment #3)

I'd prefer having a proper fix for 73 (like using abspos), but given it isn't risk-free, I guess that would be fine.

I won't have time to handle this until the end of the month though. Is a proper fix and/or using legacy-stack on 73 you could look at?

At this point I think switching to legacy-stack for 73 is our best option. As you mention there's a lot of testing that needs to be done here and I'd prefer to not have to also uplift the changes (and then any regression fixes) to beta.

If we want to go that route, then we need to land https://phabricator.services.mozilla.com/D56658 and https://bugzilla.mozilla.org/attachment.cgi?id=9116256 to 73 beta, right?

Flags: needinfo?(bgrinstead)
Summary: browserAction badge causes the toolbar button to shift when the badge width changes → browserAction badge causes the toolbarbutton width to expand when the badge text is long

The bug as originally filed isn't a problem anymore, right? Bug 1602230 fixed the stretching issue. I wonder if this should really be duped with Bug 1610063 where Comment 3 is the proper fix for the issue described there. What do you think?

Type: defect → task
Flags: needinfo?(ntim.bugs)
No longer regressed by: 1576946
See Also: → 1610063
Summary: browserAction badge causes the toolbarbutton width to expand when the badge text is long → Refactor toolbarbutton-badge to get more consistent rendering of long badges

I think the current state makes sense, this bug can be used for refactoring, bug 1610063 can be used to fix the issue.

Flags: needinfo?(ntim.bugs)

Tim, should we update the priority of this bug as P3 (the same as bug 1610063), and could we remove the regression keyword?

Flags: needinfo?(ntim.bugs)

(In reply to Ethan Tseng [:ethan] from comment #7)

Tim, should we update the priority of this bug as P3 (the same as bug 1610063), and could we remove the regression keyword?

Yeah, makes sense, thanks!

Flags: needinfo?(ntim.bugs)
Keywords: regression
Priority: P2 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.