fix: resolve mobile overflow, make customizer a bottom sheet and use the brand logo everywhere - #29
Conversation
…the brand logo everywhere
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @nyeinphyoaung's task in 2m 56s —— View job Tasks
Code Review: fix: resolve mobile overflow, make customizer a bottom sheet and use the brand logo everywhereSummaryThis is a small, well-scoped responsive/visual fix. The Medium Issues1. Dashboard theme customizer's mobile bottom sheet is unverified (
|
1. Header overflowed on small mobile
Sign inandLive demoalready carriedhidden sm:inline-flex, but the class was inert. They were built withbuttonVariants({ className: "hidden sm:inline-flex" }), andcvaappends the string rather than merging it - so the element ended up with the baseinline-flexandhidden.Class order in the attribute does not decide that; stylesheet order does. In the generated CSS
.inline-flexis emitted after.hidden, so it won and the buttons stayed visible.Fixed by routing through
cn()so tailwind-merge drops the conflicting base class:Verified at a 320px viewport: both compute to
display: none. The GitHub pill is now shown on mobile instead, so the header is logo + pill.2. A second overflow in the workflow section
Even with the header fixed the page still ran 9px wide at 320px. The workflow
<li>grid items sized to min-content (309px) because of the longpnpm db:push && pnpm db:seedcommand, overflowing the 280px content box. Addedmin-w-0to the grid item and to the<code>insideCopyCommand.At a 320px layout width there are now zero overflowing elements and
main.scrollWidthis exactly 320.3. Customizer covered the whole screen on mobile
Both customizers pinned a fixed width (
w-100on the landing panel,w-[400px]on the dashboard one), which is wider than a phone viewport, so the sheet filled the screen and preset changes were invisible.Both now switch on
useIsMobile():h-[60svh], rounded topsidebarConfig.sideMeasured on the landing page at a mobile width: the sheet sits at
top: 245, leaving 245px of page visible. Applying the Amber preset with it open visibly retinted the logo tile and badge dot above the sheet.sm:max-w-nonewas added alongside the desktop width because the Sheet's ownsm:max-w-sm(384px) was silently capping the intended 400px.4. Brand logo everywhere
Ten
SAtext tiles across nine files replaced with theCommandbrand mark used by the landing navbar, footer and sign-in panel, each sized to its tile:The last is the mock sidebar in the landing preview - included since it is a miniature of the app. A repo-wide grep for
SAtext tiles now returns nothing.Verification
tsc --noEmitclean,eslintclean,next buildcompilesNot visually verified: the dashboard customizer's mobile bottom sheet. The browser window would not resize below the desktop breakpoint on that page, so I confirmed the desktop panel renders at 400px and relied on it being the same
useIsMobile()pattern already measured on the landing page. Worth a quick look on a real phone.