umbraco / Umbraco.UI

Umbraco UI Components
MIT License
123 stars 46 forks source link

Swatches with labels are not shown in the best way #423

Closed loivsen closed 1 year ago

loivsen commented 1 year ago

Which exact UI Library version are you using? For example: 1.0.1 - don't just write v1.

1.0.0, branch color-picker

Bug summary

When we show label for <uui-swatches> and <uui-swatch>, they may take up odd space, especially if the labels for all swatches are not the same length. See picture image

There really isnt much room for the labels, but they look wonderful in other places like eye-dropper, icon-picker, etc. where labels arent needed.

A suggestion would be that they change form/size if the labels are being shown. In the old backoffice it looked like this with plenty of space for the color, the label, and the color code image

May also consider how the swatch should handle super long labels. (like the uui-table handles overflow, see https://uui.umbraco.com/?path=/story/uui-table--overflow-detection)

Specifics

No response

Steps to reproduce

Set the show labels to true. <uui-color-swatch value="#FF0000" label="I am a beautiful color" showLabel="true"></uui-color-swatch>

Expected result / actual result

No response

iOvergaard commented 1 year ago

Will be released with 1.2.0.