CmdPal: Icons (10/n) - Add generated swatch and Unicode initials icons - #50190
Open
Jiří Polášek (jiripolasek) wants to merge 4 commits into
Conversation
This was referenced Aug 27, 2026
Jiří Polášek (jiripolasek)
marked this pull request as ready for review
August 28, 2026 16:54
- Injects initials path generation so protocol tests do not depend on Win2D, installed fonts, or an interactive graphics environment. - Rendereing in production is unchanged.
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 10 of 12 in the CmdPal icon-loading series. Depends on #50189. Next: #50191.
This PR lets extensions request color tiles and initials without supplying custom bitmap assets.
Motivation: centralize sizing, theme handling, contrast, and fallback behavior instead of duplicating image generation in extensions.
Examples
Semantic colors are
danger,subtle,info,warning,success,neutral,dark,normal, andtransparent. Initials accept one to three Unicode text elements.Evidence
Historical adjacent-stage comparison (2026-08-18); shared method and limitations: the diagnostics foundation PR #50181. A/B/C are regression checks, not measurements of the new generated-icon workload.
The justification is the new shared capability and its correctness coverage. These small, inconsistent changes support neither a general performance win nor a demonstrated regression.
Technical notes
squaremeans rounded square; both protocols share the background geometry.#RGB,#ARGB,#RRGGBB, or#AARRGGBB, not CSS alpha-last forms. Semantic colors choose their own light/dark values.%before|(%25,%7C). Human-authored initials use readable percent encoding; machine-generated app requests use length prefixes. Canonical simple inputs reuse the original string, and style normalization scans small tokens—not a full visual-equivalence algorithm.Implementation:
src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/GeneratedIconProtocol.cs.Pictures? Pictures!
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed