-
Notifications
You must be signed in to change notification settings - Fork 839
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][perf] Memoize low-impact components (A-C) #7635
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
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 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:
|
💚 Build Succeeded
History
|
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! |
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