fix: checkbox 选项不渲染 icon#184
Merged
MistEO merged 1 commit intoMistEO:mainfrom Apr 26, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - 我发现了 1 个问题
给 AI 代理的提示
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/components/OptionEditor.tsx" line_range="539-543" />
<code_context>
>
- {caseLabel}
+ <span className="flex items-center gap-1.5 min-w-0">
+ {caseItem.icon && (
+ <AsyncIcon
+ icon={caseItem.icon}
+ basePath={basePath}
+ className="w-4 h-4 object-contain flex-shrink-0"
+ />
+ )}
</code_context>
<issue_to_address>
**suggestion:** 考虑将该图标标记为装饰性元素,如果它不传达额外的语义含义。
如果 `caseItem.icon` 只是视觉效果且标签已经足够,请在 `AsyncIcon` 上添加 `aria-hidden`(或类似属性),让屏幕阅读器忽略它。如果图标传达了额外含义,则应确保它具有可访问的名称或描述。
</issue_to_address>帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/components/OptionEditor.tsx" line_range="539-543" />
<code_context>
>
- {caseLabel}
+ <span className="flex items-center gap-1.5 min-w-0">
+ {caseItem.icon && (
+ <AsyncIcon
+ icon={caseItem.icon}
+ basePath={basePath}
+ className="w-4 h-4 object-contain flex-shrink-0"
+ />
+ )}
</code_context>
<issue_to_address>
**suggestion:** Consider marking the icon as decorative if it doesn’t convey additional semantic meaning.
If `caseItem.icon` is only visual and the label is sufficient, add `aria-hidden` (or similar) to `AsyncIcon` so screen readers ignore it. If the icon conveys extra meaning, instead ensure it has an accessible name/description.
</issue_to_address>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
在复选框选项按钮的标签旁渲染图标,同时保留截断和布局约束。
新功能:
增强改进:
Original summary in English
Summary by Sourcery
Render icons alongside labels for checkbox option buttons while preserving truncation and layout constraints.
New Features:
Enhancements: