nuclear
nuclear copied to clipboard
FEAT: Add "copy to clipboard" feature
In this pull request, users can now able to copy the song title to the clipboard by simply clicking on its name.
Fixes #1516
Demonstration Video https://github.com/nukeop/nuclear/assets/75296055/87a86b75-63bc-47b8-90b4-9343f09a010a
Codecov Report
Attention: 5 lines in your changes are missing coverage. Please review.
Comparison is base (
e728fde) 71.42% compared to head (b9bfe14) 71.37%.
:exclamation: Current head b9bfe14 differs from pull request most recent head ba64070. Consider uploading reports for the commit ba64070 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #1521 +/- ##
==========================================
- Coverage 71.42% 71.37% -0.05%
==========================================
Files 364 364
Lines 6708 6714 +6
Branches 474 474
==========================================
+ Hits 4791 4792 +1
- Misses 1527 1532 +5
Partials 390 390
| Files | Coverage Δ | |
|---|---|---|
| packages/ui/lib/components/TrackInfo/index.tsx | 61.53% <16.66%> (-38.47%) |
:arrow_down: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi, thanks for the pull request. Please check the contribution guidelines: https://nukeop.gitbook.io/nuclear/contributing/contribution-guidelines
There are a few things missing but I'm sure if we iterate on it we can get it into a good shape.
- Please add a test for the feature. You can see examples in the app package. Let me know if you have trouble testing the clipboard contents.
- Instead of changing the color to green with CSS, it should be possible to know what's going to happen if you click the title. So a good idea would be to add a tooltip that says something like "click to copy". You can search for the word "tooltip" to see examples.
- The CSS on the title should also change the cursor to pointer when you hover over it, to let the user know this element is clickable. It might also be a good idea to add a button with an icon next to the title, so you can tell there's something interactive there at a glance.
Logs:
- Green color removed.
- Add a pointer when hovering over the name.
- Add the "Click to copy" tooltip.
- Removed getElementById line.
https://github.com/nukeop/nuclear/assets/75296055/bed28318-36a3-41da-bf00-9b808166d806
It would be cool to add a notification toast.