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 Aug 27, 2020
Merged
Conversation
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_3968/ |
andreadelrio
requested changes
Aug 26, 2020
Contributor
andreadelrio
left a comment
There was a problem hiding this comment.
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)) |
Contributor
There was a problem hiding this comment.
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>
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_3968/ |
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Contributor
Author
|
Thanks, @andreadelrio for suggesting those changes! 🎉 |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_3968/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
EuiBadgemax-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