Skip to content

feat(SelectableCard): under a finger the selection ring and border change in one frame - #8246

Closed
vjeux wants to merge 2 commits into
meta:mainfrom
vjeux:uikit/c06-card-mark
Closed

vjeux wants to merge 2 commits into
meta:mainfrom
vjeux:uikit/c06-card-mark

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #8226. Review only this PR's change: vjeux/astryx@4707533...3161c95

User need

On a phone, tapping a SelectableCard changes its selection mark in two steps. The inset ring appears or vanishes at once, while the border fades over the theme's fast duration (125 ms), so for several frames the card that lost the selection still shows a gray outline. UIKit changes a selection mark in the frame the selection lands; under a finger the card now does too.

Evidence

A tap moving the selection from Basic to Pro, ¼ speed, recorded on this PR's earlier code: iOS 26.2 Mobile Safari (the magenta ring is the finger; before is #8226) and Android 15 Chrome (before is main). Before, Basic's border fades after Pro's ring appears; after, both cards change in one frame. The engine runs in Testing prove this head:

Before After
iOS before after
Android before after

With a mouse under Reduce Motion, Chromium storyboards of a click moving the selection to Pro. Before (main), the borders fade; after, both cards change in one frame:

A mouse click under Reduce Motion before this change

A mouse click under Reduce Motion after this change

Problem and solution fit

Current specification

Public delta and caller burden

Under a finger only, the card's ring and border change in one frame. No API changes; the press overlay, colours and elevation are unchanged.

Design and alternatives

The card's touch press paint is separate press-layer work (#8057, #8118).

Scope

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

Local gates at 1d2f527c7f, which differs from this head (3161c95) only in the isSelected doc sentence, on #8226's 4707533:

  • pnpm build, pnpm api:report --check, pnpm typecheck and pnpm review:pre: clean.
  • Strict ESLint on the changed files: no errors. Prettier: clean, except SelectableCard.doc.mjs, which main also leaves unformatted. check:repo, check:changesets, check:knowledge and check:i18n-runtime: clean.
  • Units: Indicator, motion and SelectableCard, 879 passed. SelectableCardMark.test.tsx fails on feat(core): under a finger a selection mark changes in one frame #8226's SelectableCard.
  • Chromium, pinned to one physical core with no other test process on it: SelectableCardMark and SelectionMarks ×10 at 4 workers, 120 of 120.
  • WebKit in the CI container profile (4 CPUs, 1 worker): both specs ×10, 120 of 120.
  • Accessibility contracts in Chromium (Checkbox, CheckboxList, RadioGroup): 66 of 66, once the Storybook build carried its source stamp.
  • Full unit suite: 18,991 of 18,992. The one failure, DropdownMenuLazySheet's "focuses the first action when a keyboard open beats the sheet load", is outside this change and passes alone 3 of 3 at this tree.
  • Repo-wide strict lint: 0 errors.

Loading
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. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants