-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
fix(theme-classic): minor code copy button improvements #6986
Conversation
a74bca5
to
96457d3
Compare
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6986--docusaurus-2.netlify.app/ |
Size Change: 0 B Total Size: 806 kB ℹ️ View Unchanged
|
👍
Note that technically we already have CopyButton CSS targeting a parent (but stable global) CSS selector so we could do the same with JS and attach a mouseOut listener Not sure it's worth it though so I'll merge this as is |
Motivation
I also think that the button is only ever reset to the original state after the timeout, so even when the cursor leaves the code block, the button stays as a tick, which seems a little weird. But changing that requires moving state management up to
CodeBlock
which seems too much trouble.Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan