Repository navigation
feat(frontend/mobile): viewport + touch-target + safe-area foundations - #989
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughFrontend mobile usability improvements adding semantic input attributes ( ChangesMobile UX Enhancements
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Suggested labels
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
…ghlight + safe-area padding - viewport: add viewport-fit=cover for iOS notch support; drop spurious initial-scale=1.0 decimal (spec says 1) - meta: add format-detection=telephone=no to stop iOS auto-linkifying numeric data in tables/charts - css: -webkit-tap-highlight-color: transparent on button/a/[role=button] with explicit opacity:0.85 :active feedback instead of the blue flash - css: safe-area-inset-top on .app-topbar and safe-area-inset-bottom on .app-shell so content clears notch and home indicator on iPhone - css: touch-target minimums (min-height/width: 44px) on all interactive controls under @media (pointer: coarse) so desktop layout is unaffected; checkboxes/radios grow via label:has() instead to avoid glyph bloat - html: inputmode="numeric" pattern="[0-9]*" on all 15 numeric inputs (coverage %, grace days, notification days, ramp params) to surface the numeric keypad on mobile - html: autocomplete="email" on the notification email input
0d5af8e to
87076d0
Compare
|
Rebased on feat/multicloud-web-frontend. Resolved conflict in frontend/src/styles/responsive.css by preserving both sides: mobile foundations (tap-highlight, safe-area, touch-targets from this PR) placed first, then mobile nav drawer (from base). TypeScript clean, 1949 frontend tests pass. CR review deferred - org CR billing blocked. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
…ums on .btn-small / .toggle-password / .modal-confirm-close (refs #983) (#1499) * test(frontend/mobile): regression coverage for #989 44x44 touch minimums on .btn-small / .toggle-password / .modal-confirm-close (refs #983) Issue #983 asked for min-height:44px on these three selectors. Verified they already inherit the 44x44 minimum on touch devices from the generic `button` rule PR #989 added under @media (pointer: coarse), since all three render as plain <button> elements and no rule overrides min-height/min-width on them. Add a regression test so a future edit can't silently reintroduce a sub-44px override. * fix(frontend/mobile): drop cross-PR collision from touch-target test (#983) The test.each list asserting .btn-small / .toggle-password / .modal-confirm-close declare no sizing props collides with PR #985 (bottom-sheet modal), which gives .modal-confirm-close its own explicit min-width/min-height: 44px (needed since it is absolutely positioned, not sized by content). With both merged, this test goes red. Drop .modal-confirm-close from the list: its explicit 44x44 is a stronger, more direct guarantee than inheriting from the generic coarse-pointer rule, not a regression. .btn-small and .toggle-password still verify against the shared rule as before.
Summary
viewport-fit=coverto the existing viewport meta tag for iOS notch supportformat-detection=telephone=noto prevent iOS auto-linking numeric data:activeopacity feedback@media (pointer: coarse)only, leaving desktop unaffectedinputmode="numeric"+pattern="[0-9]*"to all 15 numeric inputs for mobile numpadautocomplete="email"to the notification email inputPer-change rationale
viewport-fit=cover: without this, iOS clips the safe-area environment variables to nothing even whenenv(safe-area-inset-*)is declared. Required for the safe-area rules to take effect.format-detection=telephone=no: coverage percentages, grace-period days, and other numeric values in tables would otherwise be auto-highlighted as phone numbers on iOS, creating spurious tap targets and breaking visual layout.Tap-highlight /
:active: the default browser blue flash on touch is jarring and inconsistent with the design system; replacing it withopacity: 0.85gives tactile feedback without clashing colors.Safe-area insets:
.app-topbarhasposition: sticky; top: 0so it must account for the notch height..app-shellneeds bottom padding so the last table row is not obscured by the iPhone home indicator.Touch-target minimums under
@media (pointer: coarse): Apple HIG and WCAG 2.5.8 both cite 44x44px as the minimum. Scoping to coarse-pointer avoids bloating compact desktop buttons. Checkboxes and radio buttons grow vialabel:has(>input)to keep the glyph size unchanged.inputmode="numeric"on all 15 numeric inputs: surfaces the number-only keyboard on mobile, removing the need to switch keyboard modes for coverage %, day counts, and ramp parameters.autocomplete="email": enables browser / password-manager autofill for the notification email field.Out of scope
Follow-up issues are being tracked separately by the mobile audit agent:
Test plan
npx tsc --noEmitpasses (confirmed clean)frontend/__tests__/html.test.tsviewport assertion still green)Closes #983
Summary by CodeRabbit