-
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
Improve EuiComboBox to unsure the input doesn't drop to the next line when badges are long #3968
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_3968/ |
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.
This is working nicely, just had a suggestion about variables and the CL.
CHANGELOG.md
Outdated
@@ -6,6 +6,7 @@ | |||
- 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)) |
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.
I think this entry would fall under Bug Fixes since this was a small bug.
Co-authored-by: Andrea Del Rio <[email protected]>
Preview documentation changes for this PR: https://eui.elastic.co/pr_3968/ |
Co-authored-by: Andrea Del Rio <[email protected]>
Thanks, @andreadelrio for suggesting those changes! 🎉 |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3968/ |
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.
🚀 LGTM
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}
andcompressed={true}
. As we can see here: https://codesandbox.io/s/fervent-bardeen-up43t?file=/index.jsChecklist
[ ] Checked in mobile[ ] 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