Repository navigation
fix(web): keep en and cs catalog pages inside a 320px screen (#1082) - #1083
Conversation
The catalog sort toggle was nowrap, so the Czech label pushed the page 38px sideways; let it wrap within its container. Separately, the wider "EN" and "CS" locale labels pushed the phone menu toggle's 44px tap area 3px off screen; trim the compact switcher's padding to fit every label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 30 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Local review (CodeRabbit was rate-limited): checked both fixes at 320px in a local production build. The Czech sort label wraps to two lines inside its pill, and the EN/VI compact switchers keep a 38px-tall button with the flag, label and chevron intact. The menu toggle's tap area ends inside the viewport. |
Closes #1082
What
At 320px every catalog page scrolled sideways in English (3px) and Czech (38px). There were two causes:
#shortfilter.toogleDrops): Bootstrap's.dropdown-toggleiswhite-space: nowrap, so the uppercase Czech label ("ŘAZENÍ: VÝCHOZÍ (NEDÁVNO AKTUALIZOVANÉ)") ended at 358px. The toggle now wraps (white-space: normal; max-width: 100%), and itsd-inline-flexwrapper getsmw-100so the flex item can shrink.::after, fix(web): touch targets under 44px on phones (menu toggle, tray remove, expand, footer links) #717) ended at 323px. This affects every/enand/cspage, not only catalogs. The compact switcher's horizontal padding goes from 8px to 5px; the button stays 38px tall and about 60px wide.Test
e2e/reflow-contrast.spec.tsadds/en/smartphonesand/cs/smartphonesto the 320px pages. Each one checksscrollWidth <= 320and the toggle tap area.mw-100reverted),/cs/smartphonesfails at 358px.reflow-contrast,navbar-layout,navbar-one-rowandtouch-targetspass.🤖 Generated with Claude Code
📌 TL;DR
Fixes a horizontal overflow issue on 320px mobile viewports caused by long localized sort labels and locale switcher text, ensuring the catalog and header remain within screen bounds.
🎯 Type of Change
🔍 Changes Walkthrough
apps/web/e2e/reflow-contrast.spec.ts/en/smartphonesand/cs/smartphonesto the list of pages tested for horizontal reflow/contrast issues to prevent regression of the overflow bug.apps/web/src/app/[locale]/smartphones/page.tsxmw-100(max-width: 100%) utility class to the sort dropdown container to prevent it from exceeding the parent column width.apps/web/src/app/style/scss/style.scss.toogleDropsstyle to allow text wrapping (white-space: normal) and enforcemax-width: 100%, overriding Bootstrap's defaultnowrapbehavior for long labels.apps/web/src/components/elementary/LocaleSwitcher.tsx8pxto5pxto accommodate wider locale codes (e.g., "EN", "CS") without pushing the menu toggle off-screen on 320px devices.📊 Architectural Flow
flowchart TD A[Mobile Viewport 320px] --> B{Content Width Check} B -->|Sort Dropdown| C[Long Localized Label] B -->|Header| D[Locale Switcher] C --> E[CSS: white-space: normal<br>max-width: 100%] D --> F[Padding Reduced: 8px -> 5px] E --> G[Text Wraps / Fits Container] F --> H[Toggle Stays On-Screen] G --> I[No Horizontal Scroll] H --> I