Skip to content

Commit 15f7c21

Browse files
authored
refactor(svg): remove duplicated accessibility metadata in auto theme renderer JhaSourav07#399 (JhaSourav07#624)
## Description Fixes JhaSourav07#399 - reused the shared renderHeader() helper inside generateAutoThemeSVG() - removed duplicated accessibility metadata and defs block - aligned auto-theme renderer with the latest shared renderer architecture Updated this PR to align with the latest upstream renderer refactor, reusing the new shared `renderHeader()` helper to remove the remaining duplicated accessibility metadata block. ## Pillar - [ ] 🎨 Pillar 1 — New Theme Design - [ ] 📐 Pillar 2 — Geometric SVG Improvement - [ ] 🕐 Pillar 3 — Timezone Logic Optimization - [x] 🛠️ Other (Bug fix, refactoring, docs) ## Visual Preview ## Checklist before requesting a review: - [x] I have read the `CONTRIBUTING.md` file. - [x] I have tested these changes locally (`localhost:3000/api/streak?user=YOUR_USERNAME`). - [x] I have run `npm run format` and `npm run lint` locally and resolved all errors (CI will fail otherwise). - [x] My commits follow the Conventional Commits format (e.g., `feat(themes): ...`, `fix(calculate): ...`). - [] I have updated `README.md` if I added a new theme or URL parameter. - [x] I have started the repo. - [x] I have made sure that i have only one commit to merge in this PR. - [] The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts). - [x] (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.
2 parents 6f9b794 + a70b0d3 commit 15f7c21

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

lib/svg/generator.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,7 @@ function generateAutoThemeSVG(
294294
fill="none"
295295
role="img"
296296
>
297-
<title>CommitPulse Stats for ${safeUser} </title>
298-
<desc>
299-
${params.user || 'This user'} has ${stats.totalContributions} total contributions and a longest streak of ${stats.longestStreak} days.
300-
</desc>
301-
<defs>
302-
<filter id="glow" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="${fs(5)}" result="blur" /><feComposite in="SourceGraphic" in2="blur" operator="over" /></filter>
303-
</defs>
297+
${renderHeader(safeUser, stats, sf)}
304298
305299
<style>
306300
@import url('https://fonts.googleapis.com/css2?family=Fira+Code&amp;family=JetBrains+Mono&amp;family=Roboto&amp;display=swap');

0 commit comments

Comments
 (0)