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

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

Parked opened this
Closed without merging

The editor no longer uses .editor-mirror, .editor-path, .editor-preview, .editor-stack, .editor-tab, .mirrored or .ml. I ran no type check: bun x tsc --noEmit failed here with "bun is unable to write files to tempdir". bun scripts/design-lint.ts passes.

Notes

stopped parked by the crew deploy 0d4df9e

opened this

The editor no longer uses .editor-mirror, .editor-path, .editor-preview, .editor-stack, .editor-tab, .mirrored or .ml. I ran no type check: bun x tsc --noEmit failed here with "bun is unable to write files to tempdir". bun scripts/design-lint.ts passes. The editor tests (test/web-editor.test.ts and the other edit suites) pass. I took no before/after screenshots, so that item is not met.

Those names were only used by the editor (I grepped each), so all seven rules are gone from src/web/style/content.ts and their bullet is gone from docs/DESIGN.md §5d. I also updated the §6c prose that named the mirror class.

  • Path input: it is a plain .input mono, and the editor header styles it by input[name="path"].
  • Write and Preview tabs: they are plain .btn buttons. src/web/client.ts now switches data-variant between secondary and ghost for the selected one, and aria-selected still marks it.
  • Mirror and preview: they are addressed by their existing ids, #editor-mirror and #editor-preview, so they carry no class.
  • Stack and lines: the stack is a structural selector on .editor-wrap, and the mirror's lines are bare <div>s.
  • State flags: .mirrored and .cur became data-mirrored on the wrap and aria-current on the current line.

Keyboard use and everything a person reads or taps are unchanged.

Tests: a new test in test/web-editor.test.ts fails if any old class name is in the editor's HTML, for a .ts file and a Markdown file. Two existing assertions in that file had checked the old markup (class="editor-mirror mono" and <div class="ml">), so I changed them to match the new markup.

Left out: the overlay still needs its own selectors in src/web/style/content.ts, now keyed by id and attribute rather than by class. Nothing like it exists in §5 to reuse.

Closes #3635

2 earlier comments · 1 event
commented

The editor no longer uses .editor-mirror, .editor-path, .editor-preview, .editor-stack, .editor-tab, .mirrored or .ml. I ran no type check: bun x tsc --noEmit failed here with "bun is unable to write files to tempdir". bun scripts/design-lint.ts passes. The editor tests (test/web-editor.test.ts and the other edit suites) pass. I took no before/after screenshots, so that item is not met.

Those names were only used by the editor (I grepped each), so all seven rules are gone from src/web/style/content.ts and their bullet is gone from docs/DESIGN.md §5d. I also updated the §6c prose that named the mirror class.

  • Path input: it is a plain .input mono, and the editor header styles it by input[name="path"].
  • Write and Preview tabs: they are plain .btn buttons. src/web/client.ts now switches data-variant between secondary and ghost for the selected one, and aria-selected still marks it.
  • Mirror and preview: they are addressed by their existing ids, #editor-mirror and #editor-preview, so they carry no class.
  • Stack and lines: the stack is a structural selector on .editor-wrap, and the mirror's lines are bare <div>s.
  • State flags: .mirrored and .cur became data-mirrored on the wrap and aria-current on the current line.

Keyboard use and everything a person reads or taps are unchanged.

Tests: a new test in test/web-editor.test.ts fails if any old class name is in the editor's HTML, for a .ts file and a Markdown file. Two existing assertions in that file had checked the old markup (class="editor-mirror mono" and <div class="ml">), so I changed them to match the new markup.

Left out: the overlay still needs its own selectors in src/web/style/content.ts, now keyed by id and attribute rather than by class. Nothing like it exists in §5 to reuse.

Approved — before the latest push

Approved from the diff. I could not reach the preview from my sandbox, so I have not seen it render. The seven editor classes are gone from the markup, the CSS, the client script and the §5d list. The path input is a plain .input, the tabs are plain .btn buttons with data-variant switched, and state moved to data-mirrored and aria-current. No-JS behaviour is unchanged: the plain textarea shows and the mirror stays hidden. Nothing new is reachable only by mouse. Next two things: (1) The new test only proves the old class names are absent. Nothing asserts that the script flips data-variant on the tabs, sets data-mirrored on the wrap, or sets aria-current on the current line, and a regression there would leave the editor visibly wrong with a green suite. Add a client-level check for those three. (2) .editor-wrap > div:last-child in style/content.ts ties the overlay stack to DOM order. Give it a stable hook, or note the order in the CSS comment, before someone adds a sibling after it.

commented

I merged main into the branch, fixed the one conflict in src/web/style/content.ts, and pushed. The forge's check will now run on the merge.

Tested: the full bun test run hung here, so I stopped it. I ran the design and editor suites instead (design-audit, design-lint, design-map, web-editor, edits) and all 59 pass. The type check didn't run: bun x tsc failed with a read-only tempdir error in this sandbox. The full check on the forge will cover both.

Conflict: both sides had edited the editor's mirror and preview rules.

  • Selectors: I kept #editor-mirror and #editor-preview, because edit.ts and client.ts still use those ids. main had renamed them to classes, but the markup doesn't use those classes, so taking them would have broken the styling.
  • Main's changes: I took textarea.editor:focus-visible { outline: none; }. I also kept the 16px font size on touch screens and the forced-colors focus outline, both added by main.
commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs