Repository navigation
fix(pos): hide mobile cart button on desktop - #1122
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 |
|
Intent
Verify and implement the surgical fix for FreeOpenSourcePOS/FloCafe issue #1058 ("hide floating cart button on tablet and desktop viewports"): the floating mobile Cart button on
/posremains visible at desktop viewports (>= 768px/>= 1024px) because unlayered.touch-target(display: inline-flex;) infrontend/src/app/globals.cssoverrides Tailwind's responsive hiding class (lg:hidden/md:hidden) infrontend/src/app/(dashboard)/pos/page.tsx. Ensure the floating mobile Cart button is hidden on desktop viewports while remaining visible and44x44pxon mobile/narrow viewports. Deliver via theno-mistakespipeline as its own PR withFixes #1058in the PR summary.What Changed
.touch-targetrule infrontend/src/app/globals.cssinside@layer componentsso Tailwind responsive utility classes (such asmd:hidden/lg:hidden) take cascade precedence over itsdisplay: inline-flexdeclaration while preserving44x44pxtouch sizing on mobile viewports.frontend/e2e/layout-integrity.spec.tsverifying that the/posfloating mobile Cart button is hidden at1024x768and768x1024viewports and remains visible with dimensions>= 44x44pxat390x844.Fixes #1058
Risk Assessment
✅ Low: Wrapping .touch-target in @layer components is a minimal, targeted CSS layer change that allows Tailwind responsive utilities (such as md:hidden) to override its default display property while preserving 44x44px touch sizing on mobile viewports, verified by a Playwright E2E test.
Testing
Built the backend and static desktop frontend, ran the focused Playwright E2E regression test in frontend/e2e/layout-integrity.spec.ts against an isolated E2E server instance, and drove live Chromium checks across 1024x768, 768x1024, 767x1024, and 390x844 viewports with screenshots and computed-style/bounding-box measurements; all scenarios passed.
Evidence: Computed style and bounding-box measurements across desktop, tablet, boundary, and mobile viewports
{ "desktop-1024x768": { "mobileCartDisplay": "none", "width": 0, "height": 0, "desktopCartDisplay": "flex" }, "tablet-768x1024": { "mobileCartDisplay": "none", "width": 0, "height": 0, "desktopCartDisplay": "flex" }, "boundary-767x1024": { "mobileCartDisplay": "flex", "minWidth": "44px", "minHeight": "44px", "width": 56, "height": 56, "desktopCartDisplay": "none" }, "mobile-390x844": { "mobileCartDisplay": "flex", "minWidth": "44px", "minHeight": "44px", "width": 56, "height": 56, "desktopCartDisplay": "none" } }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.
npm run build && npm run build:frontendE2E_BASE_URL=http://127.0.0.1:43001 E2E_KDS_BASE_URL=http://127.0.0.1:43002 E2E_SERVER_APP_BASE_URL=http://127.0.0.1:43003 npx playwright test --config=playwright.config.ts --project=chromium e2e/layout-integrity.spec.ts --grep "POS hides the floating mobile cart button on tablet and desktop viewports and keeps it touch-sized on mobile"Live Playwright verification and screenshot capture across 1024x768, 768x1024, 767x1024, and 390x844 against tests/e2e-server.cjs✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.