-
Notifications
You must be signed in to change notification settings - Fork 844
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
[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/ |
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! 🎉
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/ |
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! 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
gap
or logical propertyrenderWithStyles()
in test (commented out for now)keyframes
for
loop for barsOkay descrepencies (See screenshot below)
index
, the math was simpler to adjust the non-animated version to trend downward instead of upward.gap
property, 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
tintOrShade
andshadeOrTint
functionscanAnimate
functions 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