imp: 快速下载的选择菜单优化为多选项 - #3500
Conversation
Reviewer's Guide为通用选择对话框实现多选支持,并将其用于在快速下载流程中选择多个实例,相应地更新对话框行为和快速下载的实例选择逻辑。 快速下载多实例选择的时序图sequenceDiagram
actor User
participant ModComp as ModComp
participant ModMain as ModMain
participant MyMsgSelect as MyMsgSelect
User->>ModComp: QuickDownload(project)
ModComp->>ModComp: _QuickDownloadPickInstances(project, files)
ModComp->>ModMain: MyMsgBoxMultiSelect(selections, title, button1, button2, isWarn)
ModMain->>MyMsgSelect: show with myConverter.MultiSelect = true
User->>MyMsgSelect: check multiple MyListItem
MyMsgSelect->>MyMsgSelect: _UpdateCheckedState()
User->>MyMsgSelect: Btn1_Click()
MyMsgSelect->>ModMain: myConverter.Result = List<int>
ModMain-->>ModComp: return List<int> indices
ModComp->>ModComp: map indices to List<McInstance>
loop for each instance
ModComp->>ModComp: _QuickDownloadToInstance(project, files, instance)
end
文件级变更
与关联 issue 的对照评估
可能关联的 issues
Tips and commandsInteracting with Sourcery
Customizing Your Experience访问你的 dashboard 以:
Getting HelpOriginal review guide in EnglishReviewer's GuideImplements multi-select support for the generic selection dialog and uses it to allow choosing multiple instances in the quick download flow, updating both the dialog behavior and the quick download instance-selection logic accordingly. Sequence diagram for quick download multi-instance selectionsequenceDiagram
actor User
participant ModComp as ModComp
participant ModMain as ModMain
participant MyMsgSelect as MyMsgSelect
User->>ModComp: QuickDownload(project)
ModComp->>ModComp: _QuickDownloadPickInstances(project, files)
ModComp->>ModMain: MyMsgBoxMultiSelect(selections, title, button1, button2, isWarn)
ModMain->>MyMsgSelect: show with myConverter.MultiSelect = true
User->>MyMsgSelect: check multiple MyListItem
MyMsgSelect->>MyMsgSelect: _UpdateCheckedState()
User->>MyMsgSelect: Btn1_Click()
MyMsgSelect->>ModMain: myConverter.Result = List<int>
ModMain-->>ModComp: return List<int> indices
ModComp->>ModComp: map indices to List<McInstance>
loop for each instance
ModComp->>ModComp: _QuickDownloadToInstance(project, files, instance)
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.
嘿——我在这里留下了一些总体反馈:
- 在
MyMsgBoxMultiSelect中,目前日志消息会打印List<int>的类型名,而不是有用的值;建议显式记录索引(例如string.Join(",", (List<int>)converter.Result)),或对其进行序列化,这样日志才更有可操作性。 - 在多选的
Btn1_Click中,代码目前只检查MyListItem子元素;如果以后在选择列表中添加其他IMyRadio实现,它们会被忽略——建议要么在集合类型上做更明确的约束,要么对其他IMyRadio实现进行一致的处理。
面向 AI 代理的提示
Please address the comments from this code review:
## Overall Comments
- In `MyMsgBoxMultiSelect`, the log message will print the `List<int>`’s type name rather than useful values; consider logging the indices explicitly (e.g., `string.Join(",", (List<int>)converter.Result)`), or serializing them, so the log is actionable.
- In `Btn1_Click` for multi-select, the code only inspects `MyListItem` children; if other `IMyRadio` implementations are ever added to the selection list, they will be ignored—consider either constraining the collection type more explicitly or handling additional `IMyRadio` implementations consistently.帮我变得更有用!请对每条评论点击 👍 或 👎,我会根据你的反馈改进后续的代码审查。
Original comment in English
Hey - I've left some high level feedback:
- In
MyMsgBoxMultiSelect, the log message will print theList<int>’s type name rather than useful values; consider logging the indices explicitly (e.g.,string.Join(",", (List<int>)converter.Result)), or serializing them, so the log is actionable. - In
Btn1_Clickfor multi-select, the code only inspectsMyListItemchildren; if otherIMyRadioimplementations are ever added to the selection list, they will be ignored—consider either constraining the collection type more explicitly or handling additionalIMyRadioimplementations consistently.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `MyMsgBoxMultiSelect`, the log message will print the `List<int>`’s type name rather than useful values; consider logging the indices explicitly (e.g., `string.Join(",", (List<int>)converter.Result)`), or serializing them, so the log is actionable.
- In `Btn1_Click` for multi-select, the code only inspects `MyListItem` children; if other `IMyRadio` implementations are ever added to the selection list, they will be ignored—consider either constraining the collection type more explicitly or handling additional `IMyRadio` implementations consistently.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d1b3f955e
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b604030e14
ℹ️ 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".
Co-authored-by: ChilovenBustiangle <116699482+Chiloven945@users.noreply.github.com>
Co-authored-by: ChilovenBustiangle <116699482+Chiloven945@users.noreply.github.com>
修改内容
测试情况
dotnet build其他说明
Close [C#]: 快速下载优化 #3471
Summary by Sourcery
通过添加支持多选的选择对话框,并将快速下载功能连接到对所有选中实例上运行,实现多实例选择的快速下载。
New Features:
Enhancements:
Original summary in English
Summary by Sourcery
Enable multi-instance selection for quick download by adding a multi-select-capable selection dialog and wiring quick download to operate on all selected instances.
New Features:
Enhancements: