CmdPal: Icons (11/n) - Add plain and theme-aware SVG icon protocols - #50191
Open
Jiří Polášek (jiripolasek) wants to merge 2 commits into
Open
Conversation
This was referenced Aug 27, 2026
Jiří Polášek (jiripolasek)
marked this pull request as ready for review
August 28, 2026 16:56
Jiří Polášek (jiripolasek)
force-pushed
the
dev/jpolasek/f/49944-cmdpal-svg-icons
branch
from
August 29, 2026 10:53
78f8e33 to
3a166b7
Compare
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 of the Pull Request
Part 11 of 12 in the CmdPal icon-loading series. Depends on #50190. Next: #50192.
This PR accepts SVG files or inline SVG text, with explicit opt-in theme-aware coloring.
Motivation: extensions can supply scalable, theme-correct icons through the existing SDK icon string without generating separate files per theme.
Examples
{{ThemeColor}}resolves to black/light-theme or white/dark-theme foreground;{{AccentColor}}uses the requested accent. For a custom accent, replacesuccesswith an opaque color such as#7A3E9D. Omitting the accent uses the built-ininfopalette, not the live Windows accent.Evidence
Historical adjacent-stage comparison (2026-08-18); shared method and limitations: the diagnostics foundation PR #50181.
Keep the slow-miss tail visible, but this mixed Home workload does not establish a broad SVG-induced regression. The cumulative UI-work delta is negligible at this scale; focused file/inline × plain/themed measurements are still needed to evaluate the new path.
Technical notes
currentColorworks through SVG inheritance when the template setscolor="{{ThemeColor}}", not by globally replacing every occurrence.#RGB/#RRGGBBor supported semantic colors.transparentand alpha-bearing hex accents are rejected consistently by classification and parsing; express transparency with SVG opacity attributes.Implementation:
src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/SvgIconProtocol.cs.Pictures? Pictures!
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed