Add "Copy to clipboard" buttons
See #2855 (closed)
Merge request reports
Activity
@dzaporozhets @skyruler If you can find time to give this some design love, we might be able to sneak this into 8.1. The implementation is actually quite simple.
I'd also like to add these "copy to clipboard" buttons on things like the Commit list for the commit SHAs.
@rspeicher what kind of design help do you need? Can you post a screenshot of what can be improved?
@rspeicher btw thanks for working on this! It would be really helpful
Added 721 commits:
Toggle commit listI added a button to each "How to merge" step:
And next to each commit SHA in the commit list (this copies the full commit SHA, not just the short one):
And also for the "Cross-project reference" from the GIF above.
The awesome thing about this is it's super easy to implement:
- Add
= clipboard_button
immediately before or immediately after the element you want to copy from (the "next" element has priority over the "previous" one). - That's it. If you need to customize what text is copied, add a
data-clipboard-text
to the sibling element that contains the desired text.
- Add
I think the commit list button looks bad, if you have ideas to fix @dzaporozhets @skyruler @creamzy
Added 1 commit:
- 03cfda94 - Remove unused argument from clipboard_button helper
mentioned in commit 0bb50ea0