Repository navigation
Conversation
Under spec:AST-094 FR43 the press controller paints a mouse's or a pen's press too (data-astryx-press), not only a finger's. Tab painted its pressed image only inside @media (pointer: coarse), so a mouse press showed nothing but :active's colour. - Its image arms paint the controller's press for every pointer, and its colour arms yield while it paints, so a press never paints twice. - Its hover layer swaps its colour at once under a hovering mouse, as Step and Outline do, so the hand-back from the press to the hover does not flash. Checkbox and Radio are #8696's; Switch is #8681's. Test: Tab's compiled CSS paints both arms outside the coarse media. (Rebuilt from 9cf836c8 with only its Tab part.)
…g mouse The controller's press image hands back to the hover layer's colour when a mouse release ends; the layer's eased colour swap showed the bare tab for a frame in between (real Chromium: 232, 240, then 255 before settling at the hover's 242). Under a hovering mouse the swap is instant, as Step and Outline do.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
|
There was a problem hiding this comment.
Looks good to merge into the release-to-hover branch: Tab's hover layer now paints the press controller's image for a mouse or pen press and drops its :active colour while the controller paints, which matches the fine-pointer press profile in spec:AST-094 FR11, and the new compiled-CSS test fails on the base and passes on the head. One optional follow-up: the 0s hover duration also makes every mouse hover-in on a tab appear at once instead of easing, which is worth a line in the changeset if it is intended. Because the release fades to --_press-rest, this should land into #8713's branch or after it.
[Automated review]
| default: durationVars['--duration-fast'], | ||
| [stylex.when.ancestor(':hover', tabScope)]: { | ||
| default: null, | ||
| '@media (hover: hover)': '0s', |
There was a problem hiding this comment.
Non-blocking: keying the 0s on :hover also makes every mouse hover-in on a tab appear at once instead of easing over --duration-fast (the hover-out still eases). If that is intended, a line in the changeset would tell consumers; no current spec sets Tab's hover timing either way.
User impact
On desktop, a mouse or pen press on a tab showed only CSS
:active's colour. It had no press feedback from the controller and no release fade, while a finger got both. Underspec:AST-094FR43 every pointer presses the same way.After this change, a mouse press on a tab paints the same press layer a finger's does, and the release fades back to the tab's hover tint.
Problem and solution fit
@media (pointer: coarse), so the controller'sdata-astryx-presspainted nothing for a mouse.Expected behavior and authority
spec:AST-094FR11 and FR43 (DEC-21): every pointer's press is painted through the press controller.Smallest restoration
TabList/Tab.tsxonly. It's stacked on the release-to-hover PR, fix(core): a mouse release fades to the hover it still has; Step and Outline swap back at once #8713, whose--_press-restgives the release its target.Evidence
:active's colour only, then jumps on release (235 → 242).:active).pressEveryPointer.source-build.test.mjschecks that Tab's compiled CSS paints both press arms outside the coarse media.Scope
Testing
pnpm vitest run packages/core/src/TabList packages/core/src/utilspnpm -F @astryxdesign/core typecheck