[EuiComboBox] support append and prepend for group labels#7800
Conversation
- updates loki selector to body to prevent crashing VRT tests
packages/eui/src/components/selectable/selectable_list/selectable_list.stories.tsx
Outdated
Show resolved
Hide resolved
| append: ( | ||
| <EuiFlexItem css={{ alignItems: 'flex-end' }}>(append)</EuiFlexItem> |
There was a problem hiding this comment.
Hmmm that's odd, the append nodes shouldn't need extra CSS from consumers to get them to align to the right 🤔 Is this only happening for group labels? We may need to add some extra CSS in EUI if so
There was a problem hiding this comment.
Yes, currently this is "needed". The passed append/prepend is output as is. There is no further styling or layout handling added. (code here)
If we only pass the flex item it'll grow but it's left aligned

There was a problem hiding this comment.
Ahhh gotcha. I wonder if we should add more OOTB styling for this? Probably an out of scope question for this PR, I'll ponder it more later / during either the Emotion conversion for this component or the EuiComboBox<>Selectable work!
packages/eui/src/components/combo_box/combo_box_options_list/_combo_box_title.scss
Show resolved
Hide resolved
packages/eui/src/components/selectable/selectable_list/selectable_list.stories.tsx
Outdated
Show resolved
Hide resolved
cee-chen
left a comment
There was a problem hiding this comment.
✨ Thanks for the fast turnaround on this! We'll definitely need to figure out a way for keyboard users to reach interactive buttons inside group labels for ComboBoxes particularly, since tabbing won't work. We may have to talk to Trevor about that once he gets back!
Indeed, adding anything interactive on |
|
Preview staging links for this PR:
|
💚 Build Succeeded
History
|
`v94.5.2` ⏩ `v94.6.0` [Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams) --- ## [`v94.6.0`](https://github.com/elastic/eui/releases/v94.6.0) - Updated `EuiComboBox` to support rendering `option.append` and `option.prepend` in group labels ([#7800](elastic/eui#7800)) **Accessibility** - Improved the accessibility experience of `EuiBetaBadge` ([#7805](elastic/eui#7805))
`v94.5.2` ⏩ `v94.6.0` [Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams) --- ## [`v94.6.0`](https://github.com/elastic/eui/releases/v94.6.0) - Updated `EuiComboBox` to support rendering `option.append` and `option.prepend` in group labels ([elastic#7800](elastic/eui#7800)) **Accessibility** - Improved the accessibility experience of `EuiBetaBadge` ([elastic#7805](elastic/eui#7805))
Summary
closes #7798
This PR updates
EuiComboBoxto support the options propsappendandprependto be output for group label options withisGroupLabel=true. This aligns the behavior withEuiSelectable.example usage

Changes
appendandprependare output for group labelsEuiComboBoxandEuiSelectableQA
General checklist
Checked for accessibility including keyboard-only and screenreader modesAdded documentationProps have proper autodocs (using@defaultif default values are missing) and playground togglesChecked Code Sandbox works for any docs examplesAdded or updated jest and cypress testsIf applicable, added the breaking change issue label (and filled out the breaking change checklist) Designer checklistUpdated the Figma library counterpart