Skip to content

Site: same-size keys, an icon theme toggle, a gliding hero word and a swap sound - #21

Merged
triptu merged 8 commits into
mainfrom
site/glyphs-and-sound
Nov 1, 2026
Merged

triptu merged 8 commits into
mainfrom
site/glyphs-and-sound

Conversation

@triptu

@triptu triptu commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

On Android, the hero's ← and → keys came out in two sizes. Our fonts don't have those characters, so each phone used its own fallback font. This PR fixes that and polishes the header and hero.

  • Arrows, ⌘, ⇧ and the Overflow caret are now small inline SVG icons. Every key is the same height.
  • scripts/check-site-glyphs.mjs walks the page in Chromium through every story step and panel. It checks each rendered character against the cmap of the woff2 file it's set in, and fails if any character is missing.
  • On touch screens the hero says "Tap the dotted word to try another." The other hints say tap instead of click.
  • Swapping a version (hero word, story word, sentence or AI pick) plays a soft wooden tap. It's synthesised, about 60 ms, peaks near -18 dBFS and varies pitch by ±3%. Taps are throttled to one per 60 ms. It plays only on the visitor's own swap, so there's no toggle.
  • The theme toggle is now icon-only: a sun in dark mode and a moon in light mode. It has an aria-label and a title, and is 44px on phones. Only the icon crossfades, in 160ms (no animation with reduced motion).
  • On a hero swap, the word's slot eases to the new width over 260ms, so "word." glides closer or farther. The underline and dots follow the slot. A swap during a swap continues from the current width. With reduced motion the swap is instant. Story spans keep their crossfade: they wrap across lines, so a width glide isn't cheap there.

Tested

  • node scripts/check-site-glyphs.mjs: every character is in its font. It found 6 missing before this change.
  • The earlier desktop and phone interaction suite in Chrome: 79/79 pass, no console errors.
  • 54 new checks in Chrome and Playwright WebKit pass:
    • Scrolling the story plays no sound; each visitor swap plays one tap.
    • Theme icon, label, title, size, focus ring and flip are right at desktop and phone, light and dark.
    • All keys at 390px are 20.84px tall, and ← and → are identical.
  • Hero glide frame strip at 25fps: the visible text stays at least 3.4px from "word." Under rapid swaps the width moves at most 9.8px per frame (one letter is 42.6px).

Not tested: real iPhone and Android devices. A separate check covers those next.

Hero swap frames
Header, WebKit phone dark
Header, Chromium phone light
Theme button focus ring
Keys in the phone caption

…them the same

Courier Prime and Reenie Beanie don't have these characters, so each phone fell back to its own font and sizes. Keys are now one height whatever they hold. The Lab count and install step use words instead of an arrow.
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
vikalp Ready Ready Preview Nov 1, 2026 3:28pm UTC

@triptu triptu changed the title Site: same-size keys on every device, and a sound for swaps Site: same-size keys, an icon theme toggle, a gliding hero word and a swap sound Nov 1, 2026
@triptu
triptu merged commit 0b6d198 into main Nov 1, 2026
4 checks passed
@triptu
triptu deleted the site/glyphs-and-sound branch November 1, 2026 15:29

This branch was successfully deployed

1 active deployment
Preview — d0d8b5c4 Deployed Nov 1, 2026 by vercel[bot]
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