Skip to content

[EuiSearchBar] Add top-level compressed prop, for both the search input and filter group - #9743

Merged
mgadewoll merged 7 commits into
elastic:mainfrom
pradhicsha6:feature/searchbar-compressed-prop
Jul 2, 2026
Merged

mgadewoll merged 7 commits into
elastic:mainfrom
pradhicsha6:feature/searchbar-compressed-prop

Conversation

@pradhicsha6

@pradhicsha6 pradhicsha6 commented Jun 21, 2026 •

Copy link
Copy Markdown
Contributor

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 compressed prop, for both the search input and filter group #9712
    Previously, 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

Component / Parent Prop / Child Change Description
EuiSearchBarFilters compressed Added New optional boolean prop to control compressed styling of the filter group
EuiSearchBar EuiSearchBarFilters Modified Now passes compressed prop from box.compressed to EuiSearchBarFilters

Screenshots

Before After
Before change - when compressed prop is true, only the search box is compressed and not the filter group

image
image
After change - when compressed prop is true, both the search box and filter group is compressed

image
image

Impact Assessment

Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.

  • 🔴 Breaking changes — What will break? How many usages in Kibana/Cloud UI are impacted?
  • 💅 Visual changes — May impact style overrides; could require visual testing. Explain and estimate impact.
  • 🧪 Test impact — May break functional or snapshot tests (e.g., HTML structure, class names, default values).
  • 🔧 Hard to integrate — If changes require substantial updates to Kibana, please stage the changes and link them here.

Impact level: 🟢 None / 🟢 Low / 🟡 Moderate / 🔴 High

Release Readiness

  • Documentation: {link to docs page(s)}
  • Figma: {link to Figma or issue}
  • Migration guide: {steps or link, for breaking/visual changes or deprecations}
  • Adoption plan (new features): {link to issue/doc or outline who will integrate this and where}

QA instructions for reviewer

Checklist before marking Ready for Review

Reviewer checklist

  • Approved Impact Assessment — Acceptable to merge given the consumer impact.
  • Approved Release Readiness — Docs, Figma, and migration info are sufficient to ship.

@pradhicsha6
pradhicsha6 requested a review from a team as a code owner June 21, 2026 17:46
@cla-checker-service

cla-checker-service Bot commented Jun 21, 2026 •

Copy link
Copy Markdown

💚 CLA has been signed

@github-actions github-actions Bot added the community contribution (Don't delete - used for automation) label Jun 21, 2026
@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?

@mgadewoll

Copy link
Copy Markdown
Contributor

buildkite test this

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
1 visual difference(s) found - expand to review, then click Approve visual changes to update baselines

euidatagrid (1 difference)

StoryBeforeAfterDiff
additional controls options desktop

@mgadewoll mgadewoll added the skip-vrt Skips Visual Regression Testing job in CI (clearly state why you're using it in your PR) label Jun 23, 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.

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?: boolean to EuiSearchBarProps and forwarded it to EuiSearchBox + EuiSearchBarFilters
  • Added compressed?: boolean to EuiSearchBarFiltersProps and forwarded it to EuiFilterGroup
  • 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.

@pradhicsha6
pradhicsha6 requested a review from mgadewoll June 24, 2026 15:25
@pradhicsha6
pradhicsha6 requested a review from mgadewoll June 29, 2026 14:45
@mgadewoll

Copy link
Copy Markdown
Contributor

buildkite test this

@mgadewoll

Copy link
Copy Markdown
Contributor

buildkite test this

@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.

🟢 Changes are LGTM. They were tested and are working as expected.
@pradhicsha6 Thank you for contributing! 🎉

@mgadewoll
mgadewoll merged commit 556b872 into elastic:main Jul 2, 2026
1 check passed
mgadewoll added a commit to elastic/kibana that referenced this pull request Jul 17, 2026
## 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))
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request Aug 5, 2026
## 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))
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-vrt Skips Visual Regression Testing job in CI (clearly state why you're using it in your PR)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiSearchBar] Add top-level compressed prop, for both the search input and filter group

3 participants