Skip to content

Give a phone in landscape the nine overlays it could not reach - #1027

Merged
zkWizard merged 5 commits into
mainfrom
codex/uiux-landscape-overlays-20260818-0556
Aug 18, 2026
Merged

Give a phone in landscape the nine overlays it could not reach#1027
zkWizard merged 5 commits into
mainfrom
codex/uiux-landscape-overlays-20260818-0556

Conversation

@zkWizard

Copy link
Copy Markdown
Owner

A phone held in landscape reached none of the nine map overlays

Visible: hold a phone in landscape (or open the site at 844x390) and the
overlay toggles — borders, cities, earthquakes, volcanoes, plate boundaries,
the graticule, the atmosphere, HD tiles and "my location" — move from a 15px
sliver of vertical bar on the right edge, where none of the nine could be
tapped
, to the bottom app bar this app already uses on phones, where all
nine are tappable without a swipe
. The HUD panel opens folded at these sizes,
so the middle of the view is the globe rather than the panel, and the panel's
own top edge is on screen instead of above it.

The defect

The overlay bar is a vertical column capped so centring always clears the
top-right buttons, and a toggle stands 60.6px, so the column shows its first
one only above 460px of height. A phone in landscape is 360–430px tall, so the
cap resolved to 0px of column at 390, 375 and 360 and to 30px at 430 —
leaving a sliver of bar still wearing the fade that advertises more items this
way. A hit test across all nine reached 0 of 9 at 844x390, 932x430, 740x360
and 667x375.

Nothing else on screen substitutes: the layer selector in the HUD chooses the
base data layer, and these nine are on this bar alone. So the set was
unreachable rather than merely cramped, in the orientation a globe invites.

Why it had not shipped, and what pays for it

docs/BACKLOG.md had named the fix — trigger the existing ≤540px bottom-bar
layout on short viewports too — and the reason it was filed rather than shipped:
the vertical budget. Expanded, the panel is 266px against a 360–430px viewport,
so the 3.6rem the bar reserves pushed the panel's own top to −33px at 740x360
and −18px at 667x375, taking the fold control with it and leaving no way back.

So the height arm goes on both halves. The bar takes over below 460px, and
below the same 460px the panel opens folded — the second and smaller
decision #1023 left open, made in the narrowest form it can be: only where the
expanded panel does not fit the window at all, and nowhere else.

No scientific content is behind the default. Folding keeps the layer
selector and the provenance line, so the product ID and the month
(MODIS_Terra_L3_NDVI_Monthly · Jul 2026) are rendered in the default state;
the space comes from the colour ramp and the timeline, both one tap away. This
is the same property #1023 shipped the fold on.

Rotating into landscape is treated as the same event as booting into it, since
it arrives at the same off-screen panel; rotating back out leaves the reader's
own choice alone.

Measured

before after
overlays reachable (all four sizes) 0 of 9 9 of 9
bar scroll width vs client width column, clipped equal — no swipe needed
panel top: 844x390 / 932x430 / 740x360 / 667x375 28 / 68 / −33 / −18 228 / 268 / 182 / 197
centre of view hit-tests to controls globe
fold control on screen no (clipped at two sizes) yes, 44px coarse-pointer box

Unchanged above the gate, which is what the min-height: 461px arm on the
column rules buys: 1024x600 keeps exactly the column it has today (3 of 9,
flex-direction: column, panel expanded) and 1280x800 is untouched. 460/461 is
arithmetic — a toggle is 60.6px, so it is where the centred column stops showing
even one — and it sits clear of the 1024x600 netbook that
toolbar-height-continuity.spec.ts holds.

Verification

  • New e2e/landscape-overlays.spec.ts (13 tests): per-size hit test of all
    nine toggles, the panel-on-screen and citation-rendered assertions, the
    credits row hit test (the Give the phone credits line back its taps #983 defect class — the bar is pinned over that row
    here too, and all three links still take their own taps), and a guard that
    1024x600 keeps the column and an expanded panel.
  • e2e/hud-collapse.spec.ts repaired: its landscape test stated the defect
    as its premise (centre !== "globe" on boot) and folded by hand. That premise
    is what this PR removes, so it now asserts the round trip — unfold brings the
    panel back, fold returns the globe — and the layout it was standing in for
    moved to the new spec.
  • Full local e2e suite (chromium, CI=1) — layout-affecting change, so not
    just the new spec.
  • Unit 4768 / 316 files green; tsc --noEmit clean; prettier clean.
  • Bundle: entry chunk 51.9 kB gzip ok (from 51.7; the change is one
    matchMedia and a listener). Every chunk ok.
  • Screenshot at 844x390: all nine toggles in a row across the bottom, the folded
    panel showing the layer pill and the provenance line above them, globe centred.

Closes the landscape item in docs/BACKLOG.md (moved to Done in this PR). The
netbook-band item is left open and its remaining question restated: at 1024x600
the panel fits and merely covers the crosshair, so it is not this case.

🤖 Generated with Claude Code

zkWizard and others added 3 commits August 18, 2026 01:31
The overlay bar is a vertical column capped so that centring it always clears
the top-right buttons, and a toggle stands 60.6px, so the column shows its
first one only above 460px of height. A phone held in landscape is 360-430px
tall: the cap resolved to 0px of column at 390, 375 and 360 and to 30px at 430,
leaving a 15px sliver of bar still wearing the fade that says there is more
this way. A hit test across all nine toggles at 844x390, 932x430, 740x360 and
667x375 reached none of them.

Nothing else on screen substitutes. The layer selector in the HUD chooses the
base data layer, while borders, cities, earthquakes, volcanoes, plate
boundaries, the graticule, the atmosphere, HD tiles and "my location" are on
this bar alone, so the set was unreachable rather than merely cramped — in the
orientation a globe invites.

docs/BACKLOG.md named the fix and the reason it had not shipped: trigger the
existing bottom-bar layout on short viewports as well as narrow ones, which
restores nine of nine, but pay for it out of a vertical budget that is already
spent. Expanded, the panel is 266px against a 360-430px viewport, so the 3.6rem
the bar reserves pushed the panel's own top to -33px at 740x360 and -18px at
667x375 — taking the fold control with it and leaving no way back.

So the height arm goes on both halves. The bar takes over below 460px, and
below the same 460px the panel opens folded, which is the second and smaller
decision #1023 left open, made here in the narrowest form it can be: only where
the expanded panel does not fit the window at all, and nowhere else. What makes
it defensible is what folding keeps — the layer selector and the provenance
line — so the product ID and the month are rendered in the default state and no
citation sits behind a gesture. Rotating into landscape is treated as the same
event as booting into it, since it arrives at the same off-screen panel;
rotating back out leaves the reader's own choice alone.

The column rules carry the matching min-height, which is what keeps the two
layouts exclusive instead of letting the later one win. Measured after: nine of
nine reachable at all four sizes with the row's scroll width inside its client
width, panel tops of 228, 268, 182 and 197px, the fold control on screen at
each, and the centre of the view hit-testing to the globe. 1024x600 and every
taller viewport are unchanged.

hud-collapse.spec.ts's landscape test stated the defect as its premise and
folded by hand; it now asserts the round trip instead, and the layout it was
standing in for moved to landscape-overlays.spec.ts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The row is inline text, and CI's wider metrics wrap it where local metrics
do not. An <a> that straddles the wrap has a getBoundingClientRect union
spanning from where it starts on one line to where it ends on the next, so
its centre is the empty middle of the row — over the centred HUD panel.
That named "Open source" dead at 844x390 and "Give feedback" dead at
932x430 while every glyph of both was tappable on both of its lines.

Aiming at the centre of each line box instead, via getClientRects, reads
the same for the nine toggles (block-level, one rect each) and stays a true
negative for a control genuinely under the bar: such a control has no line
box that reaches it. Reproduced the CI wrap locally by widening the row's
letter-spacing; the union form failed at exactly the element that wrapped,
and the line form reaches all three at every width tried.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@zkWizard
zkWizard merged commit 0cf0da7 into main Aug 18, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant