-
Notifications
You must be signed in to change notification settings - Fork 328
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
feat: Add copy to clipboard button to markdown code block #2025 #2120
Conversation
af34fb7
to
69871f0
Compare
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 @marek-mihok!
- Using portals seems like overkill. Can we do without?
- The button on dark md syntax highlight blends into background and is barely visible. Can this be improved?
- The tests that check if button is rendered are unnecessary, we have visual regression tests for that. Hover ones are ok.
We can, please check the updated solution. I've reused the original approach we used for copyable_text and applied the same principle also for markdown code block.
Improved by adding the outline.
Good point. Removed ✅ |
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 @marek-mihok!
I fixed the icon centering + removed some more unnecessary code.
…rking only on second render #2025
54fa608
to
542fc88
Compare
The PR fulfills these requirements: (check all the apply)
main
branch.feat: Add a button #xxx
, where "xxx" is the issue number).Closes #xxx
, where "xxx" is the issue number.ui
folder, unit tests (make test
) still pass.This PR reuses the button from ui.copyable_text also for markdown code block.
Screen.Recording.2023-08-28.at.10.53.21.mov
Closes #2025