This commit is contained in:
Andras Schmelczer 2026-05-31 13:17:11 +01:00
parent c995f12f8b
commit 8dc939d761
44 changed files with 3540 additions and 2159478 deletions

View file

@ -17,6 +17,7 @@ import MobileBottomSheet from '../MobileBottomSheet';
import { MapPinIcon } from '../../ui/icons/MapPinIcon';
import { EyeIcon } from '../../ui/icons/EyeIcon';
import { HouseIcon } from '../../ui/icons/HouseIcon';
import { SpinnerIcon } from '../../ui/icons/SpinnerIcon';
import { IndeterminateProgressBar } from '../../ui/IndeterminateProgressBar';
import type { MapFlyTo } from './types';
import { MapFallback, PaneFallback } from './Fallbacks';
@ -31,7 +32,9 @@ interface MobileMapPageProps {
mapData: MapData;
pois: POI[];
activeOverlays: Set<OverlayId>;
activeCrimeTypes: Set<string>;
basemap: BasemapId;
colorOpacity: number;
mapViewFeature: string | null;
filterRange: [number, number] | null;
viewSource: 'drag' | 'eye' | null;
@ -51,6 +54,7 @@ interface MobileMapPageProps {
currentLocation: { lat: number; lng: number } | null;
actualListings: ActualListing[];
actualListingsEnabled: boolean;
actualListingsLoading: boolean;
onToggleActualListings?: () => void;
travelTimeEntries: TravelTimeEntry[];
bottomScreenInset: number;
@ -81,7 +85,9 @@ export function MobileMapPage({
mapData,
pois,
activeOverlays,
activeCrimeTypes,
basemap,
colorOpacity,
mapViewFeature,
filterRange,
viewSource,
@ -101,6 +107,7 @@ export function MobileMapPage({
currentLocation,
actualListings,
actualListingsEnabled,
actualListingsLoading,
onToggleActualListings,
travelTimeEntries,
bottomScreenInset,
@ -138,7 +145,9 @@ export function MobileMapPage({
usePostcodeView={mapData.usePostcodeView}
pois={pois}
activeOverlays={activeOverlays}
activeCrimeTypes={activeCrimeTypes}
basemap={basemap}
colorOpacity={colorOpacity}
onViewChange={mapData.handleViewChange}
viewFeature={mapViewFeature}
colorRange={mapData.colorRange}
@ -163,7 +172,6 @@ export function MobileMapPage({
actualListings={actualListings}
bounds={mapData.bounds}
hideLegend
hideLocationSearch={mobileDrawerOpen && !!selectedHexagonId}
travelTimeEntries={travelTimeEntries}
bottomScreenInset={bottomScreenInset}
/>
@ -177,10 +185,15 @@ export function MobileMapPage({
onClick={onToggleActualListings}
className={`rounded-lg bg-white p-2 shadow-lg dark:bg-warm-800 ${actualListingsEnabled ? 'text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300' : 'text-warm-500 hover:text-red-600 dark:text-warm-400 dark:hover:text-red-400'}`}
aria-pressed={actualListingsEnabled}
aria-busy={actualListingsLoading}
aria-label={actualListingsEnabled ? 'Hide actual listings' : 'Show actual listings'}
title={actualListingsEnabled ? 'Hide actual listings' : 'Show actual listings'}
>
<HouseIcon className="h-5 w-5" />
{actualListingsLoading ? (
<SpinnerIcon className="h-5 w-5 animate-spin" />
) : (
<HouseIcon className="h-5 w-5" />
)}
</button>
)}
<button
@ -200,7 +213,7 @@ export function MobileMapPage({
</div>
{overlayPaneOpen && (
<div className="absolute top-24 right-3 left-3 z-20 flex h-[260px] min-h-0 flex-col overflow-hidden rounded-lg border border-warm-200 bg-white shadow-xl dark:border-warm-700 dark:bg-warm-900">
<div className="absolute top-24 right-3 left-3 z-20 flex max-h-[60dvh] min-h-0 flex-col overflow-hidden rounded-lg border border-warm-200 bg-white shadow-xl dark:border-warm-700 dark:bg-warm-900">
{overlayPane}
</div>
)}