Glossary on phones: only the search row stays pinned; 44 px controls; names wrap at 200%

Merged
LU
12d ago
+24-8

Three changes for visitors using the glossary on a phone, in every language.

  • Only the search row stays pinned while the terms scroll. Before, the whole toolbar stayed on screen: search, view buttons and three rows of letters, about 229 px or over a quarter of a 844 px screen. DESIGN.md §9 allows only the search row. The letters now scroll away with the page. The toolbar box gives way (display: contents) so that the search row can stick for the whole list. site.js measures whichever part is pinned, so a letter's heading still lands 12 px below it.

  • 44 px targets for the language links on term pages (were 38 px), Clear on the hub and in the side filter (29 to 39 px), and the Cards/List buttons (39 px).

  • Long names in the credits wrap at 200% text. Each name was set not to wrap, so at 390 px with text at 200%, "Charlotte R. Pennington" ran 22 px past the screen (§12). A name now moves to the next line whole, and wraps inside only when it is wider than the column.

  • The hub's language menu may shrink (min-width:0). At 390 px with text at 200%, the menu beside "Language" kept its full width and widened the page: by 62 px on the English hub, 40 px on the German and 7 px on the Arabic. No glossary hub now scrolls sideways at 375 or 390 px with doubled text.

Desktop is unchanged.

At 390 px, the Arabic hub after scrolling down (before, the letters stay pinned too)

Before:
before, 390 px

After:
after, 390 px

At 1440 px: unchanged, the whole toolbar pinned

1440 px

At 390 px with text at 200%, the credits of an Arabic term

Before (the name runs off the left edge):
before

After:
after

At 390 px with text at 200%, the English hub's language menu (before, it runs past the right edge)

Before:
before

After:
after

At 390 px, the language links on a Chinese term

Before:
before

After:
after

From the GPT reviewer in the hillclimb's third and fourth glossary rounds. It follows #1160, whose toolbar measurement it extends.

Decisions to review

  • The Cards/List buttons stay pinned with the search, because they share its row. Moving them out would add a separate row.
  • To reach other letters, phone visitors scroll back up, since the letters are no longer pinned.

Checks

  • python3 scripts/check_seo_html.py <build>: passed.
  • python3 -m unittest discover -s scripts/tests: 145 tests passed.
  • Arabic, Chinese and English hubs at 390, 761 and 1440 px: no script errors; a letter's heading lands 11 to 12 px below the pinned part; phone targets are at least 44 px. No sideways scroll on the two Arabic and two Chinese sample terms at 390 px with doubled text.

šŸ¤– Generated with Claude Code


Summary by cubic

Fixes the glossary on phones: only the search row stays pinned while terms scroll, touch targets grow to 44 px, and long contributor names wrap instead of running off screen.

Before, the full toolbar — search, view buttons, and three rows of letters — stayed pinned on phones, covering about a quarter of the screen. The letters now scroll away with the page, and the JS measures whichever part is pinned so letter headings still land 12 px below it. Language links, Clear buttons, Cards/List buttons, and the language select get 44 px targets. Contributor names wrap at 200% text size instead of overflowing the column, and the language menu may shrink so 200% text does not widen the page. Desktop is unchanged.

Notes for review

  • The Cards/List buttons stay pinned with the search because they share its row.
  • To reach other letters, phone visitors scroll back up, since the letters are no longer pinned.