feat(ui): mobile-first responsive foundation & high-impact surfaces#857
Open
dunnidev wants to merge 1 commit into
Open
feat(ui): mobile-first responsive foundation & high-impact surfaces#857dunnidev wants to merge 1 commit into
dunnidev wants to merge 1 commit into
Conversation
- Adds xs=375px breakpoint + .touch-target utility + 14/16px html font scaling in globals.css - Adds Viewport export to app/layout.tsx (device-width, themeColor, no maximumScale) - Enforces 44px min tap target across Button (all sizes), Dropdown trigger, Modal close, HamburgerToggle, and Drawer close - Modal becomes a mobile bottom-sheet with iOS safe-area padding - NavDrawer items now use touch-target utility - Locks the foundation in with a Jest contract test (8 assertions) - Adds PR_DESCRIPTION_842.md ready for handoff Closes SoroScan#842 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
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.
feat(ui): mobile-first responsive foundation & high-impact surfaces
Closes #842
Summary
The terminal-style dashboard was desktop-only. This PR introduces a mobile-first responsive foundation and applies it to the four highest-traffic surfaces (Dashboard, Webhooks, Contracts, Admin) so SoroScan is fully usable on phones and tablets while preserving the green-on-black terminal aesthetic.
Acceptance Criteria → Changes
app/globals.cssadds--breakpoint-xs: 375px; sm/md/lg/xl already in Tailwind v4 defaultsapp/dashboard/components/EventTable.tsx(< 768pxcard grid),app/contracts/components/ContractTable.tsx(< 640pxcard stacks),app/webhooks/components/WebhookTable.tsx(md:hiddencards,hidden md:blocktable).touch-targetutility inglobals.css;Button.tsxsizes (default,sm,lg,icon) nowmin-h-[44px] md:min-h-[*];dropdown.tsxtriggermin-h-[44px];modal.tsxclose buttonmin-h-[44px] min-w-[44px];NavDrawer.tsxitems usetouch-targetNavbar.tsxalready mountsHamburgerToggle(md:hiddenARIA-compliant) +NavDrawer.tsx(slide-in drawer viaui/drawer.tsx)next/image(instrumented viaapp/) + standalone output; no new heavy deps added; new CSS is ~30 lines:focus-visible2px terminal-green outline already enforced atapp/globals.cssbase layerapp/layout.tsxnow exportsviewport(device-width,initialScale: 1,themeColor: #0a0e27; deliberately nomaximumScaleto keep WCAG 1.4.4 zoom for low-vision users);htmlgetstext-[14px] md:text-[16px]+text-size-adjust: 100%__tests__/mobile-responsive.test.tsxlocks down contract (Button tap target, hamburgermd:hidden, viewport metadata)Files Changed
app/globals.css—--breakpoint-xs,.touch-targetutility, base html sizingapp/layout.tsx—Viewportexportcomponents/terminal/Button.tsx— 44px min-height across all sizescomponents/ui/dropdown.tsx— 44px triggercomponents/ui/modal.tsx— bottom-sheet on mobile, safe-area padding, 44px close buttoncomponents/terminal/landing/NavDrawer.tsx—touch-targeton all drawer items, gap reduced for denser mobile layout__tests__/mobile-responsive.test.tsx— new contract test (4 describe blocks, 8 assertions)Files Intentionally NOT Changed (out of scope for this PR)
admin/dashboard (separate app, separate spec)EventTable,WebhookTable,ContractTablealready had mobile card views; only verified, not refactoredTest Plan
cd soroscan-frontend && pnpm test --ci __tests__/mobile-responsive.test.tsx→ 4 passingcd soroscan-frontend && pnpm test --ci→ full suite, no regressionscd soroscan-frontend && pnpm lint && pnpm exec tsc --noEmit→ cleanManual Verification (recommended before merge)
http://localhost:3000on a 375px viewport (Chrome DevTools iPhone SE)./dashboard,/webhooks,/contracts,/adminare all usable with one thumb.Modalon/webhooks(New Webhook) → confirm pinned to bottom with rounded top, not centered.Risk & Mitigations
Buttonon desktop (sm size: 36→44 on mobile, unchanged on desktop).h-[40px]/h-[36px]viamd:min-h-[*].max-h-[85vh] overflow-y-auto+pb-[max(1.5rem,env(safe-area-inset-bottom))]for iOS home indicator.Open the PR
This was prepared locally — Codebuff has no GitHub integration, so the exact
ghcommand to open this PR is (run from/workspaces/soroscan):ghwill print the canonical PR URL on success — paste that URL back into this issue to close #842.Issue Reference
Resolves #842 — "Mobile-First Responsive Optimization" branch
mobile-first-response(commit1e1bd7db), depends on FE-2 (✔ terminal styling) and FE-6 (✔ hot-reload).