Repository navigation
[EuiSearchBar] Add top-level compressed prop, for both the search input and filter group - #9743
Conversation
…ut and filter group
|
💚 CLA has been signed |
|
👋 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? |
|
buildkite test this |
1 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuidatagrid (1 difference)
|
There was a problem hiding this comment.
Pull request overview
Adds a new top-level compressed API to EuiSearchBar and threads it through to both the search input and the filter group, enabling a consistent compact layout without CSS overrides.
Changes:
- Added
compressed?: booleantoEuiSearchBarPropsand forwarded it toEuiSearchBox+EuiSearchBarFilters - Added
compressed?: booleantoEuiSearchBarFiltersPropsand forwarded it toEuiFilterGroup - Updated Storybook, Jest snapshots, and added an upcoming changelog entry
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/eui/src/components/search_bar/search_filters.tsx | Adds compressed prop and forwards it to EuiFilterGroup |
| packages/eui/src/components/search_bar/search_filters.test.tsx | Adds snapshot coverage for compressed filters |
| packages/eui/src/components/search_bar/search_filters.stories.tsx | Adds Storybook arg for compressed |
| packages/eui/src/components/search_bar/search_bar.tsx | Adds top-level compressed prop and forwards to input + filters |
| packages/eui/src/components/search_bar/search_bar.test.tsx | Adds snapshot coverage for compressed search bar |
| packages/eui/src/components/search_bar/search_bar.stories.tsx | Adds Storybook arg for compressed |
| packages/eui/changelogs/upcoming/9743.md | Documents the new compressed prop for release notes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
buildkite test this |
|
buildkite test this |
💚 Build Succeeded
History
|
💚 Build Succeeded
History
|
mgadewoll
left a comment
There was a problem hiding this comment.
🟢 Changes are LGTM. They were tested and are working as expected.
@pradhicsha6 Thank you for contributing! 🎉
## Dependency updates `@elastic/eui` - v116.5.0 ⏩ v117.0.0 ## Changes - removes temporary custom styles in `src/core/packages/notifications/browser-internal/src/toasts/global_toast_list.tsx` (added previously in #273985) - removes custom icon usages passed via `children` on `EuiCallOut` to prevent duplication (callouts now have internal default icons per type) - updates tests and snapshots due to `EuiCallOut` changes ## Package updates ### `@elastic/eui` [`v117.0.0`](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Added `EuiIllustration` for rendering SVG illustrations (e.g. from `@elastic/eui-illustrations`) that respond to the active EUI color mode ([#9779](elastic/eui#9779)) - Added `compressed` prop to `EuiSearchBar` to enable compact display mode for the search box and filter buttons ([#9743](elastic/eui#9743)) - Added `addToChat` glyph to `EuiIcon` ([#9768](elastic/eui#9768)) - Updated `EuiCallOut`: ([#9642](elastic/eui#9642)) - Updated component styles - Added `text` prop on `EuiCallOut` which renders the main, inline callout description text - use this instead of `children` where possible - Added `actionProps` prop on `EuiCallOut` which renders primary and secondary action buttons - Added `showErrorTooltip` (defaulting to `true`) to `EuiSearchBar` to allow consumers to opt-out of the built-in parse-error tooltip ([#9773](elastic/eui#9773)) **Bug fixes** - Fixed `EuiToast` cutting off absolute positioned content by removing `overflow: hidden`. ([#9791](elastic/eui#9791)) - Fixed `EuiFlyout` container-scoped flyouts shrinking below usable widths for named sizes `s` and `m` by applying minimum width floors derived from theme breakpoints ([#9787](elastic/eui#9787)) - Fixed `EuiSelectable` with group labels rendering options with stale heights ([#9770](elastic/eui#9770)) **Breaking changes** - Removed the `accent` variant for `color` on `EuiCallOut` ([#9642](elastic/eui#9642))
## Dependency updates `@elastic/eui` - v116.5.0 ⏩ v117.0.0 ## Changes - removes temporary custom styles in `src/core/packages/notifications/browser-internal/src/toasts/global_toast_list.tsx` (added previously in elastic#273985) - removes custom icon usages passed via `children` on `EuiCallOut` to prevent duplication (callouts now have internal default icons per type) - updates tests and snapshots due to `EuiCallOut` changes ## Package updates ### `@elastic/eui` [`v117.0.0`](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Added `EuiIllustration` for rendering SVG illustrations (e.g. from `@elastic/eui-illustrations`) that respond to the active EUI color mode ([elastic#9779](elastic/eui#9779)) - Added `compressed` prop to `EuiSearchBar` to enable compact display mode for the search box and filter buttons ([elastic#9743](elastic/eui#9743)) - Added `addToChat` glyph to `EuiIcon` ([elastic#9768](elastic/eui#9768)) - Updated `EuiCallOut`: ([elastic#9642](elastic/eui#9642)) - Updated component styles - Added `text` prop on `EuiCallOut` which renders the main, inline callout description text - use this instead of `children` where possible - Added `actionProps` prop on `EuiCallOut` which renders primary and secondary action buttons - Added `showErrorTooltip` (defaulting to `true`) to `EuiSearchBar` to allow consumers to opt-out of the built-in parse-error tooltip ([elastic#9773](elastic/eui#9773)) **Bug fixes** - Fixed `EuiToast` cutting off absolute positioned content by removing `overflow: hidden`. ([elastic#9791](elastic/eui#9791)) - Fixed `EuiFlyout` container-scoped flyouts shrinking below usable widths for named sizes `s` and `m` by applying minimum width floors derived from theme breakpoints ([elastic#9787](elastic/eui#9787)) - Fixed `EuiSelectable` with group labels rendering options with stale heights ([elastic#9770](elastic/eui#9770)) **Breaking changes** - Removed the `accent` variant for `color` on `EuiCallOut` ([elastic#9642](elastic/eui#9642))



Summary
What:
Added support for the compressed prop to apply to both the search input and filter group in EuiSearchBar.
Modified files:
-packages/eui/src/components/search_bar/search_filters.tsx
-packages/eui/src/components/search_bar/search_bar.tsx
Why:
Fixes [EuiSearchBar] Add top-level
compressedprop, for both the search input and filter group #9712Previously, box={{ compressed: true }} only compressed the search input, but there was no way to compress the filter group.
This change provides a stable API to compress both elements together, ensuring visual consistency.
How:
Step 1: Made filters accept compressed prop
-Added compressed?: boolean to EuiSearchBarFiltersProps interface
-Passed it to EuiFilterGroup component
Step 2: Connected everything in EuiSearchBar
-Extracted compressed value from box.compressed
-Passed it to both the search input and filters
API Changes
Screenshots
Impact Assessment
Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.
Impact level: 🟢 None / 🟢 Low / 🟡 Moderate / 🔴 High
Release Readiness
QA instructions for reviewer
Checklist before marking Ready for Review
breaking changelabel (if applicable)Reviewer checklist