[Emotion][perf] Memoize loading components#7649
Merged
cee-chen merged 4 commits intoelastic:mainfrom Apr 4, 2024
Merged
Conversation
- not memoizing the inline style - usage is fairly low / it's not worth it + add story for easier testing
- it's not super complex, so just pair it with the main styles
- doesn't need theme tokens so can just be a static obj
- prefer static nth-child CSS over a dynamically generated function (since it's not like the bar count is customizable via prop) - inline the bar JSX and replace for loop with Array.from + fix the duplicate loading i18n (should be using the shared string with the same copy)
22 tasks
|
Preview staging links for this PR:
|
Collaborator
💚 Build Succeeded
|
tkajtoch
approved these changes
Apr 4, 2024
Member
tkajtoch
left a comment
There was a problem hiding this comment.
Changes look and work great!
Contributor
Author
|
Thanks Tomasz! |
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
Part of #7561 efforts
This PR:
EuiLoading*componentsEuiLoadingChartstyles are written/generated to use static:nth-childCSS instead of dynamic JS styles (98ebe26). Also removes its--monoclassName modifier - no usages in KibanaQA
General checklist
keyboard-only andscreenreader modes. Also checked withReduced motionsetting