SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.5k stars 260 forks source link

Harmonize color-scheme values #6466

Open kaistephanrichter opened 1 year ago

kaistephanrichter commented 1 year ago

Feature Request Description

For the color scheme attribute in the ui5-avatar and the ui5-badge you are using different values. This is confusing and hard to remember.

Proposed Solution

As both seem to have a similar effect, it would be an improvement of the API to align both values and use either "Accent#" or "#" in both cases. I would suggest "Accent#" as this would allow for other color-scheme values in future as well.

Priority

Streamlining and harmonising the API makes it easier to work with the components.

Stakeholder Info (if applicable)

niyap commented 1 year ago

Hello @SAP/ui5-webcomponents-topic-rd,

Could you please check that feature request? The reporter ask for a type similar to AvatarColorScheme to be used for the "colorScheme" property of the ui5-badge component.

Thank you in advance!

Kind Regards, Niya

kaistephanrichter commented 1 year ago

Similar would be good for the size attributes that vary in the different components. Those that I came across so far:

georgimkv commented 1 year ago

Hi @kaistephanrichter

We already have provided enums for the:

We'll evaluate the feature request about the colorScheme.

kaistephanrichter commented 1 year ago

Thank you @gmkv. I know, I took the values from those sources.

It is only that also here, similar to the color-scheme, you could think about offering a consistent set of values as they describe more or less the same but you need to remember different values if you want to use them. Instead of using "Medium" in the busy indicator you could alternatively allow also "M" as in the avatar. Same for the illustrated message where "Spot" also is equivalent to "S" and "Scene" could be replaced with "XL" eventually.