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

[EuiLoadingSpinner] Change s-size to match EuiIcon #5440

Merged
merged 8 commits into from
Dec 7, 2021

Conversation

cee-chen
Copy link
Contributor

@cee-chen cee-chen commented Dec 3, 2021

Summary

Before

before

After

after

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 and playground toggles
- [ ] Added documentation
- [ ] Checked Code Sandbox works for any docs examples
- [ ] Added or updated jest and cypress 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

@cee-chen cee-chen changed the title [EuiButtonEmpty] Fix xs-sized button width jumping when icons switch to `isLoading [EuiButtonEmpty] Fix xs-sized button width jumping when icons switch to isLoading Dec 3, 2021
- widths would previously jump around due to the loading spinner being smaller than the icon
Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

My guess is we might more want to align the sizes of EuiLoadingSpinner to be the same sizes as our EuiIcon's. Can you do an audit of any other places in EUI that use this size of the loading spinner?

@kibanamachine
Copy link

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

@cee-chen
Copy link
Contributor Author

cee-chen commented Dec 3, 2021

EuiLoadingSpinner usage audit:

  • EuiAccordion - m size only, does not use size s
  • EuiButton and EuiButtonEmpty - only Empty uses size s
  • EuiFacetButton - m size only, does not use size s
  • EuiComboBox - m size only, does not use size s (even when compressed)
  • EuiFilePicker - m size only, does not use size s
  • EuiFormControlLayoutIcons - m size only, does not use size s
  • EuiSelectable - m size only, does not use size s
  • EuiSelectableTemplateSitewide - l size only, does not use s
  • EuiMarkdownEditor - upload button uses m sized EuiLoadingSpinner only, no other sizes
  • EuiSteps - l and xl sizes only, does not use s

m, l, and xl sizes are already aligned with EuiIcon/EuiStep, so changing the s size from 8px ($euiSizeS) to 12px ($euiSizeM) would only affect EuiButtonEmpty.

LMK what you think about just changing EuiLoadingSpinner directly!

@cchaos
Copy link
Contributor

cchaos commented Dec 4, 2021

Let's do it! We might want to call it a breaking change though, JIC someone was relying on that specific size.

@cee-chen cee-chen changed the title [EuiButtonEmpty] Fix xs-sized button width jumping when icons switch to isLoading [EuiLoadingSpinner] Change s-sizing to match EuiIcon Dec 6, 2021
@cee-chen
Copy link
Contributor Author

cee-chen commented Dec 6, 2021

Done! Tested in both Amsterdam and Legacy theme and the new size LGTM in both!

@cee-chen cee-chen requested a review from cchaos December 6, 2021 17:09
@cee-chen cee-chen changed the title [EuiLoadingSpinner] Change s-sizing to match EuiIcon [EuiLoadingSpinner] Change s-size to match EuiIcon Dec 6, 2021
@kibanamachine
Copy link

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

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Can you also update the compressed EuiFormControlLayout spinner's to render small instead of medium?
Screen Shot 2021-12-06 at 16 30 12 PM

@cee-chen
Copy link
Contributor Author

cee-chen commented Dec 6, 2021

Great call - it looks great!

@cee-chen cee-chen requested a review from cchaos December 6, 2021 22:10
@kibanamachine
Copy link

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

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

🙌 UI and code LGTM! There seems to be something funky in CI with the new test.

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

Just need to update the snapshot, otherwise LGTM!

@cee-chen
Copy link
Contributor Author

cee-chen commented Dec 7, 2021

Whoops, thanks y'all! Enabling auto-merge since it was just a snapshot/test name changing

@cee-chen cee-chen enabled auto-merge (squash) December 7, 2021 16:30
@kibanamachine
Copy link

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

@cee-chen cee-chen merged commit 2126dd0 into elastic:main Dec 7, 2021
@cee-chen cee-chen deleted the button-loading-xs branch December 7, 2021 17:14
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.

[EuiButtonEmpty] isLoading prop shifts overall size when size="xs"
4 participants