eui
eui copied to clipboard
[FieldValueToggleFilter] Migrate from class to function component
Summary
- What: Converted
FieldValueToggleFilterfrom a class component to a function component. - Why: Closes #9473 โ part of the [Meta] Class component refactoring effort.
- How:
- Replaced
FCwithFunctionComponentand destructured props inline ({ config, query, onChange }), following the same style used in #9511. - Inlined the separate
valueChangedhelper intoonClick, removing one level of indirection. - Added
FieldValueToggleFilter.displayName = 'FieldValueToggleFilter'. - Added a changelog entry.
- Replaced
API Changes
| component / parent | prop / child | change | description |
|---|---|---|---|
| No public API changes | Internal refactor only |
Screenshots
N/A โ No visual changes. This is an internal refactor only.
Impact Assessment
- ~~๐ด Breaking changes~~ โ No breaking changes. Public API is identical.
- ~~๐ Visual changes~~ โ No visual changes.
- ~~๐งช Test impact~~ โ No test changes needed. All existing tests pass.
- ~~๐ง Hard to integrate~~ โ No integration impact. Drop-in replacement.
Impact level: ๐ข None
Release Readiness
- ~~Documentation:~~ No docs changes needed (internal refactor;
FieldValueToggleFilteris not exported) - ~~Figma:~~ N/A
- ~~Migration guide:~~ N/A (no breaking changes)
- ~~Adoption plan:~~ N/A (internal refactor)
QA instructions for reviewer
- Run the unit tests:
cd packages/eui && yarn test-unit --testPathPattern=field_value_toggle_filter - Run the TypeScript check:
cd packages/eui && npx tsc --noEmit - Verify
EuiSearchBarstill works by checking the search bar stories in Storybook.
Checklist before marking Ready for Review
- [x] Filled out all sections above
- ~~QA: Tested light/dark modes, high contrast, mobile, Chrome/Safari/Edge/Firefox, keyboard-only, screen reader~~ (no visual changes)
- ~~QA: Tested in CodeSandbox and Kibana~~ (internal component, not exported)
- ~~QA: Tested docs changes~~ (no docs changes)
- [x] Tests: All existing tests pass with no modifications needed
- [x] Changelog: Added changelog entry
- ~~Breaking changes:~~ N/A
๐ 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?