VOOZH about

URL: https://phabricator.services.mozilla.com/D305362

⇱ ⚙ D305362 Bug 2045856 - Update VPN panel width to smaller size. r=#ip-protection-reviewers


Bug 2045856 - Update VPN panel width to smaller size. r=#ip-protection-reviewers
ClosedPublic

Authored by mhynson on Mon, Jun 8, 6:41 PM.
Referenced Files
F72951749: D305362.1781823692.diff
Wed, Jun 17, 11:01 PM
F72935456: D305362.1781807083.diff
Wed, Jun 17, 6:24 PM
F72934116: D305362.1781806228.diff
Wed, Jun 17, 6:10 PM
Unknown Object (File)
Tue, Jun 16, 9:32 PM
Unknown Object (File)
Mon, Jun 15, 4:21 PM
Unknown Object (File)
Mon, Jun 15, 11:25 AM
Unknown Object (File)
Mon, Jun 15, 11:25 AM
Subscribers

Diff Detail

Event Timeline

phab-bot published this revision for review.Mon, Jun 8, 6:42 PM
phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
Comment Actions

qreviews — 1 inline finding on this diff

Auto-reviewed because risk and complexity scored below the threshold of 3.

Scores

  • Risk: 1/10
  • Complexity: 0/10

Risk factors

  • Pure CSS value change: width reduced from 400px to 360px in panelUI-shared.css
  • Isolated UI styling adjustment with no logic, state, or functional impact
  • No security, IPC, permissions, or sensitive subsystem implications

Complexity factors

  • Single-line numeric value change in a CSS file
  • No control flow, no new abstractions, no cross-file dependencies

Posted 1 inline comment on this diff — see the file view above for line-anchored findings.


*Advisory only — posted by qreviews using . Does not accept, reject, or request changes.*

browser/themes/shared/customizableui/panelUI-shared.css
2539–2540

Replace the raw literal with a design token or a feature-scoped CSS variable (e.g. defined once and referenced here). Raw pixel widths for panel dimensions should be expressed via the design-system token layer so they adapt with Nova and avoid magic numbers per the area CSS conventions.

dao requested changes to this revision.Tue, Jun 9, 11:23 AM
dao added 1 blocking reviewer(s): ip-protection-reviewers.
dao added a subscriber: dao.
dao added inline comments.
browser/themes/shared/customizableui/panelUI-shared.css
2538–2544

I think I disagree with the AI review here. This seems unnecessarily convoluted, especially since the pre-nova / nova split is temporary. Putting a hardcoded value in a variable that's used just once in the same rule where it's defined doesn't make it a design token, so I think we can simplify this to:

width: 360px;
@media not -moz-pref("browser.nova.enabled") {
 width: 400px;
}

Note that making pre-nova the conditional block makes it easier to clean this up down the road.

It would also be great if there was an actual design token to use here instead of the , but I don't think we have that. However can we make this a bit smarter by using so the panel adapts to the text size? The figma appears to be using if I'm reading it correctly; I suspect this means we want here because what matters is the text size in the panel, not the text size at the document root.

This revision now requires changes to proceed.Tue, Jun 9, 11:23 AM
browser/themes/shared/customizableui/panelUI-shared.css
2538–2544

I've updated the AI review prompt with this feedback, thanks!

https://github.com/msujaws/qreviews/commit/479cf115a1f82a9545e64b22c506e064655ec044

mhynson updated this revision to Diff 1296270.
mhynson marked 2 inline comments as done.
dao requested changes to this revision.Wed, Jun 10, 4:09 PM
dao added inline comments.
browser/themes/shared/customizableui/panelUI-shared.css
2538–2544

Looks like this hasn't been addressed yet:

It would also be great if there was an actual design token to use here instead of the , but I don't think we have that. However can we make this a bit smarter by using so the panel adapts to the text size? The figma appears to be using if I'm reading it correctly; I suspect this means we want here because what matters is the text size in the panel, not the text size at the document root.

This revision now requires changes to proceed.Wed, Jun 10, 4:09 PM
browser/themes/shared/customizableui/panelUI-shared.css
2538–2544

I can update this. When I look at the Figma, though, I'm seeing 22.5rem, which seems correct based on a 16px font-size. Do you have a link to the Figma where are you seeing 24rem?

mhynson added inline comments.
browser/themes/shared/customizableui/panelUI-shared.css
2538–2544

@dao, after taking a closer look, the panel is using for the font property which by default will probably be around 12px or 13px depending on the platform. 28em or 30em seems more suitable in that case. When you say using will make it a bit smarter could you elaborate on that? I want to verify as many scenarios as possible, especially with other locales to ensure larger/long text is accounted for.

mhynson updated this revision to Diff 1299183.
This revision is now accepted and ready to land.Tue, Jun 16, 7:05 PM

Revision Contents

PathSize
browser/
themes/
shared/
customizableui/
6 lines
CommitTreeParentsAuthorSummaryDate
feb1ebcdc0dd0ce10f5ff90cMichael Hynson
Bug 2045856 - Update VPN panel width to smaller size. r=ip-protection-reviewers… (Show More…)

Diff 1302740

browser/themes/shared/customizableui/panelUI-shared.css

Loading...