-
Notifications
You must be signed in to change notification settings - Fork 656
feat(playground): add a button to copy rome_ir to clipboard #2604
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution.
What are the use cases that you see for the new button? To copy the document
into a PR summary?
As this issue said, #2587. It would be help full when you want to debug |
I am not sure I understand the use case. Can't you select all the text and copy it? What's the benefit of having a button in this case? |
I can see the use case and the additional feature, but I can't see adding a new dependency (the toast) to the project. It seems an overkill to me... I mean, it's nice, but I don't think it's necessary for the time being. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I was considering adding this too, actually for the formatted output more than the IR. Would it be possible to add this to multiple views?
Perhaps we could do without the toast? And just show an error inline or even an old school alert |
Does an old school |
2022-05-25.1.55.20.mov |
I remove toast and use this little svg icon instead, it should not have bundle size issue |
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to keep nitpicking, but the design is a little awkward. The check mark goes away after a few seconds, which is confusing, and leads to flickering if someone clicks the button multiple times in a row.
I'd also lean towards an clipboard-copy icon instead of a Copy to Clipboard
button which takes up width and potentially covers the IR output:
That said, I'd be open to merging if the flickering issue and my above comments are fixed.
2022-05-26.1.35.48.mov |
Summary
add a button to copy rome_ir to clipboard
rome_ir.mp4
opy rome_ir to clipboard
Test Plan
No