Skip to content

[EuiSearchBar] Memoize field value selection filter styles - #10258

Merged
mgadewoll merged 5 commits into
elastic:mainfrom
Mittalnew:perf/memoize-search-bar-filter-styles
Nov 16, 2026
Merged

mgadewoll merged 5 commits into
elastic:mainfrom
Mittalnew:perf/memoize-search-bar-filter-styles

Conversation

@Mittalnew

Copy link
Copy Markdown
Contributor

Closes #10163

Switches FieldValueSelectionFilter from RenderWithEuiTheme to RenderWithEuiStylesMemoizer, since it is a class component and cannot use the useEuiMemoizedStyles hook. euiFilterGroupStyles is now read through the memoizer instead of being regenerated on every render. Behavior is unchanged.

No visual or API change. The issue says no changelog is needed, so none is added. Could a maintainer add the skip-changelog label?

I ran eslint, prettier, tsc and the search_bar unit tests locally, and they pass.

Copilot AI balanced review requested due to automatic review settings October 28, 2026 16:42
@Mittalnew
Mittalnew requested a review from a team as a code owner October 28, 2026 16:42
@cla-checker-service

cla-checker-service Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

💚 CLA has been signed

@github-actions

Copy link
Copy Markdown

👋 Since this is a community submitted pull request, a Buildkite build has not been started automatically. Would an Elastic organization member please verify the contents of this pull request and kick off a build manually?

@github-actions github-actions Bot added the community contribution (Don't delete - used for automation) label Oct 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the search filter style memoization change.

No open issues 🎉

What changed in this PR

Memoizes the search bar’s field value selection filter styles, addressing #10163 without changing behavior, appearance, or the public API.

Changes:

  • Replaces RenderWithEuiTheme with RenderWithEuiStylesMemoizer for the class component.
  • Retrieves euiFilterGroupStyles through the memoizer instead of regenerating styles on each render.
File Description
packages/​eui/​src/​components/​search_bar/​filters/​field_value_selection_filter.tsx Uses memoized theme styles for the filter’s popover panel.

Review effort: Balanced

@Mittalnew

Copy link
Copy Markdown
Contributor Author

I have signed the Elastic contributor agreement with the same email I used for the commit ([[email protected]](mailto:[email protected])). Could someone re-run the CLA check, and could an Elastic member kick off the Buildkite build when convenient? Thank you.

@mgadewoll mgadewoll added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Nov 5, 2026
@mgadewoll

Copy link
Copy Markdown
Contributor

buildkite test this

@mgadewoll
mgadewoll self-requested a review November 5, 2026 14:22
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

@mgadewoll mgadewoll left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 LGTM. Thanks for contributing! 🎉

@mgadewoll
mgadewoll merged commit 683d330 into elastic:main Nov 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community contribution (Don't delete - used for automation) skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Emotion] Memoize EuiSearchBar filter styles

5 participants