Skip to content

fix(core): Tab paints the press for every pointer - #8728

Open
cixzhang wants to merge 2 commits into
fix/press-release-lands-on-hoverfrom
fix/press-tab-every-pointer-2
Open

cixzhang wants to merge 2 commits into
fix/press-release-lands-on-hoverfrom
fix/press-tab-every-pointer-2

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

User impact

On desktop, a mouse or pen press on a tab showed only CSS :active's colour: no press from the controller and no release fade, while a finger got both. Under spec:AST-094 FR43 every pointer presses the same way.

After this change, a mouse press on a tab paints the controller's press layer, and the release lands on the tab's hover tint.

Problem and solution fit

  • Why does it happen? Tab's pressed image arms were set only inside @media (pointer: coarse), so the controller's data-astryx-press painted nothing for a mouse.
  • Why does it matter? A tab doesn't answer a click the way the rest of the system now does.
  • What's the fix? The image arms paint for every pointer. The hover and pressed colours yield while the press is on, so a press never paints twice, and paint again over the release so it lands on the hover. That's the same rule as the shared overlay in fix(core): a mouse release lands on the hover the control still has #8727.

Expected behavior and authority

  • spec:AST-094 FR11 and FR43 (DEC-21).

Smallest restoration

Evidence

Tab paints the press for every pointer

  • Reproduction before the change: :active's colour only, then a jump on release (235 → 242).
  • Result after the change: the controller's press layer, then a fade into the hover tint (230 → 234 → 241 → 242), for an unselected tab and the selected one alike.
  • Representative unchanged path: a finger's press on a tab, and a Space press (:active).
  • Regression test: pressEveryPointer.source-build.test.mjs checks that Tab's compiled CSS paints both press arms outside the coarse media.

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm vitest run packages/core/src/TabList packages/core/src/utils
  • pnpm -F @astryxdesign/core typecheck
  • Real Chromium timelines above.

Supersedes #8714.

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, with no release fade.

- Its image arms paint the controller's press for every pointer.
- Its hover and pressed colours yield while the press is on, so a press
  never paints twice, and paint again over the release, so a hovering
  pointer's release lands on the tab's hover (as the shared overlay does).

Checkbox and Radio are #8696's; Switch is #8681's.

Test: Tab's compiled CSS paints both arms outside the coarse media.
@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 27, 2026 7:08pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 27, 2026, 7:33 PM UTC

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Previews ready: Storybook and Sandbox were built with this PR's docsite. CI evidence will be added when available.

View Storybook for this PR · View Sandbox for this PR

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommending approval: a mouse or pen press on a tab now paints through the press controller at once and fades onto the hover tint, as spec:AST-094 FR11 and DEC-21 require, and the new source-build test fails on the base and passes here. This lands after its base, #8727. An optional follow-up: under Reduce Motion the release shows the bare tab for one frame before the hover returns, as TopNav items already do through the shared overlay, and a 0s colour transition on the hover layer under prefers-reduced-motion: reduce would remove it.

[Automated review]

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 27, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommending approval: a mouse or pen press on a tab now paints through the press controller at once and its release fades onto the hover tint, as spec:AST-094 FR11 and DEC-21 require, and the new source-build test fails on the base and passes here. This lands after its base, #8727. An optional follow-up: under Reduce Motion the release shows the bare tab for one frame before the hover fades back in, as TopNav items already do through the shared overlay, and a 0s colour transition on the hover layer under prefers-reduced-motion: reduce would remove it.

[Automated review]

This branch was successfully deployed

1 active deployment
Preview — 6f77c85d Deployed Oct 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant