Skip to content
This repository was archived by the owner on Nov 30, 2026. It is now read-only.

Drop react entirely: company logos become prerendered SVG strings - #187

Merged
Urigo merged 1 commit into
mainfrom
drop-react
Sep 2, 2026
Merged

Urigo merged 1 commit into
mainfrom
drop-react

Conversation

@Urigo

@Urigo Urigo commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

What

Follow-up to #186, answering "what still needs React?" — the answer was: exactly one thing. The two CompanyLogo.astro components called renderToStaticMarkup on the ~15 SVG logo React components; every other design-system touchpoint in the Astro site goes through the .astro/.ts shims, and the @hive/design-system dependency remains only for its stylesheet.

How

The logos are pure static markup, so they're now a plain TypeScript module of SVG strings with a renderLogo(name, { className, height, width, title }) helper that injects the attributes onto the root <svg> tag. The strings were generated once via renderToStaticMarkup from the previous React components, so the markup is byte-identical — verified by matching every viewBox + path-data signature on the built case-studies page against production (16/16 identical), and spot-checking the injected attributes (class / title / height) on the homepage logos row.

react and react-dom are removed from both the docs and documentation-astro packages (−478 lines net). The design system keeps its own React for Storybook, isolated to that package.

Verification

Prefixed and plain builds pass the base-path verifier; check-seo passes all 559 pages; unit tests, lint, and typecheck green; lockfile updated.

🤖 Generated with Claude Code

React survived the cleanup for exactly one purpose — the two
CompanyLogo.astro components calling renderToStaticMarkup on the SVG
logo components. The logos are pure static markup, so they are now a
plain TypeScript module of SVG strings (generated once via
renderToStaticMarkup from the previous React components, so the markup
is byte-identical — verified by matching every viewBox+path signature
on the built case-studies page against production) with a renderLogo
helper that injects class/title/height/width onto the root tag.

react and react-dom are removed from both the docs and
documentation-astro packages; the design system keeps its own React for
Storybook, isolated to that package.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 8ec890d1-439a-4630-b3ca-ed88affbd73f


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Deployment URL
📚 Storybook https://pr-187.the-guild-docs-storybook.pages.dev

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

@Urigo
Urigo merged commit ce07a47 into main Sep 2, 2026
7 checks passed
@Urigo
Urigo deleted the drop-react branch September 2, 2026 20:11

This branch was successfully deployed

2 active deployments
astro-preview — fecb1d1a Deployed Sep 2, 2026 by Urigo via astro-website-preview / deployment #802
storybook-preview — fecb1d1a Deployed Sep 2, 2026 by Urigo via storybook-preview / deployment #802
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants