Skip to content

Tag icon entries using "symbol-icon" for Symbol enum categorization#1971

Merged
niels9001 merged 3 commits intomicrosoft:mainfrom
AndrewKeepCoding:symbol-icon-tag
Jul 30, 2025
Merged

Tag icon entries using "symbol-icon" for Symbol enum categorization#1971
niels9001 merged 3 commits intomicrosoft:mainfrom
AndrewKeepCoding:symbol-icon-tag

Conversation

@AndrewKeepCoding
Copy link
Contributor

@AndrewKeepCoding AndrewKeepCoding commented Jul 30, 2025

Description

This PR updates the IconsData.json file by tagging icon entries that belong to the Symbol enum. This change complements issue #1880 and aligns with PR #1881.

Motivation and Context

This makes easier to see the options when using SymbolIcon.

How Has This Been Tested?

Ran the app and confirmed the changes.

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@niels9001
Copy link
Collaborator

/azp run

@marcelwgn
Copy link
Contributor

So it looks like some of the icons we have are not named like the enum or they do not exist at all in the enum. Below is what missmatches we have with matching for enum via name or code point:

Settings, isSymbol: False, symbolTag: True // Different name
Search, isSymbol: False, symbolTag: True // ???
PageSolid, isSymbol: False, symbolTag: True // ???
FavoriteStar, isSymbol: False, symbolTag: True // Possible favorite?
FavoriteStarFill, isSymbol: False, symbolTag: True // Possible favorite?
FullScreen, isSymbol: True, symbolTag: False // Exists, missing tag
KeyboardClassic, isSymbol: False, symbolTag: True // Keyboard
Unpin, isSymbol: False, symbolTag: True // Different name
Slideshow, isSymbol: False, symbolTag: True // Different name
SetlockScreen, isSymbol: False, symbolTag: True // Different name
MapPin2, isSymbol: False, symbolTag: True // Does not exist
CC, isSymbol: False, symbolTag: True // ???
Recent, isSymbol: False, symbolTag: True // ???
MailFill, isSymbol: False, symbolTag: True // Different name
Webcam, isSymbol: False, symbolTag: True // Different name
Picture, isSymbol: False, symbolTag: True // Different name
Characters, isSymbol: False, symbolTag: True // Different name
GotoToday, isSymbol: False, symbolTag: True // Different name
Unfavorite, isSymbol: False, symbolTag: True // Different name
Reshare, isSymbol: False, symbolTag: True // Different name
UnsyncFolder, isSymbol: False, symbolTag: True // Different name
BulletedList, isSymbol: False, symbolTag: True // Different name
Accounts, isSymbol: False, symbolTag: True // Different name

@AndrewKeepCoding What was the rule for when you added the symbol-icon tag? Also we need to think about the impact of the name being different than the value in the enum and the possible confusion

Code for ref:

var stSymbol = icon.Name;
var hasSymbol = Enum.IsDefined(typeof(Symbol), (Symbol)Convert.ToUInt32(icon.Code, 16)) || icon.SymbolName != null;
var hasSymbolTag = icon.Tags.Contains("symbol-icon");
if(hasSymbol != hasSymbolTag)
{
    Debug.WriteLine($"{icon.Name}, isSymbol: {hasSymbol}, symbolTag: {hasSymbolTag}");
}

@AndrewKeepCoding
Copy link
Contributor Author

@marcelwgn

What was the rule for when you added the symbol-icon tag?

I just extracted the codes from the Summary comment on each Symbol enum item. Then added the "symbol-icon" tag to each corresponding icon entry in IconsData.json. With a little help from ChatGPT of course.

Also we need to think about the impact of the name being different than the value in the enum and the possible confusion

Yeah, this is mentioned in #1880. I can fix that in the PR for #1972.

@marcelwgn
Copy link
Contributor

Also we need to think about the impact of the name being different than the value in the enum and the possible confusion

Yeah, this is mentioned in #1880. I can fix that in the PR for #1972.

Sure lets fix that in your pr for #1972, thank you for working on this!

@marcelwgn
Copy link
Contributor

/azp run

@niels9001 niels9001 merged commit 4acbf11 into microsoft:main Jul 30, 2025
2 checks passed
@AndrewKeepCoding AndrewKeepCoding deleted the symbol-icon-tag branch July 30, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants