Repository navigation
Conversation
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.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes for 0.4.2, one commit each (the em dash change in two), each with a test that fails on 0.4.1.
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>withouttabindex. Tests: storefront-benche2e/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.e2e/copy.spec.ts, dev and static.e2e/document-title.spec.ts,e2e/static/static-build.spec.ts,core/title.spec.ts.scripts/no-em-dash.test.mjsfails 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).