Skip to content

Conversation

cee-chen
Copy link
Contributor

@cee-chen cee-chen commented Mar 29, 2024

Summary

Part of #7561 efforts

These were fairly straightforward memoizations of the following components and their subcomponents:

  • EuiContextMenu
  • EuiBadge (and all sibling badge components)
  • EuiTabs/Tab
  • EuiDescriptionList/Title
  • EuiEmptyPrompt
  • EuiHorizontalRule (+ removes modifier classes with no usages/references in Kibana)
  • EuiCallOut (slightly more judicious use of useMemo and inline JSX here)

QA

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in Chrome, Safari, Edge, and Firefox
      - [ ] Checked in mobile
      - [ ] Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA - N/A
  • Code quality checklist - N/A, tests should pass as before with no regressions
  • Release checklist - N/A, skipping a changelog as this is mostly tech debt and shouldn't affect either consumers or end-users
  • Designer checklist - N/A

@cee-chen cee-chen added skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) tech debt emotion performance labels Mar 29, 2024
@cee-chen cee-chen marked this pull request as ready for review April 3, 2024 20:33
@cee-chen cee-chen requested a review from a team as a code owner April 3, 2024 20:33
- note: conditional JSX not touched here because 'link or button' logic will be a separate future refactor
@cee-chen cee-chen force-pushed the emotion/memoization-medium-easy branch from 4260a51 to 5fb7f47 Compare April 3, 2024 20:49
- note: conditional JSX not touched here because 'link or button' logic will be a separate future refactor
@cee-chen cee-chen force-pushed the emotion/memoization-medium-easy branch from 5fb7f47 to e9e1dca Compare April 3, 2024 21:05
cee-chen added 5 commits April 3, 2024 14:24
- not going to try anything fancy here, class components are a headache
- a neat example of DRYing out existing perf attempts!
- `optionalChildren` isn't worth memoizing because children rerenders too often

+ move `.euiCallOut__icon` to header styles since it's only used in that DOM
@cee-chen cee-chen force-pushed the emotion/memoization-medium-easy branch from e9e1dca to 8a4c58f Compare April 3, 2024 21:26
@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

Copy link
Contributor

@mgadewoll mgadewoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 🐈‍⬛ Everything looks great and looks/works as before 👍

@cee-chen cee-chen merged commit 88d2dbb into elastic:main Apr 4, 2024
@cee-chen cee-chen deleted the emotion/memoization-medium-easy branch April 4, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emotion performance skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) tech debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants