Skip to content

fix(popup): prevent right-side clipping on narrow viewports#7

Open
raghav4 wants to merge 2 commits into
mainfrom
fix/popup-mobile-overflow
Open

fix(popup): prevent right-side clipping on narrow viewports#7
raghav4 wants to merge 2 commits into
mainfrom
fix/popup-mobile-overflow

Conversation

@raghav4

@raghav4 raghav4 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Problem

On mobile Chrome and Chromebooks with smaller viewports, the popup's fixed width: 340px overflows the viewport width. The browser clips the overflow invisibly, so the master toggle, preset pill ends, and all toggle switches on the right side are cut off.

Changes (popup.html only)

Element Fix
body max-width: 100vw; overflow-x: hidden — shrinks to fit rather than overflow
.header-left flex: 1 — absorbs spare space so master toggle always stays visible
.brand-name / .brand-sub text-overflow: ellipsis — truncates gracefully instead of pushing layout wider
.limit-row / .limit-pills flex-wrap: wrap — limit pills reflow to a second line on narrow widths

The Unstable badge on Hide Shorts Videos visible in the report was from an old installed version — it was removed in v1.1.0 and is not present in current code.

Test plan

  • Load extension on a narrow Chrome window (< 340px) or Android Chrome — all controls visible
  • Daily limit pills wrap to second line rather than overflow at narrow widths
  • Master toggle always visible in header
  • On desktop at 340px+ width — no visual change

🤖 Generated with Claude Code

raghav4 and others added 2 commits July 4, 2026 14:43
On mobile Chrome and small screens the fixed 340px body overflows
the viewport and the right edge (toggles, preset pills, master
switch) is clipped invisibly.

- body: add max-width:100vw + overflow-x:hidden so the popup
  shrinks to fit rather than overflow
- header-left: flex:1 so it absorbs spare space and keeps the
  master toggle always visible
- brand-name/brand-sub: text-overflow:ellipsis instead of pushing
  the layout wider
- limit-row / limit-pills: flex-wrap:wrap so daily limit pills
  reflow to a second line on narrow widths rather than overflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vw units in Chrome extension popups resolve against the tiny initial
viewport before the popup expands, not the final rendered width.
This caused the body to shrink to ~40px making the popup unusable.

The flex-wrap and text-overflow changes are kept as they help on
genuinely narrow screens without breaking the fixed-width popup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant