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

Design: the editor uses the design system, and its editor-* classes leave §5d #3775

Merged opened this

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

Merged

The editor now uses §5's components, and its `editor-*` classes and the `.mirrored` and `.ml` classes are gone from `src/web/style/content.ts` and from docs/DESIGN.md §5d. The screenshots the issue asks for (light and dark, desktop and 390 px wide) are not in this pull. I could not run the type check here: `bun x tsc --noEmit` fails on a read-only tempdir and `node_modules` has no `tsc`. The check…

shipped production is serving it deploy f9c1fcc

opened this

The editor now uses §5's components, and its editor-* classes and the .mirrored and .ml classes are gone from src/web/style/content.ts and from docs/DESIGN.md §5d. The screenshots the issue asks for (light and dark, desktop and 390 px wide) are not in this pull. I could not run the type check here: bun x tsc --noEmit fails on a read-only tempdir and node_modules has no tsc. The check on this push will be the first type check of the change.

The earlier pull, #3661, stayed red because of a merge of main into the branch. That merge left conflict markers (<<<<<<<, =======, >>>>>>>) in docs/DESIGN.md §5d, and scripts/design-lint.ts then reported .editor-*, .mirrored, .ml and .finder-note as still listed. I deleted the markers and both bullets: .finder-note was already removed by #3676, and the editor bullet is this issue's.

  • Tests: test/web-editor.test.ts fails if any old class name appears in the editor's HTML. That test, test/web-code.test.ts and the design tests pass (79 tests).
  • Lint: bun scripts/design-lint.ts passes.
  • Left in place: the element ids (#editor-mirror, #editor-preview, #editor-size, #editor-write, #editor-gutter) and the editor-form, editor-head, editor-wrap, editor-target and editor-commit class names. They are not in the issue's list, so I did not touch them.
  • Keyboard use: I did not run the page or compare keyboard behaviour before and after.

Closes #3635

commented

The editor now uses §5's components, and its editor-* classes and the .mirrored and .ml classes are gone from src/web/style/content.ts and from docs/DESIGN.md §5d. The screenshots the issue asks for (light and dark, desktop and 390 px wide) are not in this pull. I could not run the type check here: bun x tsc --noEmit fails on a read-only tempdir and node_modules has no tsc. The check on this push will be the first type check of the change.

The earlier pull, #3661, stayed red because of a merge of main into the branch. That merge left conflict markers (<<<<<<<, =======, >>>>>>>) in docs/DESIGN.md §5d, and scripts/design-lint.ts then reported .editor-*, .mirrored, .ml and .finder-note as still listed. I deleted the markers and both bullets: .finder-note was already removed by #3676, and the editor bullet is this issue's.

  • Tests: test/web-editor.test.ts fails if any old class name appears in the editor's HTML. That test, test/web-code.test.ts and the design tests pass (79 tests).
  • Lint: bun scripts/design-lint.ts passes.
  • Left in place: the element ids (#editor-mirror, #editor-preview, #editor-size, #editor-write, #editor-gutter) and the editor-form, editor-head, editor-wrap, editor-target and editor-commit class names. They are not in the issue's list, so I did not touch them.
  • Keyboard use: I did not run the page or compare keyboard behaviour before and after.
Approved

The class names the issue listed are gone from the markup, the CSS, the client script and the §5d list. The tabs use .btn with data-variant, and the mirror and the textarea keep their shared metrics. The new test fails if any old class returns, and the mirror assertions are rewritten to match. Without JavaScript nothing changes: the plain textarea shows and Write is the selected tab. I could not open the preview because the sandbox denies that host, so this review is from the diff and the served-HTML tests, not from the page. Two things I would do next: (1) attach the light and dark, desktop and 390px screenshots the issue asked for, and check Tab and Shift+Tab through the tabs, path field and textarea by hand. (2) Stop setting aria-current on the aria-hidden mirror line. Screen readers never see it, so the current line is better drawn with a data attribute. Replace the structural selector .editor-wrap > div:last-child with a named hook, since it breaks if a sibling is added.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs