-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
fix: improve clipboard success animation in code blocks (#7946) #7950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: improve clipboard success animation in code blocks (#7946) #7950
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@Everkers Can you take a look at the reviews, and rebase? Thank you! |
8f59ef6
to
4481a2f
Compare
Hello @avivkeller, apologies for the late reply. I've updated the PR to only increase the duration of the toast to avoid the UI flash. Unfortunately, achieving the animation with Radix requires those CSS keyframes, which I agree complicates what should have been a simple change. |
Thank you! I'm not opposed to the other change, per-say, but IMO it requires separate discussion, since, it's vastly more complex. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #7950 +/- ##
==========================================
+ Coverage 73.10% 73.12% +0.02%
==========================================
Files 95 95
Lines 8355 8354 -1
Branches 219 218 -1
==========================================
+ Hits 6108 6109 +1
+ Misses 2246 2244 -2
Partials 1 1 ☔ View full report in Codecov by Sentry. |
Description
Improves the clipboard success animation for code blocks.
The previous animation was abrupt and barely visible, which felt out of place compared to the otherwise modern UI. This PR introduces a smoother transition, to improve visibility and user experience.
Validation
Tested locally by clicking the copy button on multiple code blocks.
The new animation is clearly visible, smoother, and feels more consistent with the design language of the site.
Related Issues
Fixes #7946
Check List
pnpm format
to ensure the code follows the style guide.pnpm test
to check if all tests are passing.pnpm build
to check if the website builds without errors.Screen.Recording.2025-07-04.at.3.09.44.PM.mov