Skip to content

fix: duplicate class attributes in combined card SVG#11

Merged
compscidr merged 1 commit into
masterfrom
fix/combined-card-duplicate-class
Mar 20, 2026
Merged

fix: duplicate class attributes in combined card SVG#11
compscidr merged 1 commit into
masterfrom
fix/combined-card-duplicate-class

Conversation

@compscidr

Copy link
Copy Markdown
Owner

Summary

SVG parser error: "Attribute class redefined". The streak number elements had class="streak-number" followed by class="stagger" as separate attributes. Merged into single class="streak-number stagger".

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings March 20, 2026 04:09
@vercel

vercel Bot commented Mar 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
github-readme-stats Ready Ready Preview, Comment Mar 20, 2026 4:09am

@compscidr compscidr merged commit 785f01e into master Mar 20, 2026
9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 stagger class concatenation for the streak number elements (and the “Current Streak” label) to avoid Attribute class redefined parser failures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cards/combined.js
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>

Copilot AI Mar 20, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants