-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CL-509][PM-16190] Avoid double scrollbar appearing when default zoom is >100% #12427
Conversation
New Issues
Fixed Issues
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12427 +/- ##
==========================================
- Coverage 33.50% 33.49% -0.02%
==========================================
Files 2916 2917 +1
Lines 91158 91179 +21
Branches 17351 17353 +2
==========================================
- Hits 30540 30536 -4
- Misses 58211 58243 +32
+ Partials 2407 2400 -7 ☔ View full report in Codecov by Sentry. |
@@ -8,7 +8,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic | |||
templateUrl: "popup-page.component.html", | |||
standalone: true, | |||
host: { | |||
class: "tw-h-full tw-flex tw-flex-col tw-flex-1 tw-overflow-y-hidden", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ I think this class was a leftover from previous implementations -- it would need to be in a flex parent, so I'm removing it since it's not doing anything. (Stumbled upon it as I was testing out different css-only approaches for this ticket.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good! Few small things:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
🎟️ Tracking
CL-509
📔 Objective
When the default zoom is set to >100% in a chromium-based browser, the browser extension was displaying a 2nd scrollbar. This was due to the fact that we had set the extension to the max chrome extension height of 600px, but when zoomed in, less than 600px of height were available. This caused the content to need to scroll to reach its 600px height.
We had some code already to adjust the max height of the extension depending on how many pixels were available, but it was not working. This PR updates the checks so that the code works and applies the correct body size class for the height available, and also adds a check for the extension being open in a chrome tab so that we can ensure it stretches to fill the content in a tab. Zoom of up to 200% is supported.
Firefox and Safari do not apply the browser's default zoom to the extension, so the bug does not exist in those browsers and the fix should not cause any regressions there.
Note that this PR does not provide the ability to set the extension to a different zoom level than your default zoom level in a chromium browser. It also does not adjust the size of the window when you pop out the extension, so some content clipping will still occur at higher zoom levels in the popped out view. The latter can be resolved by resizing the popped out window.
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes