Support custom styles for resource style#3210
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.
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.
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.
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.
I decided to stick with fixed names.
|
|
||
| }).ConfigureAwait(false); |
There was a problem hiding this comment.
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