-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EuiComboBox] support append and prepend for group labels #7800
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨ 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
EuiComboBox
to support the options propsappend
andprepend
to be output for group label options withisGroupLabel=true
. This aligns the behavior withEuiSelectable
.example usage
Changes
append
andprepend
are output for group labelsEuiComboBox
andEuiSelectable
QA
General checklist
Checked for accessibility including keyboard-only and screenreader modesAdded documentationProps have proper autodocs (using@default
if 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