[EuiSelectable] UI enhancements#9411
[EuiSelectable] UI enhancements#9411mgadewoll wants to merge 10 commits intoelastic:feat/selectable-ui-enhancementsfrom
Conversation
fea8057 to
0745574
Compare
- using the variable size lsit is the only way to introduce the dividers as expected by design as we now have different heights to support
- this approach ensures we show soft scroll edges only when/where needed; it won't show the soft edge on unscrolled/fully scrolled edges
0745574 to
fca37aa
Compare
ek-so
left a comment
There was a problem hiding this comment.
Thank you Lene! Great job ππ»
As discussed, we'll need to look if we can do smth about custom slot (in this example, description takes way too much height, maybe we could make container fit the height of whatever is passed). Otherwise, looks good.
Thanks for the catch! π |
π Build SucceededHistory
cc @mgadewoll |
π Build Succeeded
History
cc @mgadewoll |
Summary
Important
This PR merges into a feature branch: feat/selectable-ui-enhancements
This PR updates
EuiSelectable(mainly through it's subcomponentsEuiSelectableListandEuiSelectableListItem) by introducing design changes and smaller internal composition refactors.Changes
EuiSelectableListandEuiSelectableListItemstyles (Figma, updated spacing)32pxitem heightonFocusBadgeby default8pxpadding on theEuiSelectablecomponent itself (as shown in the figma file) but instead rely on implementation containers. This is less strict and requires enforcement through guidance but it results in an easier API becauseEuiSelectableSearchandEuiSelectableListare passed to the implementation as render prop arguments which can be placed in any kind of composition (code).EuiSelectableListItemto useEuiCheckboxControlforsingleSelection=false(= multi selection)EuiSelectableListto useVariableSizeListinstead ofFixedSizeListfromreact-windowEuiSelectableListoverflow scroll styles to useanimation-timelineEuiSelectableSearch'scompresseddefault value totruepaddingSizeprop fromEuiSelectableListandEuiSelectableListItem(π΄ breaking change)Why are we making this change?
π UI modernization and consistency: This update is part of the larger initiative to unify selection list designs (https://github.com/elastic/platform-ux-team/issues/1050).
Screenshots #
EuiSelectableListItemchecked` stateschecked={undefined}checked="on"checked="off"checked="mixed"EuiSelectableListItemwith custom contentImpact to users
π΄ Breaking change: This PR removes
paddingSizefromEuiSelectableListandEuiSelectableListItem.Kibana usages (10)
Cloud-UI usages (1)
QA
EuiSelectableListItemmatches design specs for different values ofsingleSelectionin combination with different values ofchecked(rendersEuiCheckboxControlifsingleSelection=falseand icons whensingleSelection=true)EuiSelectableListItem(after updating to useEuiCheckboxControl)EuiSelectableListgroup labels work as expected and match design specsEuiSelectableListworks as expected (hidden on top when unscrolled, hidden on bottom when scrolled to the end, hidden entirely when the container has no overflow)EuiSelectableListhas no functional regression (after updating to useVariableSizeList)EuiSelectableSearchis by default rendered ascompressed(32pxheight)General checklist
@defaultif default values are missing) and playground toggles