Repository navigation
fix(pos): separate cart control touch targets - #1486
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
PR Summary by QodoPrevent POS cart controls from intercepting adjacent clicks
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1. Guest-count buttons shrink to 24px and lose their hit area
|
Replace overlapping after:-inset-* pseudo-elements on CartPanel item and pax controls with real non-overlapping 28px touch target boxes and gap-1.5 action spacing so clicking near button edges never triggers a neighboring control. Fixes #1471
Match the dine-in PAX decrease and increase buttons to the 28px (h-7 w-7 min-h-7 min-w-7) non-overlapping touch target size used by cart item controls.
a5cdbf2 to
5de019b
Compare
…he `dine_in` `pos-order-details-summary` bar in `frontend/src/components/pos/CartPanel.tsx` so enlarging the PAX stepper buttons from 24px (`h-6`) to 28px (`h-7`) keeps the summary bar at 36px and preserves the `>= 300px` `cart-items-scroll` height on a 1024x600 viewport (which also prevents the retry cascade that exhausted the 60/min category write rate limit in subsequent `layout-integrity.spec.ts` suites)
Intent
Verify and fix this review finding with a dedicated PR linked to its issue: [P2] Prevent cart controls from intercepting neighboring buttons -
frontend/src/components/pos/CartPanel.tsx:116. The 24px controls expand their hit areas through overlapping pseudo-elements. Clicking inside the right edge of Edit removed the sole cart item because the neighboring minus button received the click. Override Price also overlaps Edit. Give each control a real, non-overlapping touch target.Fixes #1471
What Changed
h-6 w-6) button boxes and overlappingafter:-inset-1.5/after:-inset-2pseudo-elements onCartPanelcontrols (discrete and fractional quantity steppers, PAX steppers, item delete, Override Price, and Edit) with real, non-overlapping 28px (h-7 w-7 min-h-7 min-w-7) touch target boxes and increased action group spacing togap-1.5.tests/ui-regressions-621-623-626.test.tsand added an E2E test infrontend/e2e/layout-integrity.spec.tsverifying non-overlapping bounding boxes, LTR/RTL hit testing, and edge-click routing for cart controls.Risk Assessment
✅ Low: The change cleanly replaces overlapping pseudo-element hit targets on POS cart controls with real 28x28px button boxes and 6px control spacing, backed by SSR markup assertions and an end-to-end Playwright hit-target regression test.
Testing
Built the backend and static desktop frontend, ran the SSR markup regression test (
npm run test:ui-regressions-621-623-626), executed the end-to-end Playwright browser test (POS cart item controls have non-overlapping touch targets and edge clicks do not trigger neighbors (#1471)), and drove an isolated live POS instance with Chromium to verify integer and fractional item controls, PAX steppers, LTR/RTL hit testing, and adversarial right-edge clicks on Override Price and Edit, capturing four visual screenshots as evidence; all checks passed.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:frontendnpm run test:ui-regressions-621-623-626cd frontend && npx playwright test e2e/layout-integrity.spec.ts -g "1471" --config=playwright.config.ts --project=chromiumLive Playwright browser verification againsttests/e2e-server.cjscapturing visual screenshots and verifying LTR/RTL, fractional-quantity, and PAX hit targets✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.