Skip to content

fix: follow the system text size on mobile - #52

Merged
veelenga merged 8 commits into
whatmakesittick:mainfrom
andrewforester:fix/system-text-size
Oct 17, 2026
Merged

veelenga merged 8 commits into
whatmakesittick:mainfrom
andrewforester:fix/system-text-size

Conversation

@andrewforester

Copy link
Copy Markdown
Collaborator

Summary

On a phone with a larger system text size the site stayed at the default size. Now it follows the system setting, and pages stay usable at large sizes.

  • System text size. On iPhone and iPad, followSystemTextSize (src/core/ui/textSize.ts) reads the Dynamic Type body size and scales the root font. The default size gives 100%, so nothing changes for most readers. Desktops are skipped, since there the system body font is a fixed 13px. On Android, <meta name="text-scale" content="scale"> lets Chrome apply the OS text scale.
  • Scene labels use rem, so they grow with the text. Label placement already measures each label, so it adapts.
  • No horizontal scroll at large sizes. Long words wrap. The masthead row, slider headers, slider scales, readout rows, chips and prose lists wrap or shrink instead of widening the page. The "more explainers" cards and the about steps were the worst cases, mostly in Ukrainian and German.
  • Chips grow with wrapped text. On touch screens the explainers gave chips a fixed height: 44px, so a label that wrapped to two lines spilled out of the chip. It is now min-height: 44px in all 16 explainers. Multi-line chips read from the start, with tighter line spacing.

At the default text size the layout is unchanged on desktop and on mobile.

Canvas charts keep their current text size. Scaling them pushed /uk/naval-drone/ over the JavaScript budget, which it already sits at, so that is left for later.

Tests

  • New e2e/largeText.spec.ts: on the phone project at a 235% root font, every page (catalogue, about, every explainer) in English, German and Ukrainian must not scroll sideways, and no button text may be taller than its button. On the styles from before this change it fails on every page. With this change all 63 pass.
  • npm run lint, npm test, npm run build and the smoke and large text e2e suites pass.

🤖 Generated with Claude Code

andrewforester and others added 7 commits October 17, 2026 14:28
Scale the root font by the iOS Dynamic Type body size, opt into Android OS text scaling with the text-scale meta tag, and let the masthead row wrap when larger text no longer fits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Let long words, slider headers, readout rows, chips and prose lists wrap or shrink instead of widening the page, and add an e2e check for horizontal overflow at a large system text size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On touch screens the chips had a fixed 44px height, so wrapped labels spilled out at large text sizes. Use it as a minimum instead, and check in the large text e2e that no button text is taller than its button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@veelenga

Copy link
Copy Markdown
Member

Please confirm this is ready to merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrewforester

Copy link
Copy Markdown
Collaborator Author

Checked and fixed on the Tesla Roadster as well. It's ready to merge.

@andrewforester andrewforester self-assigned this Oct 17, 2026
@veelenga
veelenga merged commit 9be30ad into whatmakesittick:main Oct 17, 2026
1 check 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.

2 participants