Repository navigation
fix(server): make header responsive on mobile - #1130
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
@greptile review |
|
|
The 44×44px touch-target fix looks good. The CSS change is minimal, and the reported mobile viewport checks support the implementation. I found one additional accessibility issue in Before merging, please:
Keep the existing sizing fix. No unrelated styling or refactoring. |
6d524b0 to
8d8e843
Compare
Ensure the Server App header Refresh and Logout buttons meet the 44x44px minimum touch target on mobile viewports without horizontal overflow. Fixes #1088
Add localized aria-label attributes to the Server App Refresh and Logout header buttons and extend the E2E suite to verify accessible names, 44x44px bounds, no horizontal overflow, and button actions. Fixes #1088
8d8e843 to
9c16b38
Compare
Fixes #1088
Intent
Verify and implement the surgical fix for FreeOpenSourcePOS/FloCafe issue #1088 ("Server App header action buttons are smaller than 44x44px touch target"): in
frontend/src/app/server-standalone/page.tsx, size the Server App header action buttons to meet the44x44pxminimum touch target without breaking mobile header layout. Deliver via theno-mistakespipeline as its own PR withFixes #1088in the PR summary. Add localizedaria-labelattributes identifying the Refresh and Logout actions, reuse existing translation keys where appropriate, extend the browser test to verify that both buttons have the correct accessible names in addition to their minimum 44x44px dimensions, and confirm that both actions still work and the header has no horizontal overflow at 320px and 390px widths.What Changed
frontend/src/app/server-standalone/page.tsxwithmin-h-11 min-w-11(44x44px) and centered flex alignment so they meet minimum touch target dimensions.aria-labelattributes (settings.refreshandnav.logout) to the Server App header Refresh and Logout buttons.frontend/e2e/server-app-ordering.spec.tsto assert accessible names,>= 44x44pxbounding boxes across mobile viewports without horizontal overflow, and functional Refresh and Logout button clicks.Fixes #1088
Risk Assessment
✅ Low: The change is a small, surgical UI and accessibility update sizing the two Server App header action buttons to 44x44px minimum touch targets with localized aria-labels and matching E2E browser assertions.
Testing
Built the backend and static frontend, ran the Playwright E2E suite
e2e/server-app-ordering.spec.tsplustest:translationsandtest:rtl-kds-server-whatsapp, and drove live Playwright checks against the running Server App across 320px-768px viewports (including an adversarial long table name at 320px and Spanish locale at 390px), capturing screenshots and JSON measurements confirming 44x44px button dimensions, localized accessible names, working Refresh/Logout actions, and zero horizontal overflow.cd frontend && npx playwright test --config=playwright.config.ts --project=chromium e2e/server-app-ordering.spec.tsand `~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server…~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server-app-header-320px.png, `~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server-app-header-390px.pn…~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server-app-issue-1088-verification.jsonandnpm run test:translationscd frontend && npx playwright test --config=playwright.config.ts --project=chromium e2e/server-app-ordering.spec.tsand `~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server…Evidence: Live Playwright verification measurements for Server App header buttons across viewports and locales
{ "320px": { "refreshAria": "Refresh", "logoutAria": "Logout", "refreshBox": "44x44", "logoutBox": "44x44", "docHasOverflow": false, "headerHasOverflow": false }, "390px": { "refreshAria": "Refresh", "logoutAria": "Logout", "refreshBox": "44x44", "logoutBox": "44x44", "docHasOverflow": false, "headerHasOverflow": false }, "adversarialLongTable320": { "refreshBox": "44x44", "logoutBox": "44x44", "docHasOverflow": false, "headerHasOverflow": false }, "localizedSpanish390": { "refreshAria": "Actualizar", "logoutAria": "Cerrar sesión", "refreshBox": "44x44", "logoutBox": "44x44", "docHasOverflow": false }, "actions": { "refreshTablesStatus": 200, "loggedOutSignInVisible": true } }Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
cd frontend && npx playwright test --config=playwright.config.ts --project=chromium e2e/server-app-ordering.spec.tsand `~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server…~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server-app-header-320px.png, `~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server-app-header-390px.pn…~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server-app-issue-1088-verification.jsonandnpm run test:translationscd frontend && npx playwright test --config=playwright.config.ts --project=chromium e2e/server-app-ordering.spec.tsand `~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server…npm run build && npm run build:frontendcd frontend && npx playwright test --config=playwright.config.ts --project=chromium e2e/server-app-ordering.spec.tsnpm run test:translationsnpm run test:rtl-kds-server-whatsappLive Playwright verification againsttests/e2e-server.cjscapturing screenshots and bounding-box/overflow measurements at 320px, 375px, 390px, 430px, and 768px (English, Spanish locale, and adversarial long table name)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.