Skip to content

fix: 修复选择弹窗丢失 SvgIcon - #3801

Merged
Chiloven945 merged 1 commit into
devfrom
fix/select-dialog-svg-icon
Nov 9, 2026
Merged

Chiloven945 merged 1 commit into
devfrom
fix/select-dialog-svg-icon

Conversation

@LuLu-ling

@LuLu-ling LuLu-ling commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

变更说明 / Summary

PixPin_2026-11-08_11-57-14

关联 Issue / Related Issue

null

验证方式 / Verification

dotnet build

AI 使用情况 / Generative Artificial Intelligence Usage

  • 使用情况 / Usage:未使用

提交前检查 / 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 摘要

错误修复:

  • 在选项转换过程中保留并显示选择对话框中的 SVG 图标,而不是将其丢弃。
Original summary in English

Summary by Sourcery

Bug Fixes:

  • Preserve and display SVG icons in selection dialogs instead of dropping them during option conversion.

@LuLu-ling
LuLu-ling requested a review from a team November 8, 2026 03:57
@pcl-ce-automation pcl-ce-automation Bot added 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 size: XS PR 大小评估:微型 labels Nov 8, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

审阅者指南

数据结构

将 SvgIcon 添加到对话框选项中,并通过每个选项的状态公开它,以便选择对话框保留图标。

  • PCL.Core/UI/Dialogs/DialogRequest.cs L76-77
  • PCL.Core/UI/Dialogs/DialogViewModel.cs L29-30

API 的使用

将现有单选项和列表项选项转换为对话框选项时,复制 SvgIcon。

  • Plain Craft Launcher 2/Modules/Launcher/DialogOptions.cs L23, L56

UI

为带有 SVG 图标的选项创建选择列表项,并传递图标以供显示。

  • Plain Craft Launcher 2/Controls/MyMsg/MyMsgSelect.xaml.cs L74, L80

提示和命令

与 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

Data structures

Add SvgIcon to dialog options and expose it through each option state so the selection dialog can retain the icon.

  • PCL.Core/UI/Dialogs/DialogRequest.cs L76-77
  • PCL.Core/UI/Dialogs/DialogViewModel.cs L29-30

Uses of the API

Copy SvgIcon when converting existing radio and list-item options into dialog options.

  • Plain Craft Launcher 2/Modules/Launcher/DialogOptions.cs L23, L56

UI

Create selection-list items for options with an SVG icon and pass the icon through for display.

  • Plain Craft Launcher 2/Controls/MyMsg/MyMsgSelect.xaml.cs L74, L80

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

@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 9, 2026
@Chiloven945
Chiloven945 merged commit f40bcd9 into dev Nov 9, 2026
3 checks passed
@pcl-ce-automation pcl-ce-automation Bot added 👌 完成 相关问题已修复或功能已实现,计划在下次版本更新时正式上线 and removed 🕑 等待合并 已处理完毕,正在等待代码合并入主分支 labels Nov 9, 2026
@Chiloven945
Chiloven945 deleted the fix/select-dialog-svg-icon branch November 9, 2026 16:14
github-actions Bot pushed a commit to untained-launcher/PCL-CE that referenced this pull request Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants