feat: add Appearance to FluentProgressRing #1688
Replies: 2 comments 7 replies
-
Hi, I don't think Appearance is a correct term/way to style the ProgressRing. At tleast, that is not how the Fluent Design is using that. What would happen if you set a ProgressRing to stealth appearance? Does it only display when the mouse moves over it? Users (both developers and end-users excpect a certain commonality in the terms used and the effects of using it produce. We feel the Color parameter offers enough customization for this specific elelment/component. And by providing that option, we are already strechtching the limits a bit
We do that by design. The system determines the color of the ProgressRing then, just as it determimes the text color (mostly to guard contrast is sufficient)
There is no notion of an Accent background in the design system. It is just a fill color. Setting accent to black would mean an Acen button would be black, the Tabs indicator would be black, a 'on' switch would be black, etc. Turning this into a discussion item so others can chime in. |
Beta Was this translation helpful? Give feedback.
-
It may have been my misunderstanding about how the design system flows through the components. My experience with a Component Composition similar to this caused the FluentProgressRing to be invisible when Appearance was set to "Accent"
This lead me to believe that the ProgressRing should adopt a complimentary colour in the configured code snippet above. It in fact does not. If IsBusy is true. With the following usage of the above component (assume it's called "BusyButton")
produces the following experience: I would have expected "Alt Busys" FluentProgressRing to be visible. however it seems to have adopted exactly the same colour as the buttons background colour (Which I believe is derrived from the AccentBaseColor Design Token) |
Beta Was this translation helpful? Give feedback.
-
🙋 Feature Request
The ability to configure the Appearance similar to other Fluent components.
🤔 Expected Behavior
<FluentProgressRing Appearance=Appearence />
😯 Current Behavior
💁 Possible Solution
An implementation of Appearance on the
FluentProgressRing
to allow per-component theming changes between the built-in colour sets. (Neutral, Accent, Lightweight, Stealth, etc)Where this isn't available (possibly due to the wrapped framework also not supporting it). A nicer way to get a Colour HexString from a Swatch, or advice where this extension method exists already.
🔦 Context
As part of componentising some functionality, a FluentProgressRing appears on top of a FluentButton.
The FluentButton can be configured with the Appearance property to (normally dramatically) change the Colour of the button. Either to make it pop out more in contrast to other buttons, or to indicate some preference, etc. The same Appearance configuration cannot be provided to the FluentProgressRing So given contrasts between Accent and Neutral colour configurations, sometimes an Accent Background is displayed along or behind a Neutral foreground. these colours are often not complimentary. (For example, Accent background may be black instead of white, where a Neutral is white background black foreground). With these 2 combined it makes it impossible to see.
A workaround we have introduced is to inject the NeutralForegroundActive and AccentForegroundActive design tokens and read the value off of the FluentButton depending on the value of Appearance. This lead us to another issue that you can only provide a Hex colour string to FluentProgressRing and there appears to be no "ToHexColor" or similar extension method for
Swatch
es. If you feel this would be a useful feature request in itself (I certainly think so) then I will raise it separately. Or I'd love to be told where this extension method lives, so that I can use a similar method without having to put frameworky code in my solution.💻 Examples
Provided in Current Behavior and Expected Behavior
Beta Was this translation helpful? Give feedback.
All reactions