fix: close tooltip on Escape - #540
Conversation
|
@nrps9909 is attempting to deploy a commit to the afc163's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughTooltip 统一管理 ChangesTooltip 可见状态与 Escape 关闭
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This localized change adds Escape dismissal for tooltips while preserving controlled visibility behavior, with reported tests and validation checks passing; no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant Trigger
participant Tooltip
participant TargetWindow
Trigger->>Tooltip: 传入 mergedVisible 和 onInternalVisibleChange
Tooltip->>TargetWindow: 注册 keydown 监听器
TargetWindow-->>Tooltip: 发送 Escape 事件
Tooltip->>Trigger: 请求可见状态变为 false
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Escape, matching the ARIA tooltip keyboard interactionfalsethroughonVisibleChangewhile leaving the rendered state under the caller's controlValidation
falsecallback afterEscapepnpm tscgit diff --checkFixes #510.
AI assistance disclosure: Codex was used to trace rc-trigger visibility ownership, construct the exact-base keyboard regression, and run validation. The submitted behavior and test results were verified locally.
Summary by CodeRabbit
新功能
测试