[Emotion][perf] Memoize low-impact components (A-C)#7635
Merged
cee-chen merged 11 commits intoelastic:mainfrom Apr 2, 2024
Merged
[Emotion][perf] Memoize low-impact components (A-C)#7635cee-chen merged 11 commits intoelastic:mainfrom
cee-chen merged 11 commits intoelastic:mainfrom
Conversation
- make styles a static obj instead of a function
+ remove unnecessary props - consumers should apply those to the underlying cloned component instead
- remove `let`s in favor of `useMemo`s/conditional JSX - clean up/reorganize variables - make `visColors` a static const instead of per-component - fix test with image url not actually rendering the correct inline style, + remove background color/color calculations on avatars with images - they aren't using them (add a default gray bg instead)
- remove unnecessary `paddingSizeToClassNameMap` - not used anywhere in Kibana
- remove unnecessary `{ position }` CSS in favor of just writing it in the position styles
22 tasks
JasonStoltz
approved these changes
Apr 1, 2024
Member
JasonStoltz
left a comment
There was a problem hiding this comment.
I had a couple of questions about whether or not we need to add release notes for some of the changes, and a couple of questions about tests. Otherwise, looks good to me and nothing blocking.
|
Preview staging links for this PR:
|
Collaborator
💚 Build Succeeded
History
|
Contributor
Author
|
Going to go ahead and merge this since comments have been answered or addressed, but feel free to continue the conversation if you have other thoughts or there's anything more I can clarify! |
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
Basically every component that isn't on the medium impact list (#7561) and was easier to do a quick skim through. Some of the commits/components go a little extra on the cleanup though 😅 so as always, I recommend following by commit.
QA
General checklist