[PM-16191] - fix popup width when opening in popped out mode#20188
Open
jaasen-livefront wants to merge 2 commits intomainfrom
Open
[PM-16191] - fix popup width when opening in popped out mode#20188jaasen-livefront wants to merge 2 commits intomainfrom
jaasen-livefront wants to merge 2 commits intomainfrom
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #20188 +/- ##
==========================================
+ Coverage 46.94% 47.00% +0.06%
==========================================
Files 3888 3889 +1
Lines 117102 117271 +169
Branches 17905 17940 +35
==========================================
+ Hits 54970 55120 +150
- Misses 59652 59672 +20
+ Partials 2480 2479 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
New Issues (1)Checkmarx found the following issues in this Pull Request
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-16191
📔 Objective
Fix pop-out windows ignoring the user's configured popup width setting (Narrow/Default/Wide). Pop-outs always opened at 480px regardless of the setting.
Root causes fixed
1.
openPopoutignored the stored width settingBrowserPopupUtils.openPopoutusedMath.max(480, document.body.clientWidth)to determine the window width. In the popup context this always resolved to 480 (the default), and in background/service-worker contextsdocumentis undefined entirely. Replaced with a newgetPopupWidth()helper that:localStorage(keybw-popup-width)chrome.storage.localusing the state framework keyglobal_popupStyle_popup-width, correctly deserializing the{ "__json__": true, value: '"narrow"' }wrapper the state framework usesThis fixes all pop-out entry points:
2. Body width defaulted to 480px inside the opened window
tailwind.csshardcodedbody { width: 480px }. Changed towidth: 100%so the body fills the Chrome window (which is already sized correctly byopenPopout).PopupSizeService.setStylecontinues to overridedocument.body.style.widthwith the correct pixel value for the regular browser action popup.3.
popup-size.service.tsduplicate key constantPopupSizeService.LocalStorageKeywas a private duplicate of the string"bw-popup-width". Updated to reference the exportedPOPUP_WIDTH_STORAGE_KEYconstant frombrowser-popup-utils.ts.📸 Screenshots
Inline Menu and Passkey popout
Screen.Recording.2026-04-15.at.11.25.51.AM.mov
Manual popout
Screen.Recording.2026-04-14.at.5.20.00.PM.mov