feat(thumbnail): add showRemoveOn prop; drop hover shadow and elevation#4300
Draft
kentonquatman wants to merge 2 commits into
Draft
feat(thumbnail): add showRemoveOn prop; drop hover shadow and elevation#4300kentonquatman wants to merge 2 commits into
kentonquatman wants to merge 2 commits into
Conversation
kentonquatman
requested review from
cixzhang,
ejhammond,
imdreamrunner and
josephfarina
as code owners
July 24, 2026 21:44
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsThumbnail · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 1 accessibility violation(s) found — 1 serious. Thumbnail - 1 issue(s)
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
kentonquatman
marked this pull request as draft
July 25, 2026 04:47
Add `showRemoveOn` ('always' | 'hover', default 'always'): 'hover'
reveals the remove button on hover or keyboard focus (via a scoped
ancestor marker) and keeps it visible on touch. The button stays
mounted so it remains keyboard- and AT-reachable.
Remove the interactive hover drop-shadow (the hover dim is retained)
and drop the unreleased `elevation` prop from Thumbnail.
… thumbnails Interactive thumbnails (onClick) now render a currentColor tint overlay on hover (5%) and active (10%), matching ClickableCard, replacing the previous opacity dim. The overlay is painted via ::after with pointer-events: none and sits below the remove button (removeSlot's z-index), so the remove button stays fully interactive above the overlay. Hover is guarded by @media (hover: hover) so touch devices don't show a stuck state.
kentonquatman
force-pushed
the
feat/thumbnail-show-remove-on
branch
from
July 25, 2026 05:30
dcfa9ac to
98171d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reworks the Thumbnail hover interaction and remove-button affordance to align with the rest of the system.
showRemoveOnprop (new)Adds
showRemoveOn?: 'always' | 'hover'(default'always').'always'— the remove button is always shown. This is today's behavior, so existing usage is unchanged.'hover'— the button is hidden at rest and revealed on hover or keyboard focus, and stays visible on touch devices (which have no hover).Only applies when
onRemoveis set. The naming follows the existingOverlayshowOnvocabulary for consistency.Accessibility: the reveal is CSS-only (opacity) — the button stays mounted, so it remains keyboard- and screen-reader-reachable. Tabbing into the thumbnail triggers a
:focus-withinreveal. This mirrors the establishedOverlayScrimpattern: a scopeddefineMarker+stylex.when.ancestor(':hover' / ':focus-within'), so the reveal responds only to this thumbnail rather than any outer hoverable container. A@media (hover: none) and (pointer: coarse)branch keeps the button visible on touch. Motion respectsprefers-reduced-motion.Hover overlay (matches ClickableCard)
Interactive thumbnails (
onClick) now render acurrentColortint overlay on hover (5%) and active (10%), matching ClickableCard — replacing the previous hover drop shadow and opacity dim.::afterwithpointer-events: none, clipped to the rounded corners by the image container'soverflow: hidden.imageContainerdoesn't create its own stacking context (position: relative, no z-index), so the::after(z-index auto) and the remove-button slot (z-index 1) flatten into the root's isolated context — the remove button always paints above the overlay and stays fully interactive.@media (hover: hover)so touch devices don't get a stuck hover state; the active tint works everywhere.elevationprop removed from ThumbnailThe
elevationprop (and its showcase example) is removed from Thumbnail as part of the same hover-interaction cleanup. It is unreleased (only pending in a changeset), so this is not a breaking change for consumers; the shared elevation changeset has been updated to drop Thumbnail from its list while leaving the other surfaces intact.Examples
showRemoveOnis now a Storybook control (theelevationcontrol was removed).Testing
pnpm -F @astryxdesign/core build✅ (verified the tintcolor-mixrules — 5% hover-guarded, 10% active — compiled intodist/astryx.css)pnpm -F @astryxdesign/core typecheck✅ (incl. tests)typecheck:docs,typecheck:template-docs✅showRemoveOncoverage: button stays mounted on hover mode, distinct/default slot class, still firesonRemove)sync:exports, changeset, demo-media (CORS) checks ✅