Skip to content

fix(ui): build the build-tool snippets from the code primitives - #1327

Merged
TheMeinerLP merged 1 commit into
mainfrom
fix/snippets-code-primitives
Nov 23, 2026
Merged

TheMeinerLP merged 1 commit into
mainfrom
fix/snippets-code-primitives

Conversation

@TheMeinerLP

Copy link
Copy Markdown

Description

The snippets card showed the build-tool snippets in a box the card drew itself: its own padding, a copy button that faded in on hover, a status line and a loading skeleton with inline widths. Every snippet was a hand-written pre element with coloured tokens, and the repository snippet repeated four near identical copies of it.

Each snippet is now the shared copyable code block, so the card only chooses the tab and shows the loading state. The copy button is always visible instead of fading in, and the copy status line comes with the block. The snippet text is the same byte for byte for all four build tools, but it is no longer syntax coloured.

Part of migrate-content-to-components tasks 5.4, 5.8 and 5.9 (the snippet part; the other font-mono users stay for follow-ups). The card already had no <style> block and uses the shared scrollbar utility.

Type of change

  • fix - bug fix

How was this tested?

  • npx vitest run src/components src/anchors src/style-gate: all pass (the snippet tests ran red first)
  • npm run eslint clean, npm run typecheck clean
  • style gate baselines and allowlists lowered for the removed class tokens and inline widths
  • end-to-end specs adjusted to the new markup; they run in CI through the ci:e2e label

Checklist

  • Commit messages follow the Conventional Commits convention documented in CLAUDE.md (English, imperative, one of feat, fix, docs, refactor, test, build, ci, chore, perf)
  • Tests cover the change, or the change is not testable and I explained why above
  • ./gradlew build passes locally
  • Documentation and configuration samples are updated if the change is user-facing
  • Existing copyright headers are preserved; new files carry the appropriate header
  • No credentials, tokens or personal data are included in the diff

The snippets card drew its own padded box, copy button, fade and status
line, and each snippet was a hand-written pre element with coloured
tokens. Each snippet is now an MdCopyableCode, which is an MdCodeBlock
with a copy action, and the card keeps only the tabs and the loading
state. The repository and artifact snippets build their text in one
place per build tool. The skeleton widths become width classes.

The style gate baselines and allowlists lose the entries this removes,
and the two end-to-end specs that read the old markup follow it.

Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
@TheMeinerLP TheMeinerLP added the ci:e2e Run the dashboard end-to-end tests label Nov 23, 2026
@TheMeinerLP
TheMeinerLP added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit b52651a Nov 23, 2026
66 of 68 checks passed
@TheMeinerLP
TheMeinerLP deleted the fix/snippets-code-primitives branch November 23, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:e2e Run the dashboard end-to-end tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant