Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hi @SemihSan! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
|
AI review status for this pull request.
|
FR3 in `meta#10858` opens the next trigger in a warm tooltip group at once. The Behavior row still says a hover opens after `delay`. One sentence now names the warm-group handoff and points to FR3. Prettier re-aligns the table.
|
/approve-spec 67dba5f |
There was a problem hiding this comment.
Changes requested. The shared hover recognizer and the Tooltip handoff follow the interaction-modality rule and the Tooltip wording approved for this head, and the new handoff tests fail without this change and pass with it. One regression in the detach path needs a fix first.
- When a trigger unmounts within the leave guard (100 ms, or
hideDelay) after the pointer leaves it, the queuedclearTimeouts()inuseTooltip.tsxnow also cancels the pending hide, so the tooltip stays open with no trigger; cancel only the pending show and the group there, let the pending hide finish, and add that case to the detach-and-attach tests.
Two optional notes: the INV11 verification row could name the observable gap instead of "HoverCard and menu adoption", and the full delay entry in useTooltip.doc.mjs could mention the skip as its dense entry does.
[Automated review]
| queueMicrotask(() => { | ||
| if (triggerRef.current == null) { | ||
| latest().clearTimeouts(); | ||
| } | ||
| }); |
There was a problem hiding this comment.
Blocking. clearTimeouts() is now hover.cancel(), which also clears a pending hide. If the pointer leaves the trigger and the trigger unmounts before the leave guard ends (100 ms, or hideDelay) while the hook stays mounted, the hide never runs: the tooltip stays open with no trigger, and it is already open when the trigger renders again. A row action that renders only while its row is hovered shows this in Chromium; main closes the tooltip. When the trigger stays detached, cancel only the pending show and release the group, and let the pending hide finish. A detach-and-attach test can cover it: hover, wait for the show, leave, remove the trigger, advance 150 ms, expect onHide once.
| | INV8 | Owner-defined intent order, pending, close, cancellation, disablement, and unmount mutations | Older work changes current content, selection, status or announcement, visibility, focus, or activation after owner-defined supersession | | ||
| | INV9 | Concrete-harm reproduction, representative normal/legacy/no-new-prop paths, and coincident public-delta inventory | Unsupported or aesthetic preference is treated as harm, unaffected behavior changes, or an API, layout, sizing, default, sticky, or exception delta escapes direct authority | | ||
| | INV10 | Source boundary check over Core and Lab, a Lab-to-Core comparison on one recorded stream, and release-filter unit tests over recorded iOS pan and scroll-view streams | A Core component with its own sample buffer, velocity math, or release filter; a Lab component with its own sample buffer, velocity math, or release filter; a Lab component reporting a different velocity than Core for the same stream; an export of the tracker; a non-zero release after a still pause | | ||
| | INV11 | `HoverGestureRecognizer.test.ts`, Tooltip timing tests and `TooltipHoverIntent.a11y.chromium.spec.ts` cover group handoff, exit guard, document isolation, cancellation and keyboard opening. Evidence gaps: HoverCard and menu adoption, and pen and finger browser coverage of the shared recognizer. | A show without the owner's entry delay, a missed handoff within a group, a delayed keyboard show, a hover-shown surface that closes before the pointer reaches it, a finger served by it, or a second hover-timing implementation fails | |
There was a problem hiding this comment.
Non-blocking: "HoverCard and menu adoption" states build status. Consider naming the observable gap against INV11 instead, for example: "useHoverCard and useMenuHover keep their own hover timers, so HoverCard and menu triggers do not share the group."
User impact
Scanning a row of icon buttons currently means waiting for every tooltip separately. This keeps the first hover delay, then opens the next hint immediately while the previous one is still within its hover bridge. Moving on closes the previous hover preview; leaving beyond the bridge restores the delay.
Refs #8934. This is a draft while the scope question on the issue is open: Tooltip is the first consumer, with HoverCard and menu adoption left for follow-ups.
Problem and solution fit
useTooltipowns separate timers today, so neighbouring triggers cannot share intent. The internalHoverGestureRecognizerowns entry and exit timing and shares an active group per document through the existing realm registry. It adds no listeners, touch handling, public exports, provider, or props.Expected behavior and authority
Interaction modality INV11 already assigns grouped hover timing to the shared recognizer. The Tooltip contract identifies its missing adoption. The record updates remove that Tooltip gap and link the evidence; HoverCard and menu gaps remain explicit.
The warm window uses the existing exit guard, including the 100 ms default hover bridge. The configured numeric defaults stay the same. Pinned and controlled tooltips retain ownership of their visibility.
Evidence
onShowhad not fired.Scope
Writing rubric results
Testing
pnpm exec vitest run packages/core/src/Tooltip packages/core/src/gestures/__tests__/HoverGestureRecognizer.test.ts --project ui --maxWorkers=1— 115 passed.pnpm exec playwright test TooltipHoverIntent.a11y.chromium.spec.ts TooltipHoverBridge.a11y.chromium.spec.ts TouchTrigger.a11y.chromium.spec.ts --config playwright.config.ts --project chromium— 24 passed, including existing finger and pen tap cases.pnpm -F @astryxdesign/core typecheck— passed, including the source, test shards and consumer docs.pnpm storybook:build,pnpm check:repo, changed-source ESLint and Prettier checks — passed.pnpm review:pre --base origin/main --head HEAD— no automatic findings; the record changes still require owner approval.Pen hover handoff is not covered by a dedicated browser case yet. The existing pen tap and held-pen cases pass.