fix(CodeBlock): Show Action Buttons on Hover#989
fix(CodeBlock): Show Action Buttons on Hover#989dustinhealy wants to merge 6 commits intochore/v0.2.0from
Conversation
🦋 Changeset detectedLatest commit: e615c4f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Claude finished @dustinhealy's task in 1m 27s —— View job Code Review: fix(CodeBlock): Show Action Buttons on Hover
Nice approach overall — hiding buttons by default and fading them in on hover/focus is a clean UX improvement. A few things need attention before merging: 🚨 Must Fix
💡 Suggestions (non-blocking)
|
|
Claude finished @dustinhealy's task in 1m 0s —— View job Reviewing PR: fix(CodeBlock): Show Action Buttons on Hover
Nice approach — hiding the buttons by default and fading them in on hover/focus-within is clean and solves the overlap well. A few things to address: 🚨 Must Fix
♿ Accessibility
💡 Suggestions (non-blocking)
|
|
Claude finished @dustinhealy's task in 1m 29s —— View job Code Review: fix(CodeBlock): Show Action Buttons on Hover
Nice approach — hiding the buttons by default and fading them in on hover/ 🚨 Must Fix
💡 Suggestions (non-blocking)
|
|
Claude finished @dustinhealy's task in 52s —— View job Code Review: fix(CodeBlock): Show Action Buttons on Hover
All the feedback from previous reviews has been addressed — nice follow-through! 🙌 ✅ Previously flagged issues — now fixed
💡 Suggestion (non-blocking)
Everything else looks great. The hover-reveal approach is clean, keyboard accessible via |
|
Claude finished @dustinhealy's task in 1m 23s —— View job Code Review: fix(CodeBlock): Show Action Buttons on Hover
All previous blockers have been resolved — great follow-through! 🙌 ✅ Previously flagged issues — now fixed
💡 Suggestion (non-blocking)
Everything else looks solid. The hover-reveal is clean, keyboard-accessible via |
Add padding-left and background: inherit to the button container so buttons have a solid backdrop and don't overlap the code text.
Action buttons (copy, wrap) are now hidden by default and fade in on hover or focus-within. Buttons have a semi-opaque background matching the code block theme to prevent overlap with code content.
44309bf to
e615c4f
Compare
|
Claude finished @dustinhealy's task in 2m 9s —— View job Code Review: fix(CodeBlock): Show Action Buttons on Hover
Great follow-through on the previous feedback — the core implementation is solid. One potential bug slipped through, and there's one remaining hardcoded value worth addressing. 🐛 Possible Bug
💡 Suggestions (non-blocking)
✅ Previously flagged — all confirmed fixed
|
📚 Storybook Preview Deployed✅ Preview URL: https://click-q2pc0yj7w-clickhouse.vercel.app Built from commit: |
|
@dustinhealy Do me a favour. Change target branch to "main". We prefer to push changes to "main" as the source of truth. If a pre-release is open, we then cherry-pick; this way, we don't lose track of any changes :) |
|
Thanks for the work on this @dustinhealy ! I do have two suggestions to help with accessibility:
|
Why?
CodeBlock action buttons (copy, wrap lines) are positioned absolutely over the code content, causing text overlap on long first lines. This is especially noticeable when both buttons are visible.
How?
opacity: 0) and fade in on hover orfocus-within(opacity: 1with0.15sease transition)border-radiusandpaddingon the button container for a clean pill appearanceContribution checklist?