You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(core)!: implement dynamic SVG entrance animations engine for 3D monolith (JhaSourav07#1920)
## Description
FixesJhaSourav07#1919
**🚨 CRITICAL ARCHITECTURE UPDATE 🚨**
This PR introduces a major refactoring to the core SVG rendering engine
by implementing a **dynamic CSS keyframe injection system** for the 3D
monolith.
Previously, the SVG generator relied on a single hardcoded `grow-up`
animation. While aesthetically pleasing, it severely restricted
embedding the badge in static environments (like restrictive Markdown
parsers, PDF generation, or offline viewers) and caused accessibility
concerns for users preferring reduced motion.
This PR solves this architectural limitation by introducing the
`entrance` API parameter, allowing on-the-fly injection of matrix
transformations and opacity states.
**Supported Core States:**
- `entrance=rise` (Maintains backward compatibility with the staggered
scaleY wave effect)
- `entrance=fade` (Smooth opacity transitions for premium aesthetics)
- `entrance=slide` (Complex translateY + opacity transformations)
- `entrance=none` (**CRITICAL:** Fallback state for static embeddings
and full accessibility compliance)
This fundamentally upgrades the flexibility, embeddability, and
accessibility of the CommitPulse engine without breaking existing URLs.
## Pillar
- [x] 🎨 Pillar 1 — New Theme Design (Core Animation & Aesthetics Engine)
- [x] 📐 Pillar 2 — Geometric SVG Improvement (Dynamic Keyframe
Generation)
- [ ] 🕐 Pillar 3 — Timezone Logic Optimization
- [x] 🛠️ Other (Accessibility, Refactoring core generator logic)
## Visual Preview
*(These can be verified directly via the API endpoint)*
- **Default / Rise:**
`http://localhost:3000/api/streak?user=YOUR_USERNAME&entrance=rise`
- **Fade:**
`http://localhost:3000/api/streak?user=YOUR_USERNAME&entrance=fade`
- **Slide:**
`http://localhost:3000/api/streak?user=YOUR_USERNAME&entrance=slide`
- **Static (A11y friendly):**
`http://localhost:3000/api/streak?user=YOUR_USERNAME&entrance=none`
## 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&entrance=fade`).
- [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(core)!: ...`).
- [x] I have updated `README.md` to document the new core 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 (no raw elements, smooth animations, correct fonts).
- [x] (Recommended) I joined the CommitPulse Discord community for
contributor discussions, mentorship, and faster PR support.
|`tz`|`string`| No | Omitted = UTC | IANA timezone (e.g. `Asia/Kolkata`, `America/New_York`) — aligns "today" with the user local midnight. Note: `?tz=UTC` is valid but cached separately from omitting `tz`. |
178
178
|`lang`|`string`| No |`en`| Language code for labels (`en`, `es`, `hi`, `fr`, `pt`, `ko`, `ja`, `de`, `zh`) |
179
179
|`view`|`string`| No |`default`| Rendering mode: `default` (3D Monolith), `monthly` (Compact monthly stats), or `heatmap` (flat 2D contribution heatmap) |
180
+
|`entrance`|`string`| No |`rise`| Entrance animation for towers: `rise` (default), `fade`, `slide`, or `none`. |
180
181
|`delta_format`|`string`| No |`percent`| Format for month-over-month delta in monthly view: `percent` (e.g. +12%), `absolute` (e.g. +15 commits), or `both`|
181
182
|`width`|`number`| No |`300`| Custom width for the SVG canvas (currently only applies to `view=monthly`) |
182
183
|`height`|`number`| No |`120`| Custom height for the SVG canvas (currently only applies to `view=monthly`) |
0 commit comments