Skip to content

Improve EuiComboBox to unsure the input doesn't drop to the next line when badges are long#3968

Merged
elizabetdev merged 6 commits intoelastic:masterfrom
elizabetdev:long-combobox-option-wrap
Aug 27, 2020
Merged

Improve EuiComboBox to unsure the input doesn't drop to the next line when badges are long#3968
elizabetdev merged 6 commits intoelastic:masterfrom
elizabetdev:long-combobox-option-wrap

Conversation

@elizabetdev
Copy link
Copy Markdown
Contributor

Summary

This PR closes #3775. Long badges were creating a new line for the hidden input.

Tho fix the issue as @snide suggested on #3775 I changed the default EuiBadge max-width: 100% and did a calc that subtract the width of the hidden input plus a small margin.

I also noticed that there was an issue with long badges when isClearable={false} and compressed={true}. As we can see here: https://codesandbox.io/s/fervent-bardeen-up43t?file=/index.js

Combobox badge long text@2x

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • [ ] Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • [ ] Props have proper autodocs
  • [ ] Added documentation
  • [ ] Checked Code Sandbox works for the any docs examples
  • [ ] Added or updated jest tests
  • [ ] Checked for breaking changes and labeled appropriately
  • [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@elizabetdev elizabetdev changed the title Ensure the input doesn't drop to the next line Improve EuiComboBox to unsure the input doesn't drop to the next line when badges are long Aug 26, 2020
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3968/

@cchaos cchaos requested a review from andreadelrio August 26, 2020 17:31
Copy link
Copy Markdown
Contributor

@andreadelrio andreadelrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working nicely, just had a suggestion about variables and the CL.

CHANGELOG.md Outdated
- Removed docgenInfo from non-docs production builds ([#3911](https://github.com/elastic/eui/pull/3911))
- Added `regressionJob`, `outlierDetectionJob` and `classificationJob` icons to Machine Learning icon set, updated others. ([#3931](https://github.com/elastic/eui/pull/3931))
- Added `operator` field to `EuiSearchBar`'s `field_value_selection` filter configuration ([#3922](https://github.com/elastic/eui/pull/3922))
- Improved `EuiComboBox` styles to unsure the input doesn't drop to the next line when `EuiBadge` has a very long text ([#3968](https://github.com/elastic/eui/pull/3968))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this entry would fall under Bug Fixes since this was a small bug.

Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3968/

@elizabetdev
Copy link
Copy Markdown
Contributor Author

Thanks, @andreadelrio for suggesting those changes! 🎉

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3968/

Copy link
Copy Markdown
Contributor

@andreadelrio andreadelrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 LGTM

@elizabetdev elizabetdev merged commit 52f00a7 into elastic:master Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Long EuiComboBox option causes parent EuiFlexItem to wrap

3 participants