From 705e85b37cdc335cc45a1a1a59e77ef51c417e26 Mon Sep 17 00:00:00 2001 From: Richie Date: Wed, 22 Apr 2026 12:57:48 +1000 Subject: [PATCH] ProvidersStep mobile: transparent control strip, icon-only sort, drawer header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Drop the Paper container around the mobile-map floating controls — each control (Filters, Sort, view toggle) now carries its own white fill and reads over any map tile without a shared box - Sort button becomes icon-only on mobile-map (the current sort is still communicated via the aria-label and the menu) — saves the row's horizontal budget - Align all three controls to 32px height so Filters, Sort, and the List/Map toggle sit on a common baseline - Move the drawer close X out of the image overlay area into a dedicated 40px drawer header bar; cluster header text ("N providers in this area") now lives in the same strip. No more overlap with the Verified badge on the card image. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../pages/ProvidersStep/ProvidersStep.tsx | 113 +++++++++++------- 1 file changed, 68 insertions(+), 45 deletions(-) diff --git a/src/components/pages/ProvidersStep/ProvidersStep.tsx b/src/components/pages/ProvidersStep/ProvidersStep.tsx index a11edc6..14d1adb 100644 --- a/src/components/pages/ProvidersStep/ProvidersStep.tsx +++ b/src/components/pages/ProvidersStep/ProvidersStep.tsx @@ -538,18 +538,15 @@ export const ProvidersStep: React.FC = ({ /> - {/* Floating control strip */} - = ({ }} /> - {/* Control row: Filters, Sort, view toggle */} + {/* Control row: Filters, Sort (icon-only on mobile), view toggle. + Each control carries its own white fill so it reads cleanly + over any map tile — no shared container. Heights aligned at + 32px to match Button small + ToggleButton small. */} {filterDialogChildren} - + + = ({ ))} - {/* View toggle — icon-only on mobile to keep the row tight */} + {/* View toggle — icon-only, aligned height with the buttons */} = ({ ml: 'auto', flexShrink: 0, '& .MuiToggleButton-root': { + height: 32, px: 1, - py: 0.5, + py: 0, + bgcolor: 'background.paper', + '&:hover': { bgcolor: 'background.paper' }, '&.Mui-selected': { bgcolor: 'var(--fa-color-brand-100)', color: 'primary.main', @@ -710,7 +725,7 @@ export const ProvidersStep: React.FC = ({ - + {/* Bottom drawer — slides up when a pin/cluster is active */} = ({ pointerEvents: drawerOpen ? 'auto' : 'none', }} > - {/* Close X */} - mapRef.current?.clearActive()} + {/* Drawer header — holds the close X (and the cluster count when + applicable) so it doesn't sit over the card image */} + - - + {drawerCluster && !drawerProvider && ( + + {drawerCluster.providers.length} providers in this area + + )} + mapRef.current?.clearActive()} + size="small" + sx={{ + ml: 'auto', + width: 32, + height: 32, + color: 'text.secondary', + '&:hover': { bgcolor: 'var(--fa-color-surface-subtle)' }, + }} + > + + + {/* Single-provider drawer content — entire card clickable */} {drawerProvider && ( - + = ({ {/* Cluster list drawer content — tap row to drill in */} {drawerCluster && !drawerProvider && ( - - - {drawerCluster.providers.length} providers in this area - + {[...drawerCluster.providers] .sort((a, b) => Number(!!b.verified) - Number(!!a.verified))