Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/layout/ActiveProceduresOverlay.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.overlay {
position: absolute;
bottom: 48px;
/* On phones add --map-bottom-inset so the box clears the peeking bottom sheet. */
bottom: calc(48px + var(--map-bottom-inset, 0px));
left: 12px;
background: var(--overlay-bg);
border: 1px solid var(--overlay-border);
Expand Down
14 changes: 14 additions & 0 deletions src/components/layout/TopBar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@
text-transform: uppercase;
}

.brandShort {
display: none;
}

/* Phone: shrink the wordmark to "AM" so the top-bar controls keep room. */
@media (max-width: 640px) {
.brandFull {
display: none;
}
.brandShort {
display: inline;
}
}

.center {
flex: 1;
max-width: 400px;
Expand Down
8 changes: 7 additions & 1 deletion src/components/layout/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ import styles from './TopBar.module.css'
export function TopBar() {
return (
<header className={styles.topbar}>
<div className={styles.brand}>Approach Map</div>
<div className={styles.brand}>
{/* Collapses to "AM" on phones to free top-bar space for controls. */}
<span className={styles.brandFull}>Approach Map</span>
<span className={styles.brandShort} aria-hidden="true">
AM
</span>
</div>
<div className={styles.center}>
<AirportSearch />
</div>
Expand Down
22 changes: 19 additions & 3 deletions src/components/map/AppMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,13 @@ export function AppMap() {
{/* Bottom-right control stack: traffic filters above the altitude
filter. Anchored at the bottom (clearing the NavigationControl) so it
grows upward when the altitude filter shows its summary badge, keeping
a consistent gap between the two boxes. */}
a consistent gap between the two boxes. On phones the bottom offset
adds --map-bottom-inset so the stack clears the peeking bottom sheet. */}
<div
style={{
position: 'absolute',
right: 10,
bottom: 110,
bottom: 'calc(110px + var(--map-bottom-inset, 0px))',
zIndex: 10,
display: 'flex',
flexDirection: 'column',
Expand All @@ -229,12 +230,27 @@ export function AppMap() {
pointerEvents: 'none',
}}
>
<AxisZoomControls />
<PathControls />
<TrafficFilter />
<AltitudeFilter />
</div>

{/* Per-axis zoom cluster parked at the bottom-right, just left of the
mapbox NavigationControl (bottoms aligned), so the main control column
above stays short instead of running the full height of the map. */}
<div
style={{
position: 'absolute',
right: 48,
bottom: 'calc(10px + var(--map-bottom-inset, 0px))',
zIndex: 10,
display: 'flex',
pointerEvents: 'none',
}}
>
<AxisZoomControls />
</div>

<ActiveProceduresOverlay />

<RenderBudgetHint visibleCount={visibleProcedures.length} />
Expand Down
18 changes: 18 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,24 @@
box-sizing: border-box;
}

/* ── Mobile bottom-sheet inset ───────────────────────────────────────────── */
/* On phones (<=640px, the PANE_OVERLAY_BREAKPOINT_PX / deriveMode breakpoint)
the sidebar becomes a bottom sheet that peeks 44px above the bottom edge
(Sidebar.module.css .sheet). Bottom-anchored map overlays add
--map-bottom-inset to their offset so nothing hides behind the drawer. */
:root {
--map-bottom-inset: 0px;
}
@media (max-width: 640px) {
:root {
--map-bottom-inset: 44px;
}
/* Lift the mapbox NavigationControl cluster above the peeking bottom sheet. */
.mapboxgl-ctrl-bottom-right {
bottom: var(--map-bottom-inset);
}
}

html, body, #root {
margin: 0;
padding: 0;
Expand Down
Loading