Skip to content

fix(slider): 弹窗出现时不会中断 MySlider 拖动 - #3775

Merged
MoYuan-CN merged 2 commits into
PCL-Community:devfrom
CerikoSky:fix-myslider-popup-interruption
Nov 3, 2026
Merged

MoYuan-CN merged 2 commits into
PCL-Community:devfrom
CerikoSky:fix-myslider-popup-interruption

Conversation

@CerikoSky

@CerikoSky CerikoSky commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

变更说明 / Summary

关联 Issue / Related Issue

验证方式 / Verification

AI 使用情况 / Generative Artificial Intelligence Usage

  • 使用情况 / Usage:未使用(Not used)

提交前检查 / Checklist

  • 我已阅读并遵守 技术规范 和 生成式人工智能使用方针。/ I have read and followed the Technical Guidelines and the Generative Artificial Intelligence Usage Policy.
  • 我能解释本次修改的全部内容,包括关键逻辑、异常处理和已知限制。/ I can explain all changes, including key logic, error handling, and known limitations.
  • 我确认未伪造日志、测试结果、基准数据或其他证据。/ I confirm that no logs, test results, benchmarks, or other evidence have been fabricated.
  • 本次提交不包含与修改无关的文件变更,也未提交临时文件或构建产物。/ The PR contains no unrelated changes, temporary files, or build artifacts.
  • 所有提交均已签名,且提交信息符合提交信息规范。/ All commits are signed and follow the commit message convention.
  • 我确认 PR 描述由本人撰写,未直接提交未经核实的 AI 生成内容。/ I confirm that I wrote this PR description myself and have not submitted unverified AI-generated content.

Sourcery 摘要

错误修复:

  • 当模态消息或对话框出现时,阻止滑块拖动继续,并避免在对话框上方显示滑块提示。
Original summary in English

Sourcery 总结

修复:

  • 当显示模态消息或对话框时,阻止滑块拖动继续,包括停止正在进行的拖动,并将滑块提示隐藏在对话框后面。
Original summary in English

Summary by Sourcery

Bug Fixes:

  • Prevent slider dragging from continuing when a modal message or dialog is displayed, including stopping active drags and hiding the slider tooltip behind dialogs.

@pcl-ce-automation pcl-ce-automation Bot added 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 size: S PR 大小评估:小型 labels Nov 2, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T17:33:14.460629Z bf7c3d1 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sourcery-ai

sourcery-ai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor
审查者指南(小型 PR 默认折叠)

审查者指南

更新了 MySlider 的拖动生命周期处理,使其能够与模态消息面板协同工作:面板出现时终止拖动;在面板附近隐藏拖动视觉效果和数值弹出框;值发生变化时不再无条件停止拖动。

MySlider 拖动与模态消息面板的时序图

sequenceDiagram
    participant User
    participant MySlider
    participant MainWindow
    participant PanMsg
    participant Popup

    User->>MySlider: DragStart
    MySlider->>MainWindow: DragDoing
    alt PanMsg.Children.Count > 0
        MainWindow->>MainWindow: DragStop
    else no message panel
        MainWindow->>MySlider: Value
        MySlider->>PanMsg: Check Children.Count
        alt value change opens message panel
            MySlider->>Popup: Suppress RefreshPopup
            MainWindow->>MainWindow: DragStop
        else no message panel
            MySlider->>Popup: RefreshPopup
        end
    end

    User->>MySlider: OnDragMouseMove
    MySlider->>MainWindow: DragDoing
Loading

文件级变更

变更 详情 文件
防止模态消息面板打断 MySlider 拖动交互,或被拖动交互遮挡。
  • 在拖动更新期间检测到消息面板时,停止当前拖动。
  • 如果消息面板已经打开,则跳过拖动开始动画。
  • 消息面板显示时不展示滑块数值弹出框,包括因数值变化而打开的面板。
  • 移除值变化路径中无条件终止拖动的处理,将模态面板的处理集中到拖动流程中。
Plain Craft Launcher 2/Controls/MySlider.xaml.cs

提示与命令

与 Sourcery 交互

  • 触发新的审查: 在拉取请求中评论 @sourcery-ai review。
  • 继续讨论: 直接回复 Sourcery 的审查评论。
  • 根据审查评论创建 GitHub issue: 回复审查评论,请 Sourcery 根据该评论创建 issue。你也可以在审查评论中回复 @sourcery-ai issue 来创建 issue。
  • 生成拉取请求标题: 在拉取请求标题的任意位置写入 @sourcery-ai,即可随时生成标题。你也可以在拉取请求中评论 @sourcery-ai title,随时重新生成标题。
  • 生成拉取请求摘要: 在拉取请求正文中你希望放置摘要的位置写入 @sourcery-ai summary,即可随时生成 PR 摘要。你也可以在拉取请求中评论 @sourcery-ai summary,随时重新生成摘要。
  • 生成审查者指南: 在拉取请求中评论 @sourcery-ai guide,即可随时重新生成审查者指南。
  • 解决所有 Sourcery 评论: 在拉取请求中评论 @sourcery-ai resolve,即可解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这个命令会很有用。
  • 忽略所有 Sourcery 审查: 在拉取请求中评论 @sourcery-ai dismiss,即可忽略所有现有的 Sourcery 审查。如果你想从头开始进行新的审查,这尤其有用——别忘了评论 @sourcery-ai review 来触发新的审查!

自定义使用体验

访问你的控制面板,以便:

  • 启用或停用审查功能,例如 Sourcery 生成的拉取请求摘要、审查者指南等。
  • 更改审查语言。
  • 添加、移除或编辑自定义审查说明。
  • 调整其他审查设置。

获取帮助

Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates MySlider drag lifecycle handling to cooperate with modal message panels: dragging is terminated when a panel appears, drag visuals and value popups are suppressed around the panel, and value changes no longer unconditionally stop the drag.

Sequence diagram for MySlider drag with modal message panel

sequenceDiagram
    participant User
    participant MySlider
    participant MainWindow
    participant PanMsg
    participant Popup

    User->>MySlider: DragStart
    MySlider->>MainWindow: DragDoing
    alt PanMsg.Children.Count > 0
        MainWindow->>MainWindow: DragStop
    else no message panel
        MainWindow->>MySlider: Value
        MySlider->>PanMsg: Check Children.Count
        alt value change opens message panel
            MySlider->>Popup: Suppress RefreshPopup
            MainWindow->>MainWindow: DragStop
        else no message panel
            MySlider->>Popup: RefreshPopup
        end
    end

    User->>MySlider: OnDragMouseMove
    MySlider->>MainWindow: DragDoing
Loading

File-Level Changes

Change Details Files
Prevent modal message panels from interrupting or being obscured by MySlider drag interactions.
  • Stop the active drag when a message panel is detected during drag updates.
  • Skip drag-start animation when a message panel is already open.
  • Avoid showing the slider value popup while a message panel is present, including panels opened as a side effect of changing the value.
  • Remove the value-change path’s unconditional drag termination so modal handling is centralized in drag processing.
Plain Craft Launcher 2/Controls/MySlider.xaml.cs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58c656ca1e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嘿——我已经审阅了你的更改,整体看起来很棒!


Sourcery 对开源项目免费——如果你喜欢我们的评审,欢迎分享 ✨
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@pcl-ce-automation pcl-ce-automation Bot added 🕑 等待合并 已处理完毕,正在等待代码合并入主分支 and removed 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 labels Nov 2, 2026
@MoYuan-CN
MoYuan-CN merged commit f38c6b9 into PCL-Community:dev Nov 3, 2026
3 checks passed
@pcl-ce-automation pcl-ce-automation Bot added 👌 完成 相关问题已修复或功能已实现,计划在下次版本更新时正式上线 and removed 🕑 等待合并 已处理完毕,正在等待代码合并入主分支 labels Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: S PR 大小评估:小型 👌 完成 相关问题已修复或功能已实现,计划在下次版本更新时正式上线

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants