Repository navigation
Conversation
Reveal and conceal content immediately by default while preserving hoverDelay as an explicit pointer-intent gate.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
Promote the default and hover-delay Storybook interactions into the required Chromium play guard.
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression16 of 420 shot(s) changed. A change here is a question, not a failure: check whether the after is the
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
Use Playwright's trusted pointer input for CSS hover timing instead of synthetic Storybook events.
Make frequent triggers animation-free, while preserving explicit intent gates as timing-only behavior.
There was a problem hiding this comment.
Thank you for making the reveal behaviour crisper and for keeping hoverDelay, keyboard focus, and touch behaviour intact. The breaking-change treatment also looks right for a stable default change.
Approval needs one maintainer decision before this can land. On current main, the motion design record is still a draft with no approver, so the new frequent-trigger no-animation rule is not yet established authority, and promoting that record in the same PR cannot authorise the default change by itself. A maintainer needs to either land or promote the bounded frequent-trigger rule as current authority through the normal owner-approval path, or point to an existing current claim that already authorises removing the default fade and exit delay.
Once that governing spec is settled, the implementation can be assessed for approval on its merits. No change to the code is being requested solely because the spec is missing.
[Automated review]
Changeset complianceThe
The |
cixzhang
left a comment
There was a problem hiding this comment.
Thanks for the careful work here, Ernest — the implementation is clean and the tests are thorough. I'm going to decline this one as written, though, because the premise doesn't hold: the exit delay and fade in useContainerReveal aren't aesthetic timing the primitive should shed. They exist to prevent users brushing the interface from causing janky rerenders while they move their pointer — the content stays in flow for the fade's duration so a brushed-past container doesn't snap out at full opacity and flicker, and the entry dwell is the same pointer-intent gate Tooltip and HoverCard use. That's input debouncing, and it's pointer-specific by construction: keyboard focus already reveals immediately with no dwell, and coarse pointers always show the content, so nothing is being made faster for those users by removing it.
Rather than flipping the default, could you come back with the use cases this change is meant to serve — where is an immediate switch actually needed, and for which input? That tells us what the right shape is: an explicit opt-out on the hook, a different hook for a non-hover reveal, or a change at the callsite. I'd like to see the rationale recorded in the motion rule either way; I'll get the current reason into the record so it's not just in code comments.
There was a problem hiding this comment.
Changes requested. The immediate default and the promoted motion rule are owner-approved for this head, but an engineering owner's request for changes is still open, and two fixes are needed either way. Please reply to that review with the use cases that need an immediate switch, then rebase onto main, where the branch currently conflicts.
- The
[breaking]changeset cannot merge whilemaindeclares a patch version (AST-017 FR31), and it names no option that restores the old timing (FR3); if the change counts as appearance only, it is a[feat]patch instead. - The rewrite reuses DR1–DR3 for new rules and drops DR5, while AST-094 and AST-108 on
maincite DR3 and DR5 by number, so new ids or a separate record would keep those citations correct.
[Automated review]
| '@astryxdesign/core': minor | ||
| --- | ||
|
|
||
| [breaking] `useContainerReveal` now shows and hides content immediately by default instead of applying a fade and deferred position reset. Explicit `hoverDelay` remains available as an opt-in pointer-intent gate. |
There was a problem hiding this comment.
main now declares 0.7.5, so AST-017 FR31 rejects a [breaking] entry and pnpm check:changesets fails once this branch is rebased. FR3 also asks a functional default change to name the option that restores the old default; if the timing counts as appearance only, the entry is a [feat] with a patch bump instead.
| - **DR1 — Frequent triggers do not animate.** A visual state change expected to | ||
| recur repeatedly during ordinary traversal or repeated operation MUST update | ||
| without animated interpolation, fading, travel, scaling, or exit sequencing. | ||
| - **DR2 — Intent gates remain timing, not motion.** An explicit dwell or intent | ||
| gate MAY postpone pointer activation when a caller requests it. Once the gate | ||
| accepts the interaction, the visual state MUST update without animation. | ||
| - **DR3 — Returning to rest is immediate too.** A frequent trigger's exit or | ||
| cancellation MUST NOT add an animation or an exit-only delay. Leaving the | ||
| trigger returns the surface to its resting state immediately. |
There was a problem hiding this comment.
These ids already mean other rules on main: AST-094 and AST-108 cite DR3 (easing and overshoot) and DR5 (reduced motion) by number. Giving the frequent-trigger rules their own ids, or their own record, keeps those citations true after a rebase.
|
(Posted by Cindy's agent.) Thank you, @ernestt, for digging into how container reveals feel! We're not taking this one: the motion design spec (DEC-1) keeps a small entry delay on every hover-to-display surface so brushing the pointer across the UI doesn't flash content, and a container reveal's exit guard is its fade, so removing a surface's default delay and motion is outside that decision. If a crisper entry still feels right, it could be proposed as its own spec change that keeps the exit fade. Closing this for now. |
Primary intent
Remove
useContainerReveal's implicit motion and exit delay. This is a default timing change rather than a new capability or a restoration to an existing contract, so the general template fits better than the feature, bug-fix, or appearance-only templates.User or maintainer impact
Every reveal, conceal, and layout-preserved variant currently inherits a tokenized opacity fade. The non-layout-preserved reveal also defers its
positionreset until that fade finishes. After this change, all four variants change state immediately by default.The public API is otherwise unchanged:
hoverDelayremains an explicit pointer-intent gate, and keyboard focus and coarse pointers still reveal immediately. Because this changes a stable default, the changeset is[breaking]with a minor bump under the repository's 0.x policy.Problem and solution fit
hoverDelayremains available for the separate hover-intent use case.The implementation removes the duration/easing and the exit-only position delay. It intentionally keeps
transition-property,transition-delay, andallow-discrete: CSS's initialtransition-duration: 0smakes the default immediate, while a nonzerohoverDelaycan still postpone the zero-duration state change without JavaScript timers.No prop, export, focus behavior, touch behavior, accessibility-tree behavior, or layout-preservation option changes.
Authority
spec:AST-017governs the compatibility treatment: a stable default change is[breaking]and uses the 0.x minor tier.architecture:interaction-modalityrequires an operable path for every modality and reachable essential actions; the existing focus-within and coarse-pointer branches remain unchanged.design:motion/DR1–DR3record makes the owner-approved rule explicit: frequent triggers do not animate, caller-requested intent gates remain timing only, and returning to rest is immediate.DEC-1recordsernesttas decider on 2026-10-01; infrequent and spatial motion remains outside this bounded decision.Change and evidence
design:motionowner with the bounded frequent-trigger rule, an exact decision log, and globalmotionrouting for DR1–DR3.hoverDelayas an explicit opt-in and documented the zero-delay default.hoverDelaystories into the required Chromium browser guard.Exact-head Linux Chromium at
bf6c331passed both required browser probes:transition-durationandtransition-delayresolve to0s; pointer entry and exit update opacity and position immediatelyhoverDelay={250}Global-baseline review receipt
node scripts/review-global-baselines.mjs --authority-commit 33eb65c56865603535fdf9bad709cc3decac6bdb --review-head bf6c3312a43eb503015372f29ad3c5582d9057d8 --triggers visual,interaction,motion,accessibility,specificationinteractionmatchedarchitecture:interaction-modalityINV1, INV2, INV3, INV4, INV7, and INV8. This change leaves focus ownership and modality paths unchanged; the focused regression test keeps every reveal variant mounted and the existing keyboard/touch branches are byte-identical.accessibilitymatchedspec:AST-009FR1-FR7 and FR9-FR16 plusspec:AST-020FR1, FR2, and FR6. The PR makes no AT-specific role, name, focus-order, announcement, or virtual-cursor claim, so AST-009 FR2/FR7 call for proportionate DOM/CSS and browser evidence rather than a real-AT matrix.specificationmatchedarchitecture:knowledge-contractsDEC-9, DEC-10, INV9, INV11, INV14, INV16, INV18, INV20, and INV21. The change reuses the canonicaldesign:motionowner, keeps one bounded current claim, routes only DR1–DR3, and leaves implementation mechanics in code and evidence.visualandmotionmatched no current global claim at the base authority commit, wheredesign:motionwas still draft. This exact head promotes the bounded rule and adds its globalmotionroute for subsequent reviews; the proposed head was not treated as its own authority.Every match reason was the script's deterministic
Requested trigger ... matched review-applicability:v1 claim ...route at the authority commit above.Scope
Testing
spec-owner-ready/ernesttandspec-owner-approvalstatuses — passeduseContainerRevealtiming probes passed at the exact headpnpm exec vitest run packages/core/src/hooks/useContainerReveal.test.tsx scripts/build-css.test.mjs— 20 passedpnpm lint:strict— passed (existing repository warnings only)pnpm build— passedpnpm -F @astryxdesign/storybook build— passedpnpm -F @astryxdesign/storybook typecheck— passed after workspace packages were builtpnpm check:knowledge— passed with the promoteddesign:motionrecord and DR1–DR3 global routepnpm check:changesets— passedA local full
pnpm testrun on macOS was not used as the repository-wide verdict because several unrelated tests require GNUcp, Linux shell-array behavior, or a watcher that timed out on that host. The exact-head Linuxtestcheck passed and is the authoritative repository-wide result.