-
Notifications
You must be signed in to change notification settings - Fork 468
Users/aclerbois/dev v5/support icon #4520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dvoituron
merged 8 commits into
microsoft:dev-v5
from
AClerbois:users/aclerbois/dev-v5/support-icon
Feb 26, 2026
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
399b9c0
Add unit tests for IconPrompts, IconResources, IconService, IconSynonβ¦
AClerbois dc06f18
Implement feature X to enhance user experience and fix bug Y in module Z
AClerbois 458be40
Enhance icon search description and provide recommendation for retrieβ¦
AClerbois 895a303
Refactor code structure for improved readability and maintainability
AClerbois 135e112
Add all-icons.json to .gitignore for improved file management
AClerbois 62f495b
Add support for icon catalog JSON generation and embedding in project
AClerbois 1a987c1
Merge branch 'dev-v5' into users/aclerbois/dev-v5/support-icon
AClerbois f7c9170
Merge branch 'dev-v5' into users/aclerbois/dev-v5/support-icon
AClerbois File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| // ------------------------------------------------------------------------ | ||
| // This file is licensed to you under the MIT License. | ||
| // ------------------------------------------------------------------------ | ||
|
|
||
| namespace Microsoft.FluentUI.AspNetCore.McpServer.Models; | ||
|
|
||
| /// <summary> | ||
| /// Represents a Fluent UI icon with its available variants and sizes. | ||
| /// </summary> | ||
| /// <param name="Name">The icon name (e.g., "Bookmark", "Alert", "Add").</param> | ||
| /// <param name="Variants">Dictionary of variant names (e.g., "Filled", "Regular", "Light", "Color") to available sizes.</param> | ||
| public sealed record IconModel(string Name, IDictionary<string, IList<int>> Variants) | ||
| { | ||
| /// <summary> | ||
| /// Gets all variant names available for this icon. | ||
| /// </summary> | ||
| public IEnumerable<string> VariantNames => Variants.Keys; | ||
|
|
||
| /// <summary> | ||
| /// Gets all unique sizes available across all variants. | ||
| /// </summary> | ||
| public IEnumerable<int> AllSizes => Variants.Values.SelectMany(s => s).Distinct().OrderBy(s => s); | ||
|
|
||
| /// <summary> | ||
| /// Checks whether a specific variant and size combination is available. | ||
| /// </summary> | ||
| public bool HasVariantAndSize(string variant, int size) | ||
| { | ||
| return Variants.TryGetValue(variant, out var sizes) && sizes.Contains(size); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets the sizes available for a specific variant. | ||
| /// </summary> | ||
| public IReadOnlyList<int> GetSizesForVariant(string variant) | ||
| { | ||
| return Variants.TryGetValue(variant, out var sizes) ? sizes.ToList() : []; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.