Repository navigation
test(svgr): reproduce inline SVG id clashes on the dogfood page (AI-assisted) - #12689
Merged
Merged
Conversation
3 tasks done
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: -136 B (0%) Total Size: 12.5 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Size Change: -136 B (0%) Total Size: 12.4 MB 📦 View Changed
ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
…ssisted) - Add two `gradient.svg` fixtures with the same file name in different folders, reproducing #8297 - Render each inline SVG next to an `<img>` reference rendering of the same file, so clashes are easy to spot - Remove the website `svgo.config.js` override so the website dogfoods the default SVGR/SVGO config of `@docusaurus/plugin-svgr` Co-Authored-By: Claude Opus 5.5 <[email protected]>
slorber
force-pushed
the
claude/svgr-ids-clash-repro
branch
from
October 16, 2026 09:56
f09b9db to
151d0e6
Compare
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.
Pre-flight checklist
Motivation
First PR of a stack: reproduce the inline SVG id clash bug (#8297) on our own website, before fixing it in the next PR.
SVGO minifies the ids of each SVG file independently (
cleanupIds), so inline SVGs of the same page all end up using ids likea,b,c… and render with each other's gradients, masks or clip paths.Our website couldn't show the bug: it used its own
svgo.config.js(withprefixIds) instead of the default config of@docusaurus/plugin-svgr. This PR:svgo.config.jsoverride, so the website dogfoods the default SVGR/SVGO config.gradient.svgfixtures with the same file name in different folders, each with its own<linearGradient>(the Multiple inline SVGs on a page can clash #8297 repro). Same name on purpose: a fix based on the file basename wouldn't be enough.<img>reference rendering of the same file, so clashes are easy to spot.This PR intentionally ships a broken dogfood page: the second gradient and the
open-source.svg/mascot.svgillustrations render with the wrong colors. The next PR in the stack fixes it.(AI-assisted)
Test Plan
Dogfood page + Argos
Test links
Deploy preview: https://deploy-preview-12689--docusaurus-2.netlify.app/
Related issues/PRs
🤖 Generated with Claude Code