feat: add share and download functionality to StreakTracker#385
Open
Kritika200520 wants to merge 3 commits into
Open
feat: add share and download functionality to StreakTracker#385Kritika200520 wants to merge 3 commits into
Kritika200520 wants to merge 3 commits into
Conversation
|
@Kritika200520 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Thanks for your first PR on DevTrack! 🎉
A maintainer will review it within 48 hours. While you wait:
- Make sure CI is passing (type-check + lint)
- Double-check the PR description is filled out and the issue is linked
- Feel free to ask questions in Discussions if you need help
Priyanshu-byte-coder
requested changes
May 19, 2026
Owner
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Download/share functionality is clean. One fix needed:
Hardcoded colors on the download button
bg-[#5b6ef6], hover:bg-[#4b5ee6], focus:ring-[#5b6ef6]/50 — use CSS vars consistent with the rest of the component:
className="... bg-[var(--accent)] text-[var(--accent-foreground)] hover:opacity-90 focus:ring-[var(--accent)]/50 ..."Also rebase on main — StreakTracker.tsx has been modified by other merged PRs since this branch was created.
Author
|
i made the changes and rebased please review it |
Priyanshu-byte-coder
requested changes
May 20, 2026
Owner
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
- containerRef captures action buttons — ref on outermost div means downloaded PNG includes SHARE/Copy buttons. Move ref to child div wrapping only stats content. 2. aria-label says Share but action is download — change to Download streak stats as image. 3. Hardcoded spinner — border-white/30 border-t-white invisible in light mode. Use border-[var(--accent-foreground)]/30.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new "Share" feature to the
StreakTrackerwidget, allowing users to effortlessly generate and download a high-quality PNG image of their coding streaks. This removes the friction of manually taking screenshots and helps users easily share their DevTrack stats on platforms like Twitter or LinkedIn!Closes #<304>
Type of Change
Changes Made
html-to-imageviatoPngto capture theStreakTrackercontainer programmatically.isDownloadingstate that shows a smooth spinner animation inside the button while the image generates.devtrack-streak.png.How to Test
Steps for the reviewer to verify this works:
npm installto installhtml-to-image.npm run devand navigate to a dashboard page with the StreakTracker widget.devtrack-streak.pngis automatically downloaded.Checklist
npm run lintpasses locallynpm run type-check)