Commit 5e76adf
authored
refactor(svg): extract radar scan line into renderRadarScan() helper (JhaSourav07#2242)
## Description
Fixes JhaSourav07#290
Extracts the animated radar scan `<rect>` element into a
`renderRadarScan(speed, sf, accentColor, autoTheme)` helper.
- Both `renderFooter` (static theme) and `generateAutoThemeSVG` (auto
theme) now call this single helper
- Static theme passes `autoTheme: false` with the resolved accent hex
- Auto theme passes `autoTheme: true` with empty string (uses CSS class)
- Single source of truth for radar scan markup
All 110 existing tests pass.
## Pillar
- [x] 📐 Pillar 2 — Geometric SVG Improvement
## Visual Preview
No visual change — pure refactor. SVG output is identical.
## 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.
- [ ] I have updated `README.md` if I added a new theme or URL
parameter.
- [x] I have starred the repo.
- [x] I have made sure that i have only one commit to merge in this PR.
- [x] The SVG output matches the CommitPulse "premium quality" aesthetic
standard.1 file changed
Lines changed: 23 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
491 | 512 | | |
492 | 513 | | |
493 | 514 | | |
| |||
500 | 521 | | |
501 | 522 | | |
502 | 523 | | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
| 524 | + | |
512 | 525 | | |
513 | 526 | | |
514 | 527 | | |
| |||
773 | 786 | | |
774 | 787 | | |
775 | 788 | | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
| 789 | + | |
792 | 790 | | |
793 | 791 | | |
794 | 792 | | |
| |||
0 commit comments