Skip to content

Commit acb08c0

Browse files
Kjubikstronkclaude
andcommitted
Fix the app shell on phones, and stop the button eating list content
Three bugs, two of them the same mistake in different places. The shell was min-h-[100svh], so anything marginally too tall grew the page and the whole document scrolled. On a phone that also collapses the browser toolbar mid-scroll, which resizes the viewport and reflows everything — the "window resizes and it's a mess". An app shell should be exactly the viewport and never scroll; the panes inside it scroll. Now h-[100svh] with overflow-hidden, plus the min-h-0 that flex children need in order to actually shrink. The map used h-full — a percentage height resolved against a flex-basis parent, which is unreliable on mobile Safari. The container came out zero-height and Google had nothing to render into, so the map simply didn't appear. It's absolutely positioned against its already-relative pane now, which is unambiguous. And the floating "+ new date" button sat on top of the last card in any scrolling list. Every pane it can float over now reserves space beneath its content so the list scrolls clear of it. Verified at 375: page height exactly 812, no overflow either axis, map pane 649px tall, 44px clearance under the last card. At 1400: three panes, no overflow, 70px clearance. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent f350889 commit acb08c0

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎src/components/DateMap.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function LiveMap(props: Props) {
127127
// pixel design, and landed on top of our locate button. Scroll and
128128
// pinch both still zoom.
129129
disableDefaultUI
130-
className="h-full w-full"
130+
className="absolute inset-0"
131131
>
132132
{placed.map((it) => (
133133
<AdvancedMarker
@@ -456,7 +456,7 @@ function MapFallback(props: Props) {
456456
}, [placed])
457457

458458
return (
459-
<div className="relative h-full w-full overflow-hidden bg-[var(--color-paper)]">
459+
<div className="absolute inset-0 overflow-hidden bg-[var(--color-paper)]">
460460
<div
461461
aria-hidden="true"
462462
className="absolute inset-0 opacity-40"

‎src/components/Device.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ type Props = {
1919

2020
export default function Device({ children, status }: Props) {
2121
return (
22-
<div className="safe-frame flex min-h-[100svh] flex-col sm:p-6 lg:p-8">
23-
<div className="device boot mx-auto flex w-full max-w-6xl flex-1 flex-col overflow-hidden">
22+
<div className="safe-frame flex h-[100svh] flex-col overflow-hidden sm:p-6 lg:p-8">
23+
<div className="device boot mx-auto flex w-full min-h-0 max-w-6xl flex-1 flex-col overflow-hidden">
2424
{/* Status bar — the printed legend across the top of the case. */}
2525
<header className="flex items-center justify-between gap-3 px-3 py-2 sm:px-4 sm:py-3">
2626
<div className="flex items-center gap-2">
@@ -33,7 +33,7 @@ export default function Device({ children, status }: Props) {
3333
</header>
3434

3535
{/* The recessed display. */}
36-
<div className="screen m-2 mt-0 flex flex-1 flex-col overflow-hidden sm:m-3 sm:mt-0">
36+
<div className="screen m-2 mt-0 flex min-h-0 flex-1 flex-col overflow-hidden sm:m-3 sm:mt-0">
3737
{children}
3838
</div>
3939
</div>

‎src/screens/Home.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default function Home() {
126126
const dayEntries = selected ? (byDay.get(selected) ?? []) : []
127127

128128
const calendarPane = (
129-
<div className="flex min-h-0 flex-col overflow-y-auto">
129+
<div className="flex min-h-0 flex-col overflow-y-auto pb-28">
130130
<Calendar
131131
month={month}
132132
onMonthChange={setMonth}
@@ -191,7 +191,7 @@ export default function Home() {
191191
{calendarPane}
192192
</div>
193193
{mapPane}
194-
<div className="w-64 shrink-0 overflow-y-auto border-l-[3px] border-[var(--color-ink)]">
194+
<div className="w-64 shrink-0 overflow-y-auto border-l-[3px] border-[var(--color-ink)] pb-28">
195195
{ideasPane}
196196
</div>
197197
</div>
@@ -203,7 +203,7 @@ export default function Home() {
203203
{view === 'calendar' && calendarPane}
204204
{view === 'map' && mapPane}
205205
{view === 'ideas' && (
206-
<div className="min-h-0 flex-1 overflow-y-auto">{ideasPane}</div>
206+
<div className="min-h-0 flex-1 overflow-y-auto pb-28">{ideasPane}</div>
207207
)}
208208
</div>
209209
<TabBar view={view} onChange={setView} />

0 commit comments

Comments
 (0)