fix: 在弹出mc更新提示弹窗时使用ESC键会打开Wiki#2892
Conversation
审阅者指南(在小型 PR 上折叠)审阅者指南调整 Minecraft 更新提示中的按钮顺序及相关动作,使 ESC 不再打开 Wiki / 更新日志,而是符合预期的“确认/关闭”语义。 更新后的 Minecraft 客户端更新提示按钮动作时序图sequenceDiagram
actor User
participant ModMinecraft
participant ModMain
participant ModDownloadLib
User->>ModMinecraft: McDownloadClientUpdateHint(versionName, jsonObject)
ModMinecraft->>ModMain: MyMsgBox(msgBoxText, title, button1Text:Common_Action_UpdateLog, button2Text:Common_Action_Download, button3Text:Common_Action_Close, Button1Action:McUpdateLogShow)
alt [user activates button1]
ModMain->>ModDownloadLib: McUpdateLogShow(version)
end
文件级变更
与关联 issue 的对照评估
可能关联的 issues
提示与命令与 Sourcery 交互
定制你的体验访问你的 控制面板 来:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the Minecraft update prompt button order and associated actions so that ESC no longer opens the Wiki / update log, aligning behavior with expected confirm/close semantics. Sequence diagram for updated Minecraft client update prompt button actionssequenceDiagram
actor User
participant ModMinecraft
participant ModMain
participant ModDownloadLib
User->>ModMinecraft: McDownloadClientUpdateHint(versionName, jsonObject)
ModMinecraft->>ModMain: MyMsgBox(msgBoxText, title, button1Text:Common_Action_UpdateLog, button2Text:Common_Action_Download, button3Text:Common_Action_Close, Button1Action:McUpdateLogShow)
alt [user activates button1]
ModMain->>ModDownloadLib: McUpdateLogShow(version)
end
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - 我在这里给出了一些总体反馈:
- 在你重新排序
MyMsgBox中的按钮标签和动作之后,请再次确认msgResult的取值映射(尤其是用于下载分支的msgResult == 2)仍然和预期的按钮索引/顺序一一对应,否则可能会触发错误的操作。
给 AI Agent 的提示
Please address the comments from this code review:
## Overall Comments
- After reordering the button labels and actions in `MyMsgBox`, double-check that the `msgResult` value mapping (especially `msgResult == 2` used for the download branch) still corresponds to the intended button index/order, otherwise the wrong action may be triggered.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈来改进后续的代码评审。
Original comment in English
Hey - I've left some high level feedback:
- After reordering the button labels and actions in
MyMsgBox, double-check that themsgResultvalue mapping (especiallymsgResult == 2used for the download branch) still corresponds to the intended button index/order, otherwise the wrong action may be triggered.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- After reordering the button labels and actions in `MyMsgBox`, double-check that the `msgResult` value mapping (especially `msgResult == 2` used for the download branch) still corresponds to the intended button index/order, otherwise the wrong action may be triggered.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
当我啥也没说,但有另一个问题,参见下面的 Req Change |
你是不是误解了些什么,我只是把那个弹窗的两个按钮位置交换了一下,以便让关闭位于第三个 |
| : Lang.Text("Minecraft.Update.UpdatedAt") + Lang.TimeSpan(time - DateTime.Now)); | ||
| var msgResult = ModMain.MyMsgBox(msgBoxText, Lang.Text("Minecraft.Update.Title"), | ||
| Lang.Text("Common.Action.Confirm"), Lang.Text("Common.Action.Download"), | ||
| (DateTime.Now - time).TotalHours > 3d ? Lang.Text("Common.Action.UpdateLog") : "", |
There was a problem hiding this comment.
重新看了一下这处修改,根据 MyMsgBox (MyMsgText) 的实现,
PCL-CE/Plain Craft Launcher 2/Controls/MyMsg/MyMsgText.xaml.cs
Lines 16 to 37 in cca4ef8
把一个可选按钮放到第一按钮位置会导致逻辑上不显示这个按钮的时候生成一个空按钮
close #2626
Summary by Sourcery
错误修复:
Original summary in English
Summary by Sourcery
Bug Fixes: