fix(CodeBlock): Show Action Buttons on Hover#989
Conversation
🦋 Changeset detectedLatest commit: 1566b8d 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 |
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:
|
|
@dustinhealy are we still working on this one? Needs some help getting it over the finish line? |
|
@gjones thanks for ping. This one obviously got lost - I will pick back up this weekend and get it ready for final review by Monday. |
CodeBlock action buttons (copy, wrap) overlapped code content on long first lines. They are now hidden by default and revealed on hover or focus-within with a fade transition that respects prefers-reduced-motion, over a semi-opaque pill matching the code block theme. The buttons expose descriptive aria-labels, with aria-pressed on the wrap toggle, so screen reader users get meaningful announcements instead of the raw icon name. IconButton now honours a caller-supplied aria-label and falls back to the icon name when none is provided.
e615c4f to
1566b8d
Compare
|
@gjones this is ready whenever - not sure how to clear the pending UI test CI action |
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?