Skip to content

Port picker language icons, reference spacing fixes, and menus and type for every display - #332

Merged
tony merged 7 commits into
mainfrom
feat/port-picker-language-icons
Nov 18, 2026
Merged

tony merged 7 commits into
mainfrom
feat/port-picker-language-icons

Conversation

@tony

@tony tony commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Shows each language's own icon in the port picker rows again, at the size the row artwork had before, and stops the panel from being 32rem wide on pages whose rows are only names. OCaml, Common Lisp and Raku get their own marks; until now their language icon was the libtmux tile.

Why

Adoption step 35 (design record 0030, fe7ff6102) shrank the rows' libtmux marks to 20px and widened the panel to 32rem on every page. On a port home the rows are names only, so each row became about 240px wide, and 20px marks that differ only in colour don't tell languages apart. Design records 0068 and 0070 (libtmux/design, adoption step 45) settle the fix.

What changes

Reference spacing fixes

Found on Perl's Workspace Manager reference, and general to every port:

  • ApiMemberList.astro: a member row's hidden legacy anchors came before its head span, so the rules that space the kind mark from the name (.api-member-list li > span:first-child) never matched and the "m" touched the name (LibTmux::Workspace::X::Config). Anchors now follow the head; the gap is 8px again.
  • ApiEntry.astro and apiMethodHasContent: a lone method that repeats its declaration no longer draws an empty "Methods" heading (matched_ids); its anchor and inventory attributes stay, and the outline drops the entry.
  • PageEnd.astro: a page end holding only the up row no longer draws a dashed rule under its solid border.

Every display and orientation

Design record 0071 (libtmux/design, adoption step 46). An audit of libtmux.org at ten displays (360 × 740 to 3840 × 2160, portrait and landscape; ten pages each, in Firefox) found no sideways scrolling, but nothing growing past 1280px (16px text and a 512px language panel at 4K), a 336px strip of panel on landscape phones, and 25 controls under 44px on a 1024 × 768 tablet.

  • Large displays: global.css sets the root to clamp(1rem, 1rem + (100vw - 120rem) / 480, 1.25rem): 16px to 1920px, 17.3px at 2560, 19.2px at 3440, 20px from 3840. Every rem size grows with it; the 76 px font sizes and the reroll button's px heights move to rem at the same base size.
  • Menus by display: documentation-navigation.ts picks a mode on open from PANEL_QUERIES: a bottom sheet on phones in portrait (full width, up to 85dvh, grab bar, pinned search), a side sheet on short landscape screens (full height from the trigger's side), the popover elsewhere. Sheets get the scrim backdrop, lock page scroll and close on a backdrop tap; entrances are 120ms (popover) and 200ms (sheets) and skipped under reduced motion. SearchModal is full screen on phones and short screens.
  • Touch: under pointer: coarse, picker rows, triggers and home buttons reach --touch-target at any width, and the header's chips, scheme button and wordmark take a touch-target-tall hit area without growing the bar.
  • Small text: labels set under 0.75rem rise to it, except glyphs in fixed boxes; the vendored gp-sphinx stylesheet and the demo pages are unchanged.

Verification

  • Dev server (LIBTMUX_DOCS_PORT=rs): on the Rust home the panel is 380px with 26px icons, all 23 loaded; on pane.Pane it is 512px with the "Differs" lines; dark theme inverts the Rust row icon like the trigger; no horizontal overflow.
  • vitest run test/design-tokens.test.ts test/branding.test.ts: 91 passed (the branding test checks each icon's SHA-256 against its provenance); with the spacing fixes, design-tokens, api-signature-scope, chrome-page-end and branding: 117 passed.
  • Dev server (LIBTMUX_DOCS_PORT=perl): the Config member rows have an 8px mark gap; matched_ids has no Methods heading or outline entry, its method anchor remains; a page end with only the up row computes no top border on the row.
  • Full site vitest: 12,103 passed, 1 failed: tmux-usage-raku.outer.test.ts (the Raku source scanner), which this change doesn't touch.
  • pnpm test:medium is cancelled by its 10s budget on this host (10.8s even at 8 cores) while running packages/api-model's suite; the suites pass when run without the deadline.
  • Displays (Chromium on the dev server, Perl, 4 pages × 10 displays, touch emulated on phones and tablets): bottom sheet 390 × 717 on a phone, side sheet 448 × 390 on a landscape phone, popover from the tablet up; root 17.3px at 2560, 19.2px at 3440 and 20px at 3840 with the panel growing from 380 to 475px; no horizontal overflow. Header controls take taps 6px outside their drawn box on touch screens and not on desktop.
  • Full site vitest with these changes: 12,105 passed; api-prose-fields and the Julia reference-page-links outer case failed under the parallel run and pass alone; tmux-usage-raku.outer fails as before. The workspace picker suite (64) passes once its page inlines lib/breakpoints.ts.

tony added 5 commits November 17, 2026 16:30
why: The language selector identifies every port by its language's own
mark except these three, whose icon.svg has been the libtmux library tile
since each port was added. Design record 0070 sources a mark for each.
what:
- ocaml: colour-icon.svg from ocaml/ocaml-logo at 1892364, unmodified
  (Unlicense)
- raku: Camelia.svg from Raku/doc-website at 7f0554a, unmodified, with the
  Artistic License 2.0 text as LICENSE.txt (copyright 2009 Larry Wall;
  Camelia is his trademark, labelled only when used as a page's main logo)
- lisp: Conrad Barski's public-domain Lisp alien, its empty A4 canvas
  cropped to the drawing; lisplogo_alien.svg keeps the original
- provenance.json for each, in the existing schema: pinned source, page,
  retrieval time, served-file SHA-256, terms, modifications, and the
  retained source copy for lisp
- meta/third-party-notices: rows for the three, and Common Lisp beside
  Scala as a cropped copy
…icker

why: Adoption step 35 (design record 0030) shrank the rows' libtmux marks
to 20px and widened the panel to 32rem on every page. On a port home, whose
rows are names only, each row became about 240px wide, and 20px marks that
differ only in colour do not tell the languages apart. Design record 0068
puts the language's own icon in each row at 26px and widens the panel only
for rows that carry a second line.
what:
- Rows draw /brand/languages/<slug>/icon.svg at 26px in place of the
  libtmux mark at 20px; the tmux CLI row's logo is 26px too
- The trigger's Python offset, dark-theme Rust inversion and forced-colors
  plate now cover the row icons
- The panel keeps the shared 23.75rem picker width unless a row shows an
  API among several or its differences (data-details), which widens it to
  32rem
- design-tokens test and check-home-launcher assert the new rows
…rk keeps its gap

why: The rules that space a member's kind mark from its name, set it on the
name's baseline and fill it on hover select `.api-member-list li >
span:first-child`. Rows with legacy anchors emitted those hidden anchor
spans first, so on pages such as Perl's LibTmux::Workspace::X::Config the
"m" mark touched the name.
what:
- Emit a row's hidden anchors after its head span
- design-tokens test: the head span comes before the anchors
…peats its declaration

why: A single-signature method with no prose, extension or separate source
rendered a "Methods" heading over an empty entry, as on Perl's
LibTmux::Workspace::X::Config::matched_ids.
what:
- apiMethodHasContent says whether a method entry shows anything beyond
  the declaration
- ApiEntry keeps the entries' anchors and inventory attributes but renders
  the heading only when one has content; the page outline follows
- api-signature-scope test covers both cases
… up row

why: With no previous, next or related groups, the page end drew its solid
top border and then the up row's dashed border with nothing between them.
what:
- The up row drops its dashed border and padding when it is the page
  end's first child
- design-tokens test pins the rule
@tony tony changed the title Show each language's icon in the port picker, and give OCaml, Common Lisp and Raku their own Show each language's icon in the port picker, give OCaml, Common Lisp and Raku their own, and fix reference spacing Nov 17, 2026
tony added 2 commits November 17, 2026 18:19
why: Every picker opened as a popover under its trigger on every display,
so a landscape phone squeezed the language panel into a 336px strip under
the header, and a phone in portrait got an anchored box. Design record
0071 opens menus by display: a bottom sheet on phones in portrait, a side
sheet on short landscape screens, the popover elsewhere.
what:
- lib/breakpoints.ts: BP.large, SHORT and PANEL_QUERIES, beside the
  existing breakpoints
- documentation-navigation.ts: on open, a picker sets data-panel-mode from
  PANEL_QUERIES and data-panel-side from its trigger; sheets leave
  placement to CSS, lock page scroll (html[data-sheet-open]) and close on
  a tap on their backdrop; without matchMedia a picker stays a popover
- documentation-picker.css: the bottom sheet (full width, up to 85dvh,
  grab bar, safe-area padding), the side sheet (full height, min(28rem,
  70vw), from the trigger's side), the scrim backdrop, a pinned search,
  120ms and 200ms entrances that reduced motion skips, and touch-size rows,
  triggers and home buttons under pointer: coarse at any width; its four
  sub-12px labels rise to 0.75rem
- SearchModal: full screen below bp-phone and on short landscape screens
- Tests: the breakpoint queries, sheet versus popover on open and close,
  and the workspace picker page now inlines lib/breakpoints.ts before the
  navigation script, as its helper expects
…pe in rem

why: Measured on libtmux.org at ten displays, nothing grew past 1280px: the
root stayed 16px and the language panel 512px wide on a 3840px screen, and
API pages carried up to 168 visible labels under 12px. Design record 0071
scales the root from 1920px, keeps text at 12px or more, and gives touch
screens full-size targets.
what:
- tokens.css: bp-large (120rem) and bp-short (30rem tall)
- global.css: the root is clamp(1rem, 1rem + (100vw - 120rem) / 480,
  1.25rem), 16px to 1920px and 20px from 3840px, so every rem size grows
- 76 px font sizes and shorthands in 13 files, and the reroll button's px
  heights, move to rem at the same base size, so they grow too
- Text set below 0.75rem rises to it, except glyphs drawn in fixed boxes
  (the player's step numbers, panel badges); the vendored gp-sphinx
  stylesheet and the demo pages keep theirs
- Under pointer: coarse, the header's chips, scheme button and wordmark
  keep their drawn size and take a touch-target-tall hit area (::before,
  since the external-link rule owns ::after)
@tony tony changed the title Show each language's icon in the port picker, give OCaml, Common Lisp and Raku their own, and fix reference spacing Port picker language icons, reference spacing fixes, and menus and type for every display Nov 18, 2026
@tony
tony merged commit f772074 into main Nov 18, 2026
1 check failed
@tony
tony temporarily deployed to docs-preview-cleanup November 18, 2026 00:33 — with GitHub Actions Inactive
tony added a commit that referenced this pull request Nov 18, 2026
… as happy-dom's

why: The sheet-mode test from #332 cast its matchMedia stub to
the DOM library's MediaQueryList, which astro check rejects against
happy-dom's Window.matchMedia; the error failed main's test job at
f772074 and every branch based on it.
what:
- Cast the stub to ReturnType<typeof win.matchMedia>
tony added a commit that referenced this pull request Nov 18, 2026
… as happy-dom's

why: The sheet-mode test from #332 cast its matchMedia stub to
the DOM library's MediaQueryList, which astro check rejects against
happy-dom's Window.matchMedia; the error failed main's test job at
f772074 and every branch based on it.
what:
- Cast the stub to ReturnType<typeof win.matchMedia>

(cherry picked from commit 740e1e0)
tony added a commit that referenced this pull request Nov 18, 2026
…its drawn height

why: #332 gave every picker trigger a touch-target min-height below the
phone breakpoint. In the header that row wraps under the bar at 35rem,
so the bar grew past the 97px the responsive-header check allows at
390px, and the docs test job failed on #331.
what:
- The compact and coarse min-height skips the header's trigger
- Under pointer: coarse the header's trigger takes the same hit-area
  pseudo-element as the header's chips, so its tap is 44px tall while
  the bar keeps its height
tony added a commit that referenced this pull request Nov 18, 2026
…its drawn height

why: #332 gave every picker trigger a touch-target min-height below the
phone breakpoint. In the header that row wraps under the bar at 35rem,
so the bar grew past the 97px the responsive-header check allows at
390px, and the docs test job failed on #331.
what:
- The compact and coarse min-height skips the header's trigger
- Under pointer: coarse the header's trigger takes the same hit-area
  pseudo-element as the header's chips, so its tap is 44px tall while
  the bar keeps its height
tony added a commit that referenced this pull request Nov 18, 2026
why: Since #332, pickers open as a bottom sheet on phones in portrait and
a side sheet on short landscape screens (design record 0071). Two
browser checks still assumed a popover: the picker-filters check wanted
7px from every edge at 320 x 360, where the sheet meets the edges by
design, and the header-menu check closed a picker by clicking its
trigger, which the sheet covers.
what:
- check-picker-filters: bounds reads the panel mode and keeps the 7px
  inset for popovers only
- check-header-menu-sections: a sheet closes with Escape; a popover still
  closes from its trigger
tony added a commit that referenced this pull request Nov 18, 2026
why: Since #332, pickers open as a bottom sheet on phones in portrait and
a side sheet on short landscape screens (design record 0071). Two
browser checks still assumed a popover: the picker-filters check wanted
7px from every edge at 320 x 360, where the sheet meets the edges by
design, and the header-menu check closed a picker by clicking its
trigger, which the sheet covers.
what:
- check-picker-filters: bounds reads the panel mode and keeps the 7px
  inset for popovers only
- check-header-menu-sections: a sheet closes with Escape; a popover still
  closes from its trigger
tony added a commit that referenced this pull request Nov 18, 2026
…ng and ocaml (#331)

why: perl, raku, erlang and ocaml added "What is on here" capability
directories to their Session, Window and Pane types (libtmux-perl#24,
libtmux-raku#19, libtmux-erlang#24, libtmux-ocaml#18). These four publish
from the revision of the committed API model, so the directories, and
perl's examples without the test-only LIBTMUX_TEST_TMUX, reach
libtmux.org only once that data is regenerated at each port's head.

what:
- Regenerate perl, raku, erlang and ocaml source-bound data at
  1f8332193, cce868d81, 48aacd01a and 1611f141a
- Map OCaml's options, panes and clients showcases; run the OCaml and
  Raku exporters from their new paths, falling back to the old ones
- Keep the header's language trigger its drawn height, type the
  matchMedia stub, and let the picker checks meet bottom and side sheets
  (follow-ups to #332's phone sheets)

This branch was previously deployed

1 inactive deployment
docs-preview-cleanup — 400b220e Deployed Nov 18, 2026 by tony via cleanup #257
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