-
Notifications
You must be signed in to change notification settings - Fork 720
Support custom styles for resource style #3210
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
Conversation
- Added support for sending custom style to the dashboard via the resource server protocol. - Use this for azure resource to show more descriptive state updates.
| // The list of urls that this resource exposes | ||
| repeated Url urls = 13; | ||
|
|
||
| // The style of the state. This is used to determine the state icon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider encoding a FluentUI icon name (e.g. ErrorCircle), style (e.g. Filled) and colour (e.g. Blue) here instead? That would give a lot more control over the UI to the server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer that actually. So just parse the enum? Should it be something like "Icons.Filled.Size16.Warning"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like they're not enums: https://github.com/microsoft/fluentui-blazor/tree/main/src/Assets/FluentUI.Icons/Icons
This method might help, though it doesn't look cheap so results should be cached:
https://github.com/microsoft/fluentui-blazor/blob/main/src/Assets/FluentUI.Icons/Icons.cs#L20
You pass it an instance of IconInfo which takes name, size and variant (filled/regular).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to stick with fixed names.
|
|
||
| }).ConfigureAwait(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make consistent with the code below:
| }).ConfigureAwait(false); | |
| }) | |
| .ConfigureAwait(false); |
src/Aspire.Hosting.Azure/Provisioning/Provisioners/AzureProvisioner.cs
Outdated
Show resolved
Hide resolved
- This avoid reusing old state styles by mistake when changing text - Added KnownResourceStyles
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/backport to release/8.0-preview5 |
|
Started backporting to release/8.0-preview5: https://github.com/dotnet/aspire/actions/runs/8462618319 |
Contributes to #2590
Contributes to #2415
Fixes #2816