Repository navigation
feat(search_bar): Add isInvalidTooltipDisabled prop to opt-out of error tooltip - #9773
Conversation
|
💚 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 |
There was a problem hiding this comment.
Pull request overview
Adds an opt-out to EuiSearchBar’s built-in invalid-query tooltip so consumers that already render their own parse error UI (e.g., Kibana) don’t end up with duplicated/overlapping error messaging.
Changes:
- Added
isInvalidTooltipDisabled?: booleanprop toEuiSearchBar. - Conditionally skips the
EuiToolTipwrapper around the search box when the prop istrue. - Added a Jest test + upcoming changelog entry for the new behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/eui/src/components/search_bar/search_bar.tsx | Adds the new prop and conditionally renders the tooltip wrapper |
| packages/eui/src/components/search_bar/search_bar.test.tsx | Adds coverage for disabling the invalid-query tooltip |
| packages/eui/changelogs/upcoming/9754.md | Documents the new opt-out prop in the upcoming changelog |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuisuperdatepicker (2 differences)
|
|
buildkite test this |
|
Sorry, but can you run the buildkite just one more time. 😅 |
|
buildkite test this |
|
@Naveen2070 tests are timing out and there are formatting issues in the test file, have you ran them locally and made sure they pass? It's absolutely fine to use LLM but you are responsible for the PR, so please make sure you validate its output before pushing 🙏🏻 Run the tests, verify they pass, that everything is formatted correctly and run the documentation website, make sure the section looks as expected! We make it easy by building and deploying Storybook for every open PR, linking in a PR comment. Unverified output means back-and-forth that we'd both rather avoid and checking it yourself first would save us both time! 😄
(there's no validation error here and
|
|
You're right 😅 — I pushed without properly checking it. Fixed now:
|
|
@weronikaolejniczak Can you initiate the buildkite one more time |
|
@Naveen2070 there's a conflict because we've just merged a PR in the search bar. Could you take a look? 🙏🏻 Thank you for addressing my concerns. |
- Use `queryByRole('tooltip')` and `fireEvent.mouseOver` for reliable tooltip tests
- Wrap `userEvent.type` in `act()` to eliminate test warnings/timeouts
- Merge consumer `aria-describedby` with the hint id instead of overriding it
- Simplify the validation error docs example and correctly wire `aria-describedby` to the rendered error message
…nition Address PR review feedback: swap fireEvent.mouseOver for userEvent.hover in tooltip tests, and move the showErrorTooltip accessibility guidance into an accessibility admonition block.
ffbc6b5 to
74b93df
Compare
|
Rebased the branch onto the latest |
Address PR review feedback for a lighter-weight error message component in the accessibility example.
|
Thank you so much for being so patient with me! 🙏 I've made the latest change to use Also, sorry for all the extra iterations 😅 I'm still pretty new to open-source/community contributions, and I should've double-checked things more carefully before pushing. I'll definitely be more mindful of that going forward. Really appreciate all your guidance and reviews. Looking forward to contributing more. |
💚 Build Succeeded
History
|
💚 Build Succeeded
History
|
weronikaolejniczak
left a comment
There was a problem hiding this comment.
Everything works as I'd expect it to now! 🟢 Thank you for contributing, @Naveen2070 🙏🏻
And it's absolutely okay, we're all learning. The best advice I can give for being en engineer in these LLM-powered times is don't offload your critical thinking to LLM. You are the driver and you are the one responsible for the result. Always double-check is up to best standards. If there's anything you are unsure about, you can always ask the maintainers.
As for everything else, like using EuiFormErrorText and not EuiCallOut, these things are expected because you're not familiar with our codebase. That'll come with time ;)
## 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 an optional showErrorTooltip prop (defaulting to true ) to EuiSearchBar .
• Why: Fixes #9754. Currently, when EuiSearchBar encounters an invalid query, it always renders its internal
error.message inside an EuiToolTip . For consumers (like Kibana) that already render their own custom error UI,
this creates duplicated and overlapping error messages.
• How: Destructured showErrorTooltip in EuiSearchBar and used it to conditionally render the EuiToolTip
wrapper. If false , it simply renders the searchBox without the tooltip.
API Changes
Screenshots
Impact Assessment
Note: Most PRs should be tested in Kibana https://github.com/elastic/eui/blob/main/wiki/contributing-to-
eui/testing/testing-in-kibana.md 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 — Added unit tests in search_bar.test.tsx using userEvent to verify the tooltip is
suppressed when showErrorTooltip={false} , and that aria-invalid is properly asserted.
[ ] 🔧 Hard to integrate — If changes require substantial updates to Kibana, please stage the changes and link them
here.
Impact level: 🟢 Low
Release Readiness
[✓] Documentation: Auto-generated via react-docgen from the new TSDoc comment in search_bar.tsx , and added a
new "Validation error" section to search-bar.mdx explaining accessibility requirements when opting out.
[ ] Figma:
[ ] Migration guide:
[ ] Adoption plan (new features):
QA instructions for reviewer
• Open the EuiSearchBar component in the documentation/playground.
[ ] Confirm that by default, entering an invalid EQL query (e.g., status: ) still shows the built-in error
tooltip.
[ ] Pass showErrorTooltip={false} to the component.
[ ] Enter an invalid EQL query and confirm the search box turns red (error state) but the tooltip does not appear.
Checklist before marking Ready for Review
[✓] Filled out all sections above
[ ] QA: Tested light/dark modes, high contrast, mobile, Chrome/Safari/Edge/Firefox, keyboard-only, screen reader
(N/A - logic change only)
[ ] QA: Tested in CodeSandbox and Kibana
[✓] QA: Tested docs changes (Auto-generated via TSDoc and manual MDX updates)
[✓] Tests: Added/updated Jest
[✓] Changelog: Added changelog entry to changelogs/upcoming/
[ ] Breaking changes: Added breaking change label (if applicable)
Reviewer checklist
[ ] Approved Impact Assessment — Acceptable to merge given the consumer impact.
[ ] Approved Release Readiness — Docs, Figma, and migration info are sufficient to ship.