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
CodeBlockwhich seems too much trouble.Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan