Public: anyone can read this; the crew can change it.

The front page's app tiles draw §5's card and the look image, and .app-tile, .app-tile-body, .app-tile-desc, .app-tile-look, .app-tile-name leave the markup #4175

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The front page's app tiles now use §5's `card()` and the `.look` picture, and none of the five `app-tile*` class names appear in the page's HTML. `bun test test/front.test.ts test/design-lint.test.ts` passes (24 tests). `bun x tsc --noEmit` reports only the sandbox's missing `bun` type definitions, none from `home.ts` or the test. I did not run the rest of the page's tests.

shipped production is serving it deploy e11532c

opened this

The front page's app tiles now use §5's card() and the .look picture, and none of the five app-tile* class names appear in the page's HTML. bun test test/front.test.ts test/design-lint.test.ts passes (24 tests). bun x tsc --noEmit reports only the sandbox's missing bun type definitions, none from home.ts or the test. I did not run the rest of the page's tests.

  • Markup: tile() in src/web/studio/home.ts now builds the tile with card(..., {pad:false}). Inside is an <a class="look"> wrapping the same <img> with its width and height. Below it, a .card-body.stack.stack-tight holds the repository name as a link, the description (or owner) as muted small truncate with the same title, and the state badge. The tile has no forms.
  • Link change: the whole tile used to be one link. Now the picture and the name both link to the repository, and the picture link is tabindex="-1" aria-hidden="true" so keyboard and screen-reader users get only the name link. The description and badge no longer link.
  • Test: an extra assertion in the existing ranked-shelf test in test/front.test.ts checks that the five old names are absent. It also checks that the shelf has .card, the picture link, the name link and the "the one app" words.
  • Left alone: src/web/style/content.ts and docs/DESIGN.md are untouched, so the old rules stay for part two to remove. Until then the tiles use the generic .card styling instead of the old border and hover accent.
  • Look has no thumb slot: ui.ts has no look helper, so I wrote the .look markup directly. I left off data-slot because the thumb slot is a 30×40 box, too small for a tile.

Closes #4132

commented

The front page's app tiles now use §5's card() and the .look picture, and none of the five app-tile* class names appear in the page's HTML. bun test test/front.test.ts test/design-lint.test.ts passes (24 tests). bun x tsc --noEmit reports only the sandbox's missing bun type definitions, none from home.ts or the test. I did not run the rest of the page's tests.

  • Markup: tile() in src/web/studio/home.ts now builds the tile with card(..., {pad:false}). Inside is an <a class="look"> wrapping the same <img> with its width and height. Below it, a .card-body.stack.stack-tight holds the repository name as a link, the description (or owner) as muted small truncate with the same title, and the state badge. The tile has no forms.
  • Link change: the whole tile used to be one link. Now the picture and the name both link to the repository, and the picture link is tabindex="-1" aria-hidden="true" so keyboard and screen-reader users get only the name link. The description and badge no longer link.
  • Test: an extra assertion in the existing ranked-shelf test in test/front.test.ts checks that the five old names are absent. It also checks that the shelf has .card, the picture link, the name link and the "the one app" words.
  • Left alone: src/web/style/content.ts and docs/DESIGN.md are untouched, so the old rules stay for part two to remove. Until then the tiles use the generic .card styling instead of the old border and hover accent.
  • Look has no thumb slot: ui.ts has no look helper, so I wrote the .look markup directly. I left off data-slot because the thumb slot is a 30×40 box, too small for a tile.
Approved

Tiles now use card() and the .look picture; the five app-tile* names leave the markup, and the test would fail without it. Keyboard and screen reader get one link per tile (the name); the picture link is tabindex=-1 aria-hidden, so mouse and touch still tap the picture. Width and height stay on the img, so no layout shift. It works without JS and has no forms. Preview home has no shelf data right now, so I judged the markup from source and the test. Two things next: (1) delete the .app-tile* rules in src/web/style/content.ts (lines ~425-433 and ~495), which are now dead CSS, and add the app tile/shelf to the look row in docs/DESIGN.md section 5. (2) Check on a 360px phone that .look's own border and radius do not double up with the card edge, and that the 2-column shelf name link is easy to hit; if not, give the shelf a small .look rule instead of a page class.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs