Slot-based horizontal alignment in HorizontalLayout #5038
Labels
acceptance criteria
used for the acceptance criteria checklist
DS
Design System feature (e.g. component)
Description
An intuitive model for horizontally aligning elements in a HorizontalLayout, based on separate slots for left, center and right aligned elements.
Acceptance criteria
start
,center
,end
center
andend
HorizontalAlignment
with valuesSTART
,CENTER
,END
add(HorizontalAlignment alignment, Component... components)
start
) slotsetHorizontalAlignment(HorizontalAlignment alignment, Component... components)
start
->center
->end
order, so that index-based APIs work intuitivelycenter
andend
slots. This needs to be mentioned in the javadoc.getComponentCount()
etc will return total component count regardless of alignment slots.slot
attribute on elementsExamples
equivalent to
The above will render as
[S1 S2 C1 C2 E1 E2]
hl.getIndexAt(3)
=>C2
(note that this is despite C2 being added before S1 and S2)hl.addComponentAtIndex(3, C3)
=>[S1 S2 C1 C2 C3 E1 E2]
General criteria
Security
The text was updated successfully, but these errors were encountered: