Repository navigation
fix(AlertDialog): a press that slides between the actions runs the one it lifts on - #8083
Merged
Merged
Conversation
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.
User impact
In an AlertDialog, a press that slides from one action to the other runs nothing on lift. UIKit runs the action under the lift.
Problem and solution fit
family:action-groupsmakes every group of sibling actions behave one way.AlertDialog tracks a held pointer of any kind across its actions through a new internal hook over the shared tracker. The lift runs the action under the pointer through its own click; a lift outside both runs nothing. Focus then does what a click on the lifted action does (FR1), with the focus logic from #8657.
The press controller leaves a tracked action's pointer press to the tracker, its one painter (folded in from #8637, which this supersedes). A tracked action takes no
:activepaint, so a mouse slide lights one action; a key's press still paints.Expected behavior and authority
component:AlertDialogFR8 (current);family:action-groupsFR1–FR5;spec:AST-094FR41. The record's FR8 gap note goes, and its verification row,verified_byand compatibility bullet now say FR8 ships: text-only edits that need an eng-owner/approve-specon this head.The lifted action fades on the shared 200 ms press fade, as the spec owners decided: a tap is not a gesture.
Smallest restoration
hooks/useActionGroupTracking.ts: the hook.hooks/actionGroupTracker.ts: where several actions hold the point (no layout), the press resolves to the action it landed on.utils/pressFeedback.ts,privateAttributes/pressGroupItem.stylex.ts: the marker and its skip.hooks/pressGroupContext.ts,Button.tsx: the tracker alone paints a tracked press. A tracked Button sizes its own:activeimage to zero unless the tracker lights it. The overlay module, a public entry, gains no export; its SYNC header names Button.scripts/touch-support-bundle.test.mjs: AlertDialog and its importers are gesture users.touch-action: pinch-zoom: Chrome on Android cancels a pointer it pans, which would end the press.Evidence
Scope
Testing
Local gates at 3576bcb:
pnpm check:repo, strict ESLint and Prettier on the changed files, the private-attribute baseline check, and the touched unit suites (1,492, with every tracker user) pass.pnpm test:ui: 19,027 passed. Node project after a fresh core build: 16,055 passed, 2 expected failures; 7 CLI cases timed out at 30 s under machine load (load average 55). Rerun on their own, the 6 files' 761 cases pass (one file only when run alone).Writing rubric results
component:AlertDialog: FR8's gap note, the readiness row, the Current-state impact bullet, the compatibility bullets, FR8's verification row andverified_bynow say FR8 ships.