fix(tooltip): 切换控件时关闭弹窗再重开以重新定位到新位置#3344
Open
LuLu-ling wants to merge 1 commit into
Open
Conversation
Contributor
审阅者指南(在小型 PR 上折叠显示)审阅者指南此 PR 更新了提示工具(tooltip)关闭动画的流程:在切换目标控件时,先明确关闭当前的飞出层(flyout),再重新打开,以确保它能正确地重新定位到新的目标控件上。 更新后的提示工具飞出层重新定位时序图sequenceDiagram
participant Tooltip
participant target as FrameworkElement_target
participant shell as Shell_shell
participant sb as Storyboard_closeStoryClone
participant flyout as Flyout_flyout
Tooltip->>Tooltip: _StartCycle(target, pt)
Tooltip->>Tooltip: _closeStory.Clone()
Tooltip->>shell: BeginStoryboard(sb)
sb-->>Tooltip: Completed
alt [mark == _gen]
Tooltip->>flyout: IsOpen = false
Tooltip->>Tooltip: _PopUp(target, pt)
end
文件级变更
可能关联的问题
技巧与命令与 Sourcery 交互
自定义你的体验访问你的控制面板以:
获得帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the tooltip closing animation flow so that when switching target controls, the existing flyout is explicitly closed before reopening, ensuring it repositions correctly to the new target. Sequence diagram for updated tooltip flyout repositioningsequenceDiagram
participant Tooltip
participant target as FrameworkElement_target
participant shell as Shell_shell
participant sb as Storyboard_closeStoryClone
participant flyout as Flyout_flyout
Tooltip->>Tooltip: _StartCycle(target, pt)
Tooltip->>Tooltip: _closeStory.Clone()
Tooltip->>shell: BeginStoryboard(sb)
sb-->>Tooltip: Completed
alt [mark == _gen]
Tooltip->>flyout: IsOpen = false
Tooltip->>Tooltip: _PopUp(target, pt)
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - 我给出了几条总体反馈:
- 在访问
_flyout的IsOpen属性之前,考虑先对_flyout进行空值检查,以避免在某些路径中_flyout尚未初始化时出现潜在的空引用问题。 - 在
Completed处理程序中显式关闭_flyout可能会触发额外的事件或副作用;请确认是否需要加上保护条件,以避免在IsOpen已经为 false 时产生不必要的关闭/重新打开循环。
供 AI 代理使用的提示
Please address the comments from this code review:
## Overall Comments
- 在访问 `_flyout` 的 `IsOpen` 属性之前,考虑先对 `_flyout` 进行空值检查,以避免在某些路径中 `_flyout` 尚未初始化时出现潜在的空引用问题。
- 在 `Completed` 处理程序中显式关闭 `_flyout` 可能会触发额外的事件或副作用;请确认是否需要加上保护条件,以避免在 `IsOpen` 已经为 false 时产生不必要的关闭/重新打开循环。帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English
Hey - I've left some high level feedback:
- Consider adding a null-check around
_flyoutbefore accessingIsOpento prevent potential null reference issues if_flyoutis not initialized in some paths. - Explicitly closing
_flyoutin theCompletedhandler may trigger additional events or side effects; verify whether this should be guarded to avoid unnecessary close/open cycles whenIsOpenis already false.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding a null-check around `_flyout` before accessing `IsOpen` to prevent potential null reference issues if `_flyout` is not initialized in some paths.
- Explicitly closing `_flyout` in the `Completed` handler may trigger additional events or side effects; verify whether this should be guarded to avoid unnecessary close/open cycles when `IsOpen` is already false.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Summary by Sourcery
Bug Fixes:
Original summary in English
Summary by Sourcery
Bug Fixes: