Repository navigation
feat: add shared glow states for selection, hover, focus and overlays (2.7.0) - #102
Merged
Merged
Conversation
… (2.7.0) Products drew selection, hover and focus glows with ad-hoc shadows in different sizes and colours, and some selected cards lifted. The package now owns one set of glow states, driven by one tone (--nextide-glow-tone). - nextide-glow: hover, keyboard focus and selection for a choosable card, row or tile. Selection follows data-selected, aria-pressed, aria-selected or aria-checked. Focus keeps its opaque ring on top of a selected glow. Nothing translates or scales. - Card and Surface take selectable to opt in. - nextide-glow-selected for selection decided in code, and nextide-tone-border for status such as recommended or playing. - Button: focus halo on every variant, hover glow on primary, destructive glows in its own tone. - Overlay light: shadow-glow-overlay and nextide-glow-wash. - The selected look is built from tokens (border, ring, halo, backlight, inset, wash, layer), with data-nextide-glow="backlight" and "inner" presets, so the default can change without new classes. - Stream selector, creator scope panel, run monitor and date range picker use the shared selected glow instead of their own shadows. - cn treats the glow shadows as shadows, checked against the shipped stylesheet in package acceptance. Release version: 2.7.0.
Owner decisions on the shared glow states: - The selected look defaults to a toned-down backlight: border at 70% tone, a 1px ring at 40%, outer light 0 0 30px -2px at 26%, and a soft backlight that spills onto neighbours from a raised stacking layer. The item never moves. The earlier halo stays as data-nextide-glow="halo"; the inner look and its inset and wash tokens are removed. - Every shared control uses one keyboard-focus look: border and thin ring in the focus colour plus the tone halo, with a transparent outline that shows in forced-colours mode. This replaces 2px, translucent, outline-only, brightness-only and destructive-tinted focus rings across 24 components and blocks. Fields draw the same ring inside their border. Stylesheets get nextide-focus-ring. - Outline buttons in dark mode now take the focus border, which their dark border previously overrode.
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.
What
One shared way to draw selection, hover, focus, button and overlay glow, driven by a single tone variable, plus one keyboard-focus look across every shared control. Selected items glow; they never lift. Release version 2.7.0. The manifest and install examples are bumped, so a release can be cut from the merge (approved to release right after merge).
nextide-glowon the interactive element, orselectableonCard/Surface. Selection followsdata-selected,aria-pressed,aria-selectedoraria-checked.nextide-glow-selectednextide-tone-border: toned border only, no glownextide-focus-ring.shadow-glow-overlay(halo around a floating mark),nextide-glow-wash(radial wash, centre via--nextide-glow-origin)--nextide-glow-toneon the element or any ancestor (Signal Turquoise by default), e.g. an A/B option's own colourSelected look (owner decision: toned-down backlight)
0 0 30px -2pxat 26%, and a soft backlight (0 0 64px 14pxat 14%).--nextide-glow-layer: 1, effective for grid/flex items or positioned elements) but never moves.::before. It never paints under the card itself and needs no wrapper element. It approximates the Daedalus reference (radial at opacity 0.22, blur 30px, inset -40px -36px).--nextide-glow-border,-ring,-halo,-halo-size,-backlight,-backlight-size,-layer.data-nextide-glow="halo"restores the earlier tighter halo.One focus look (owner decision)
--nextide-focus-ring-width, 0.5px), with the tone halo behind it.focus-visible:border-ring focus-visible:ring-(length:--nextide-focus-ring-width) focus-visible:ring-ring focus-visible:shadow-glow-focus focus-visible:outline-hidden.Library consistency
Stream selector, creator scope panel, run monitor and date range picker used their own selection shadows. They now use the shared selected glow.
cntreats the glow shadows as shadows, soclassNameoverrides still replace them.Accessibility
Highlightoutline marks selected items, and the focus outline is visible.Contract
DESIGN.mdcovers both rules: glow marks state, selection never lifts, status uses a toned border only, and there is one focus look.docs/component-map.mdcovers usage, the tokens and the canonical focus classes.Validation (on 29ab548)
just pre-commitpassed: Prettier, Oxlint--deny-warnings, the supply-chain watchlist and all four TypeScript projects. It ran in the commit hook.just test(packed-consumer package acceptance) passed, 7/7. It includes the check that the glow shadows merge correctly.npm run qualify(build plus native E2E, desktop 1440 and mobile 390, replay only) passed, 57/57.tests/controls.e2e.ts: a chosen card glows while its box and transforms stay unchanged, and keyboard focus on a selected card shows the focus ring. Mutation check: a 2px lift makes it fail.Not checked: the light theme visually (its focus ring is the existing Focus Teal) and browsers without
color-mixsupport.🤖 Generated with Claude Code