Skip to content
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] Added loading icon to combobox input #4015

Merged
merged 5 commits into from
Sep 8, 2020

Conversation

ashikmeerankutty
Copy link
Contributor

@ashikmeerankutty ashikmeerankutty commented Sep 5, 2020

Summary

Fixes: #3852

  • Add loading icon to EuiComboBox input when isLoading is true.

Screen Cast 2020-09-05 at 6 49 33 PM

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

@kibanamachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@elizabetdev
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

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

Copy link
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

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

Hi @ashikmeerankutty,

Thanks for tackling this issue. I just found a minor issue.

When the loading isLoading is true you need to add extra padding or the cursor will overlap the icons. As you can see on the following screenshots:

Screenshot 2020-09-07 at 19 32 00

Screenshot 2020-09-07 at 19 40 30

You can probably add an -isLoading className like we're doing here:

const classes = classNames(
'euiSuperSelectControl',
{
'euiSuperSelectControl--fullWidth': fullWidth,
'euiSuperSelectControl--compressed': compressed,
'euiSuperSelectControl--inGroup': prepend || append,
'euiSuperSelectControl-isLoading': isLoading,
'euiSuperSelectControl-isInvalid': isInvalid,
},
className
);

Then use this -isLoading className to add the extra padding.

@ashikmeerankutty
Copy link
Contributor Author

Hi @miukimiu
I have added 3 icons padding to combobox when onLoading is true. Can you please check if thats okay.

Copy link
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

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

Thanks @ashikmeerankutty.

I added more padding exceptions because we can have situations where isClearable={false} and isLoading={true}. So just adding @include euiFormControlLayoutPadding(3); for .euiComboBox__inputWrap-isLoading creates too much padding.

Screenshot 2020-09-08 at 11 42 12

Also, there were paddings missing for the compressed combobox.
Screenshot 2020-09-08 at 11 52 25

I pushed an update cce3399 with a few expectations and now it's good to merge.

@elizabetdev
Copy link
Contributor

jenkins test this

@ashikmeerankutty
Copy link
Contributor Author

@miukimiu I thought about the first case. Missed to comment them. Thank you for the solution 😄

@kibanamachine
Copy link

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

@elizabetdev
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

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

@elizabetdev elizabetdev merged commit 38f847b into elastic:master Sep 8, 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.

[EuiComboBox] Add the loading spinner to input when isLoading
3 participants