From a4f1c1130824e7744fff4145141cfa43111596bb Mon Sep 17 00:00:00 2001 From: Scout Knight-Pheng Date: Wed, 25 Feb 2026 19:52:18 -0800 Subject: [PATCH 1/2] fix: control buttons render to the correct places --- .../components/features/map/MapFilters.tsx | 6 +- .../src/components/map/MapContainer.tsx | 111 ++++++++++++------ 2 files changed, 81 insertions(+), 36 deletions(-) diff --git a/frontend/calpoly-map/src/components/features/map/MapFilters.tsx b/frontend/calpoly-map/src/components/features/map/MapFilters.tsx index 3be8434..de039d7 100644 --- a/frontend/calpoly-map/src/components/features/map/MapFilters.tsx +++ b/frontend/calpoly-map/src/components/features/map/MapFilters.tsx @@ -23,6 +23,7 @@ type Props = { onAmenityTypesChange: (ids: string[]) => void; buildingOptions: BuildingFilterOption[]; amenityOptions: AmenityFilterOption[]; + onPanelLayout?: (height: number) => void; }; export function MapFilters({ @@ -34,6 +35,7 @@ export function MapFilters({ onAmenityTypesChange, buildingOptions, amenityOptions, + onPanelLayout, }: Props) { const buildingSet = useMemo(() => new Set(buildingTypeIds), [buildingTypeIds]); const amenitySet = useMemo(() => new Set(amenityTypeIds), [amenityTypeIds]); @@ -42,7 +44,9 @@ export function MapFilters({ return ( - + onPanelLayout?.(e.nativeEvent.layout.height)}> Map Style (0); + const [filtersPanelHeight, setFiltersPanelHeight] = useState(0); const windowHeight = Dimensions.get("window").height; const controlsAnimatedStyle = useAnimatedStyle(() => { @@ -499,6 +500,7 @@ export function MapContainer({ onAmenityTypesChange={setAmenityTypeIds} buildingOptions={buildingOptions} amenityOptions={amenityOptions} + onPanelLayout={setFiltersPanelHeight} /> {(hasLoading || errorMessage) && ( @@ -529,49 +531,83 @@ export function MapContainer({ )} {navigationMode ? ( - + <> + + + + + handleZoom(1)} + style={styles.zoomButton} + > + + + + + + handleZoom(-1)} + style={styles.zoomButton} + > + + + + + + + ) : ( - + <> + + + + + + handleZoom(1)} + style={styles.zoomButton} + > + + + + + + handleZoom(-1)} + style={styles.zoomButton} + > + + + + + + + )} - - - - - handleZoom(1)} - style={styles.zoomButton} - > - - - - - - handleZoom(-1)} - style={styles.zoomButton} - > - - - - - Date: Wed, 25 Feb 2026 19:52:45 -0800 Subject: [PATCH 2/2] fix: routing open sheet input focuses when opened --- .../src/components/features/search/SearchPanel.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/calpoly-map/src/components/features/search/SearchPanel.tsx b/frontend/calpoly-map/src/components/features/search/SearchPanel.tsx index b8d6f90..d278132 100644 --- a/frontend/calpoly-map/src/components/features/search/SearchPanel.tsx +++ b/frontend/calpoly-map/src/components/features/search/SearchPanel.tsx @@ -61,6 +61,7 @@ export function SearchPanel({ cameraMove, cameraFitRoute, bottomSheetPosition }: const routingSearchSheetRef = useRef(null); const routeStartInputRef = useRef(null); const routeEndInputRef = useRef(null); + const routingSearchInputRef = useRef(null); const snapPoints = useMemo(() => ["27%", "35%", "55%", "75%"], []); const routingSearchSnapPoints = useMemo(() => ["85%"], []); @@ -154,6 +155,8 @@ export function SearchPanel({ cameraMove, cameraFitRoute, bottomSheetPosition }: const openRoutingSearchSheet = useCallback( (field: "start" | "end") => { const value = field === "start" ? startValue : endValue; + routeStartInputRef.current?.blur(); + routeEndInputRef.current?.blur(); setActiveField(field); setSearchQuery(value); setFocused(true); @@ -161,6 +164,10 @@ export function SearchPanel({ cameraMove, cameraFitRoute, bottomSheetPosition }: requestAnimationFrame(() => { routingSearchSheetRef.current?.snapToIndex(0); + sheetRef.current?.snapToIndex(3); + setTimeout(() => { + routingSearchInputRef.current?.focus(); + }, 120); }); }, [endValue, setSearchQuery, startValue], @@ -537,6 +544,7 @@ export function SearchPanel({ cameraMove, cameraFitRoute, bottomSheetPosition }: placeholder="Starting point" value={startValue} clearButtonMode="always" + showSoftInputOnFocus={false} onFocus={() => openRoutingSearchSheet("start")} onChangeText={(text) => { setStartValue(text); @@ -555,6 +563,7 @@ export function SearchPanel({ cameraMove, cameraFitRoute, bottomSheetPosition }: autoCapitalize="none" autoCorrect={false} value={endValue} + showSoftInputOnFocus={false} onFocus={() => openRoutingSearchSheet("end")} onChangeText={(text) => { setEndValue(text); @@ -683,6 +692,7 @@ export function SearchPanel({ cameraMove, cameraFitRoute, bottomSheetPosition }: