Skip to content

Add the website, published to GitHub Pages, and its design tokens - #17

Merged
michaelaguiar merged 6 commits into
mainfrom
design/tokens-and-site
Nov 28, 2026
Merged

michaelaguiar merged 6 commits into
mainfrom
design/tokens-and-site

Conversation

@michaelaguiar

Copy link
Copy Markdown
Member

Adds the Alias Calc website at aliasproject.github.io/alias-calc. The design comes from the Website row of the Alias Calc design canvas.

What's in it

  • site/: the landing page, static HTML and CSS with no build step.
    • Sections: hero, benchmarks, features, themes and install.
    • Fonts: JetBrains Mono, self-hosted with its OFL licence.
    • copy.js adds the Copy buttons. Without JavaScript the commands are plain text.
    • The copy presents Alias Calc as a calculator for Linux. It names no other calculators, and mentions aliasOS only where that's a fact (theme support, the package).
    • Benchmark figures come from one bench/run --bin /usr/bin/alias-calc run of 0.1.2: 3.0 ms, 2.4 MiB PSS, 1 thread, 0.6 wakeups/s.
    • The calculator windows are drawn in HTML from the app's layout tokens. Each theme sample carries the colours Palette::new derives from that theme.
  • .github/workflows/pages.yml: publishes site/ when it changes on main. It can also be run by hand.
  • Design tokens:
    • design/tokens.json holds the design values. design/build (design-gen 2.1.0) writes them to site/tokens.css, and style.css uses those variables only.
    • 2.1.0 adds outputs.css, "only": "web", a family's css fallback, and lineHeight and letterSpacing on type styles. Run on the other four apps' tokens, it leaves their Rust and Swift output unchanged apart from the version in the header.
    • The app's Rust still holds its values as literals that must match the token file. Generating src/tokens.rs is a follow-up.
  • .github/workflows/design-tokens.yml: checks that site/tokens.css is current and that every contrast pair passes. It also runs the generator's fmt, clippy and tests.

Accessibility

  • All 16 contrast pairs in design/tokens.json pass WCAG 2.2 AA (design/build --check).
  • The theme samples use the colours the app derives, which hold 4.5:1 on their keys.
  • The page has:
    • a skip link and a visible focus ring;
    • 44 px minimum targets;
    • real headings, lists and a definition list for the figures;
    • text and alt labels on the window illustrations.
  • Text is sized in rem, so it follows the browser's font size.
  • The window illustrations keep their pixel size, and their text is clipped at 200% text. They're images with full alt text.

After the merge

  1. Pages is already set to deploy from GitHub Actions. The merge runs pages.yml, which publishes the site.
  2. Set the repository's website to https://aliasproject.github.io/alias-calc/.
  3. Change the description so it no longer says "for aliasOS".

site/ is the landing page for aliasproject.github.io/alias-calc: static
HTML and CSS with no build step, the self-hosted JetBrains Mono (OFL) and a
small script for the Copy buttons. It presents Alias Calc as a calculator
for Linux, quotes only its own benchmark figures (one bench/run table:
3.0 ms, 2.4 MiB, 1 thread, 0.6 wakeups/s) and draws the calculator windows
in HTML from the app's layout tokens. .github/workflows/pages.yml publishes
site/ when it changes on main.

design/tokens.json holds the design values, and design/build (design-gen
2.1.0, copied from the shared generator) writes them to site/tokens.css.
2.1.0 adds a CSS output, "only": "web" and a family's CSS fallback; the
other apps' Rust and Swift output is unchanged by it. The app's Rust still
holds its values as literals that must match the token file.
.github/workflows/design-tokens.yml checks the generated file and every
contrast pair.
…claims

From review:
- The hero window kept its 320 px width, so a 320-360 px screen scrolled
  sideways. It now shrinks to the column, and its result and expression
  shrink to the window's width (mono-advance, a new web token), as the
  app's do; that also keeps them inside it at 200% text.
- Copy took ./install.sh uninstall along with the install commands, so a
  paste installed and then removed it. Uninstall is now its own sentence.
- Every Copy button was named "Copy"; each now says what it copies. A
  second click no longer has the first click's timer reset it early, and
  "Couldn't copy" stays until the next click instead of 1.2 s.
- The screen reader card said support loads whenever a screen reader runs;
  it loads at launch, so the card says to start the screen reader first.
- "Rust 1.85 or newer" was unverified (no rust-version); it's now "a
  current stable Rust".
- design/README.md called tokens.json the only place values are defined,
  while the app repeats them as literals; it now says so up front.
  design/Cargo.toml is MIT, like the repo.
@michaelaguiar

Copy link
Copy Markdown
Member Author

Review round 1 (fresh-context reviewer, code-review high).

Fixed in 2f3008b

  • P2: Copy picked up ./install.sh uninstall along with the install commands. Uninstall is now a sentence of its own.
  • P2: the hero window didn't shrink, so a 320–360 px screen scrolled sideways. It now fits its column, and its result and expression shrink to the window's width (new web token mono-advance).
  • P2: the screen reader card said support loads whenever a screen reader runs. It loads at launch, so the card now says to start the screen reader first.
  • P3: every Copy button was named "Copy". Each now says what it copies. The reset timer is cleared on a second click, and "Couldn't copy" stays until the next click.
  • P3: the result overflowed at 200% text. Fixed by the same shrink-to-fit.
  • P3: design/Cargo.toml said UNLICENSED; it's now MIT. "Rust 1.85 or newer" wasn't backed by a rust-version, so the page now says "a current stable Rust".
  • P3: design/README.md called tokens.json the only place values are defined. It now says up front that the app's Rust repeats them as literals.

Declined

  • P3: literal hex colours in the theme samples and theme-color.
    • The four samples show other themes in the colours Palette::new derives from them. They are content, not the site's palette, so they don't belong in the token file. Every pair was computed and passes; the lowest is 4.97:1.
    • <meta name="theme-color"> can't read a CSS variable. It equals --background.
  • P3: hard-coded benchmark figures and version. They are the page's content. They come from one bench/run --bin /usr/bin/alias-calc run of 0.1.2 on this branch (map 3.0 ms, PSS 2.4 MiB, 1 thread, 0.6 wakeups/s). The README's 0.67/s is an older run. The README's Website section says to replace them all from a single new run.
  • P3: the tokens check doesn't watch src/**. Wiring the app to the tokens is the stated follow-up; until then nothing generated depends on src/.

Confirmed by the reviewer: the tokens check, tests, clippy and fmt pass; the Pages and tokens workflows and their action versions are right; and the page names no other calculator and no screen reader.

From review:
- At a 200% text size on a 320 px screen the page scrolled sideways: the
  card and figure grids had 18em and 13em minimums, and long words
  ("calculator.") didn't fit the column. The minimums now cap at the
  column, and a word that can't fit breaks.
- The window's result and expression fit 100cqi less the padding, but the
  container's width already excludes it, so they shrank more than needed.
- Hovering the focused skip link turned its text the colour of its fill.
- A Copy button's name didn't follow its visible text ("Copied"), and a
  second failed copy wasn't announced again.
- The keyboard card listed the on-screen glyphs (− × ÷), which most
  layouts can't type; it now lists - * x /. "Links only libc and
  libxkbcommon" was short of ldd, which also shows libm and libgcc_s.
@michaelaguiar

Copy link
Copy Markdown
Member Author

Review round 2 (fresh-context reviewer, code-review high), on 2f3008b. The reviewer confirmed that the round 1 fixes hold:

  • In a 320 px frame the hero window fits at 100% and 200% text.
  • The theme windows are unchanged.
  • The Copy filter, the timer and the failure message work as described.
  • The wording matches src/a11y.rs.

Fixed in the next commit

  • P2: at 200% text in a 320 px frame, the page scrolled sideways (scrollWidth 608). The card and figure grid minimums now cap at the column (min(18em, 100%)), and a long word breaks rather than overflowing (overflow-wrap: anywhere). Measured after the fix: every section's width equals the 305 px client width at 100% and at 200%.
  • P3: the window's text fit 100cqi less the padding. The container's width already excludes the padding, so it was subtracted twice.
  • P3: hovering the focused skip link made its text the same colour as its fill.
  • P3: a Copy button's accessible name didn't follow its visible text ("Copied"), which breaks Label in Name. A second failed copy also wasn't announced again.
  • P3: the keyboard card listed on-screen glyphs (− × ÷) that most layouts can't type; it now lists - * x /. "Links only libc and libxkbcommon" undersold ldd, which also shows libm and libgcc_s; it now reads "Besides the C runtime, it links only libxkbcommon."

Not acted on (unverified by the reviewer): the remaining code-review suggestions about forced-colors mode and literal em layout sizes.

  • In forced-colors mode the window illustration's outline goes, but each window is an image with full alt text.
  • The em sizes are layout proportions. They aren't design values.

…the way

From review:
- The four theme windows' result and expression had no character count,
  so they didn't shrink: at 200% text their leading digits were clipped.
- "Couldn't copy" was the button's label, and at about 200 px wide it
  covered the first command. The message is now a line under the block,
  shown only while there's something to say, and is set a moment after
  clearing so a repeat is announced again.
- The screen reader card now says "a supported screen reader": the app
  detects one by name, without the page naming it.
- The Light face (hero, result, figures) is preloaded with Regular.
@michaelaguiar

Copy link
Copy Markdown
Member Author

Review round 3 (fresh-context reviewer, code-review high), on 5973c2a. The reviewer confirmed these hold:

  • No horizontal scroll at 320 px or 360 px, at 100% or 200% text.
  • The hero result fits at every width tested.
  • overflow-wrap changes nothing at desktop width.
  • The skip link and the Copy names are right.
  • The keyboard and linking claims match the README and ldd.

Fixed in the next commit

  • P2: the four theme windows had no --chars, so at 200% text their result and expression didn't shrink and were clipped. Measured after the fix, in a 320 px frame at 200%: the text of all five windows is inside its window.
  • P3: the "Couldn't copy" label (about 200 px) covered the first command. The message is now a line under the code block, shown only while it has something to say.
  • P3: a repeated failure message might not be announced again. The status is now cleared, then set after a short delay.
  • P3: the screen reader card now says "a supported screen reader". The app detects the reader by name, and the page doesn't name it.
  • P3: the Light face, used by the hero, the result and the figures, is now preloaded along with Regular.

Declined

  • The benchmark dt labels such as "of memory while open". They are read in source order: the label, then its figure ("of memory while open, 2.4 MiB"). Only the visual order is reversed. The meaning comes through, and the visible reading stays the same.
  • The z-index and the em layout proportions, as declined before.

From review:
- The empty status was display: none, so it left the accessibility tree
  and appeared with its text in one step, which many screen readers don't
  announce. Empty, it's now taken out of the layout only.
- The 50 ms pause before a repeated message ran before the clipboard
  write, so a browser that wants the write inside the click could refuse
  it. The write now comes first.
Two clicks within the 50 ms pause each set a reset timer; the first was
lost and cleared the second's "Copied" early.
@michaelaguiar

Copy link
Copy Markdown
Member Author

Review rounds 4 and 5 were narrow, each covering only the previous round's fixes.

Round 4, on 0ee9ec9. The reviewer confirmed these hold:

  • the theme windows' --chars counts are right;
  • nothing clips or scrolls sideways at 320 px with 200% text;
  • the copy logic is unchanged;
  • the Light preload is in place;
  • .visually-hidden is no longer used anywhere.

Fixed in 9782100:

  • P2: the empty status had display: none, so the live region left the accessibility tree and many screen readers wouldn't announce it. When empty, it's now positioned absolutely: still in the tree, but out of the layout.
  • P3: the 50 ms pause came before the clipboard write, so a strict browser could refuse the write as no longer part of the click. The write now comes first.

Round 5, on 9782100. The reviewer confirmed:

  • the region stays in the tree while empty and adds no gap or overlap;
  • the success and failure paths, and a second click, work.

Fixed in the next commit:

  • P3: two clicks within the pause left the first timer running, so the second "Copied" cleared early. The timer is now cleared again before it's set.

Declined:

  • The Copy button's reserved space is a fixed 112 px, so at 200% text "Copied" can cover the end of a long first command line. The pre scrolls horizontally, so nothing is lost. The overlap lasts 1.2 s, and the label is announced.

@michaelaguiar
michaelaguiar marked this pull request as ready for review November 28, 2026 03:26
@michaelaguiar
michaelaguiar merged commit 325c36e into main Nov 28, 2026
2 checks passed
@michaelaguiar
michaelaguiar deleted the design/tokens-and-site branch November 28, 2026 03:50
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