SchwarzIT / onyx

🚀 A design system and Vue.js component library created by Schwarz IT
https://onyx.schwarz
Apache License 2.0
57 stars 6 forks source link

Fix checkbox optional/required marker not shown when truncated #698

Closed larsrickert closed 7 months ago

larsrickert commented 7 months ago

The optional/required marker is not shown when truncated with ellipsis

Image

Definition of Done

Approval

BoppLi commented 7 months ago

[12:58 PM] Linda Bopp Optional label behavior and truncation ux I have a question about the intended behavior of the "optional" label in combination with truncation and multiline mode. Currently it behaves like this (https://github.com/SchwarzIT/onyx/issues/698) (see screenshot in ticket)

in the first example, should "optional" be fixed to the right and the "Very long label" will be even shorter until the ... happens? in the last example, can it stay as it is? in the following example, should the optional labels be right-aligned on the same position?

Image


[1:04 PM] Jannick Keller To the first question: Yes the optional-label has a higher priority than the checkbox-label. Therefore the optional-label will be fully readable on the right and the checkbox-label will use the rest of the available space (pending on the max width) before it gets ...truncated.

The last example of the top image is correct.

To the second image: the optional-labels don't have to be aligned to the same vertical position.