[Emotion] Converted EuiLoadingChart#5821
Conversation
- Added tintOrShade and shadeOrTint functions - Converted margins to use either `gap` or logical property - Couldn’t convert `keyframes` yet
- Updated `canAnimate` functions to accept and return the css object
Things to look out for when moving styles
QA
|
|
@1Copenut I've updated a few props on this specific loading component according to this ticket: #4814
I didn't do the full documentation or any of the |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5821/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5821/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5821/ |
elizabetdev
left a comment
There was a problem hiding this comment.
LGTM! 🎉
Tested in Chrome, Safari, and Firefox. Also tested with reduce motion turned on.
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5821/ |
1Copenut
left a comment
There was a problem hiding this comment.
LGTM! I added one review comment as a thought that I'll develop into a full ticket shortly.
| <span | ||
| className={classes} | ||
| css={cssStyles} | ||
| role="progressbar" |
There was a problem hiding this comment.
I agree with this iterative approach. Adding the role="progressbar" and aria-label="Loading" give clues that content is being fetched async. This technique assumes screen reader users are navigating node to node, using the virtual/browse mode. Users navigating by focus with the TAB key will not land on the loading indicator. Users who are listening for cues via live regions will also never hear this information.
I'm going to open a spike ticket to explore this concept in a future breaking change. I'd like to see us use the aria-busy attribute and move to a role="status" for these loading indicators. That way screen readers will announce changes as a live region without requiring us to manage focus or users to seek them out.
There was a problem hiding this comment.
🙌 Thank you! I'm converting the rest of the loading components too. Should I add these same properties?
There was a problem hiding this comment.
Yes, let's add the role="progressbar" and aria-label="Loading" consistently. Great call!
…ding_chart # Conflicts: # src/global_styling/variables/_animations.ts
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5821/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5821/ |
Summary
gapor logical propertyrenderWithStyles()in test (commented out for now)keyframesforloop for barsOkay descrepencies (See screenshot below)
index, the math was simpler to adjust the non-animated version to trend downward instead of upward.gapproperty, the first bar no longer as an added margin left so all the loaders a slightly skinnier and sit better in their full bounds.Helper adjustments / additions
tintOrShadeandshadeOrTintfunctionscanAnimatefunctions to accept and return the css object (@thompsongl to look into this further)Checklist
[ ] Checked in mobile[ ] Props have proper autodocs and playground toggles[ ] Added documentation[ ] Checked Code Sandbox works for any docs examples[ ] Checked for breaking changes and labeled appropriately