WFDASHDRIVER-APP/components
SJCoetz 105f169e45 feat: popover stays above footer, partial collections must be justified
Two improvements to the collection flow:

1. Popover clipping under BottomNav (last item in list)
   - Root cause: popovers were z-[60] *inside* a parent stacking
     context at z-30, so their effective page z-index was 30 — below
     BottomNav's z-50. Even if the z-index were right, the popover
     extends below the trigger button and could fall below the
     viewport on the last item in a long list.
   - Add lib/hooks.ts with usePopoverPlacement: measures the
     trigger's bottom edge and flips popover direction to "up" when
     there isn't ~240px of room below (reserving 80px for BottomNav
     + safe-area inset).
   - Bump the article/section/li stacking context from z-30 to z-[80]
     when a popover is open so the popover paints above BottomNav
     (z-50). Covers both compact-mode SupplierGroup rows and
     detailed-mode CollectionItemCard via the existing
     onPopoverChange callback.
   - For SupplierGroup: hooks live at the top level (record keyed by
     item.id) to avoid the Rules of Hooks trap of declaring hooks
     inside items.map().

2. Partial collections must be justified
   - In CollectModal, when received qty < expected, require EITHER a
     reason (dropdown: out of stock / wrong item / quality issue /
     damaged / wrong qty packed / other) OR a photo before Confirm
     is enabled. Prevents silent partial submissions with no audit
     trail.
   - The picked reason flows into the auto-generated problem note
     so the operator sees "[Reason] driver note" in PB.

Co-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Orca <help@stably.ai>
2026-08-02 22:58:08 +02:00
..
AreaGroup.tsx feat: popover stays above footer, partial collections must be justified 2026-08-02 22:58:08 +02:00
AuthProvider.tsx feat: initialize project with Next.js, TypeScript, and Tailwind CSS 2026-05-24 21:51:29 +02:00
BottomNav.tsx feat: add complete dark mode support with settings toggle 2026-07-07 18:28:19 +02:00
CollectionItemCard.tsx feat: popover stays above footer, partial collections must be justified 2026-08-02 22:58:08 +02:00
CollectionMap.tsx feat: add pickup proof photos, improve performance and UX 2026-07-07 20:43:17 +02:00
CollectModal.tsx feat: popover stays above footer, partial collections must be justified 2026-08-02 22:58:08 +02:00
InstallPrompt.tsx feat: add pickup proof photos, improve performance and UX 2026-07-07 20:43:17 +02:00
ItemDetailModal.tsx feat: add PO/Notes popovers, supplier color sidebar, fix popover clipping 2026-08-02 21:38:38 +02:00
LocationTracker.tsx feat: add order item photo uploads and fix PB bugs 2026-07-08 01:35:26 +02:00
OfflineIndicator.tsx refactor(ui): rebrand app, fix supplier naming 2026-07-05 22:32:20 +02:00
ProblemModal.tsx refactor(ui): rebrand app, fix supplier naming 2026-07-05 22:32:20 +02:00
PWABridge.tsx Add PWA support and UI redesign 2026-05-27 00:34:50 +02:00
SupplierGroup.tsx feat: popover stays above footer, partial collections must be justified 2026-08-02 22:58:08 +02:00