Skip to content

fix: 0.4.2: one code-block rule, storefront copy button, no em dashes, folder tabs - #59

Merged
StfBauer merged 5 commits into
mainfrom
fix/0.4.2
Nov 15, 2026
Merged

StfBauer merged 5 commits into
mainfrom
fix/0.4.2

Conversation

@StfBauer

Copy link
Copy Markdown
Contributor

Fixes for 0.4.2, one commit each (the em dash change in two), each with a test that fails on 0.4.1.

  1. One code-block rule for every markdown (f9e4af7). Every markdown-it instance is made by createMarkdown() (packages/dev-server/src/code-blocks.ts), which writes every fence and indented code block the same way: highlighted, focusable, with the copy button. Before, a code block in a placed component's content and an indented code block anywhere were a plain <pre> without tabindex. Tests: storefront-bench e2e/build-browser.spec.ts (390 px, scrolling blocks in placed content and on the page); code-blocks.spec.ts, which also fails on a markdown-it instance made anywhere else.
  2. The copy button works on storefront pages (370ecd2). The button is written hidden; a small page script shows it where the browser can copy, and copies the block's code. With scripting off there is no button. Test: storefront-bench e2e/copy.spec.ts, dev and static.
  3. A folder's tab names the folder (e707125): "Atoms · Acme DS". Tests: dev-ui e2e/document-title.spec.ts, e2e/static/static-build.spec.ts, core/title.spec.ts.
  4. No em dash in what Pattern Dump writes or prints (0c9782a) and in the docs, the CHANGELOG and the starter README (b9f53a1). Separators are " · ", clause dashes a colon or a period, placeholders words in parentheses. The audit headline in contracts changes with them. scripts/no-em-dash.test.mjs fails on an em dash in a shipped string, a starter file, the docs or the CHANGELOG.

All gates pass locally on Node 22.22 and 24.22 (dev-ui E2E 354, storefront 177, skin 155, package-bench 7).

A code block in a placed component's content, and an indented code block
anywhere, were written by markdown-it's default rules: a plain <pre> without
tabindex, so one that scrolled sideways failed axe's
scrollable-region-focusable. Every markdown-it instance is now made by
createMarkdown, which writes every fence and indented block as the docs
already wrote fences: highlighted, focusable, with the copy button. A test
fails on an instance made anywhere else.
On a storefront page the copy button did nothing: only the workbench's shell
handled it. The page now carries a small script that shows each button where
the browser can write to the clipboard and copies the block's code. The
button is written hidden, so with scripting off there is no button to tab to.
A folder route's browser tab reads "Atoms · Acme DS", as a component route's
reads "Button · Acme DS", so folder tabs and history entries can be told
apart too. Home and an unknown route keep the brand alone.
Separators in labels and report lines are a middle dot ("Button · ghost",
"Diagnostics audit · <sha>", a docs error marker "[pattern: x · no such
component]"), clause dashes in messages a colon or a period ("unknown key
"x": did you mean ..."), and placeholders words in parentheses ("(no
theme)", "(no size)"). The same in pd audit's headline, the terminal and
console lines, pd --help, pd init's notes and the files it writes. Tests
asserting the strings change with them.
The prose uses a period, a comma, a colon or parentheses instead, and a
table's empty cell reads "(none)". A script test now fails on an em dash in
a shipped string, a file pd init writes, the docs, a README or the
CHANGELOG.
@StfBauer
StfBauer merged commit 698ba1f into main Nov 15, 2026
13 checks passed
@StfBauer StfBauer mentioned this pull request Nov 15, 2026
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