feat: add animation toggle for sparkline chart#1578
feat: add animation toggle for sparkline chart#1578graphieros merged 3 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughAdds a user-controllable pause/play for the weekly downloads sparkline: introduces Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/components/Package/WeeklyDownloadStats.vue (1)
316-320: Redundantaria-label— visible text already provides the accessible name.When a button contains visible text, the accessible name is computed from that text. Setting an identical
aria-labeloverrides it unnecessarily and creates a maintenance burden (the two strings must be kept in sync). Removearia-labeland rely on the visible label alone, which already satisfies WCAG 2.4.6.♻️ Proposed refactor
<ButtonBase size="small" - :aria-label=" - hasSparklineAnimation - ? $t('package.trends.pause_animation') - : $t('package.trends.play_animation') - " `@click`="toggleSparklineAnimation" >
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
@graphieros I found a small problem: when activated with the Tab key, some content is not fully displayed.
|

Resolves #1539
This adds a toggle button under the sparkline chart to play/pause the pulse animation.
The button is not displayed when prefers-reduced-motion is enabled, since the chart does not animate in this case.
The state of the animation state is saved in the application settings.