Skip to content

Feature/design-sync: import Primer ViewComponents into claude.ai/design - #517

Draft
akabiru wants to merge 1 commit into
mainfrom
feature/design-sync-primer-view-components
Draft

Feature/design-sync: import Primer ViewComponents into claude.ai/design#517
akabiru wants to merge 1 commit into
mainfrom
feature/design-sync-primer-view-components

Conversation

@akabiru

@akabiru akabiru commented Jul 31, 2026

Copy link
Copy Markdown
Member

Imports this design system into claude.ai/design so the design agent builds with Primer's real components instead of generic ones.

Primer renders in Ruby, so there is no React entry point the importer can consume. generate-adapter.mjs boots the demo Lookbook, scrapes every routable preview's real rendered HTML, and wraps it in a synthetic React package that side-effect-imports the compiled custom-element bundle. Cards are therefore byte-identical to Primer's own renderer rather than JSX lookalikes, and the stylesheet mirrors demo/app/assets/stylesheets/application.postcss.css so text isn't left in the browser default serif. 89 components / 474 cells, all render-checked and reviewed. The cards intentionally expose no content props - <Name>Props is preview/className/style only, since advertising the Ruby arguments would make the agent write props that silently do nothing; conventions.md tells it to copy the markup and write Primer classes instead.

Committed files are sync inputs only, so a re-sync is reproducible from a fresh clone. NOTES.md records the gotchas worth knowing next time, including that cfg.overrides.skip is inert for this source shape.

Primer renders in Ruby, so there is no React entry point for the importer to
consume. generate-adapter.mjs scrapes each routable Lookbook preview's real
rendered HTML and wraps it in a React package, which keeps the cards byte-identical
to Primer's own renderer instead of reimplementing components in JSX.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 73169c2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@akabiru akabiru self-assigned this Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant