fix: duplicate class attributes in combined card SVG#11
Merged
Conversation
SVG doesn't allow duplicate attributes on the same element. Combine streak-number/stagger classes into a single class attribute. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an SVG parsing error in the combined stats card by ensuring SVG elements don’t emit duplicate class attributes when animations are enabled.
Changes:
- Merge streak number element classes into a single
class="..."attribute while keeping conditional animation behavior. - Apply conditional
staggerclass concatenation for the streak number elements (and the “Current Streak” label) to avoidAttribute class redefinedparser failures.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+228
to
229
| <text x="${streakCenterLeft}" y="72" text-anchor="middle" class="streak-label-current${disable_animations ? "" : " stagger"}" | ||
| ${disable_animations ? "" : `style="animation-delay: 1950ms"`}>Current Streak</text> |
There was a problem hiding this comment.
The PR description says the duplicate class attribute fix only affects the streak number elements, but this hunk also adds the stagger class to the “Current Streak” label. If this is intentional (it makes the existing animation-delay effective), please update the PR description accordingly; otherwise revert the label change to keep the PR focused.
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.
Summary
SVG parser error: "Attribute class redefined". The streak number elements had
class="streak-number"followed byclass="stagger"as separate attributes. Merged into singleclass="streak-number stagger".🤖 Generated with Claude Code