fix: correct package name copy tooltip hiding#838
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughRemoved the inline 🚥 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)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/pages/package/[...package].vue (1)
1194-1199: Consider progressive enhancement fortransition-behaviour: allow-discretesupport.The feature is supported in Chrome/Edge 117+ (Sep 2023), Safari 17.4+ (Mar 2024), and Firefox 129+ (Aug 2024), but remains newly available—not yet widely deployed across production browsers. Without the fallback, users on older browser versions will see the
displaytransition snap rather than animate smoothly.Guard with
@supportsto ensure older browsers fall back to theopacitytransition:Progressive enhancement with
@supports.copy-button { - transition: - opacity ease-in-out 0.15s, - display 0.15s; - transition-behavior: allow-discrete; + transition: opacity ease-in-out 0.15s; } + +@supports (transition-behavior: allow-discrete) { + .copy-button { + transition: + opacity ease-in-out 0.15s, + display 0.15s; + transition-behavior: allow-discrete; + } +}
|
Hmm, some transition styles were deleted after the build. I'll fix that now |
7c6f34a to
657caff
Compare
|
Everything is working as expected now |
|
is there even a reason to only show the copy button on hover, remove all the transitions etc and always have it there. less code, more intuitive (use the familiar double rectangle icon for copy with a tooltip maybe) |
|
@dominikg we hide it in the interests of not cluttering things visually it's a nice to have - people can discover the feature naturally if they go to select package name |

I spent a lot of time debugging to find the cause, but:
The hover state remains on the element. JS mouseLeave works correctly (both on button and group), everything is checked correctly, everything works as expected, but the element remains visible.
We can disable the transition and this bug will go away, but explicitly set
display:nonealso worksRelates #594 #473
Closes #834