Skip to content

[EuiSearchBar] Fix quoted phrases (without a field) removing quotes - #6714

Merged
cee-chen merged 2 commits into
elastic:mainfrom
s-nel:quote-separate-terms
Apr 17, 2023
Merged

cee-chen merged 2 commits into
elastic:mainfrom
s-nel:quote-separate-terms

Conversation

@s-nel

@s-nel s-nel commented Apr 16, 2023 •

Copy link
Copy Markdown
Contributor

Summary

This PR fixes an issue where multi-word terms (without a field) aren't quoted properly when converted to an Elasticsearch query.

Before

Screenshot 2023-04-17 at 8 16 40 AM

After

Screenshot 2023-04-17 at 8 16 19 AM

QA

General checklist

  • Added documentation
  • Added or updated jest and cypress tests
  • Checked for breaking changes and labeled appropriately
  • A changelog entry exists and is marked appropriately

- [ ] Checked in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in Chrome, Safari, Edge, and Firefox
- [ ] Checked Code Sandbox works for any docs examples
- [ ] Props have proper autodocs (using @default if default values are missing) and playground toggles
- [ ] Checked for accessibility including keyboard-only and screenreader modes
- [ ] Updated the Figma library counterpart

@s-nel
s-nel force-pushed the quote-separate-terms branch 2 times, most recently from 5fa5c7c to be2e798 Compare April 16, 2023 10:02
@s-nel s-nel self-assigned this Apr 16, 2023
@s-nel s-nel added bug breaking change PRs with breaking changes. (Don't delete - used for automation) labels Apr 16, 2023
@s-nel
s-nel force-pushed the quote-separate-terms branch from be2e798 to 8638ac8 Compare April 16, 2023 10:15
@kibanamachine

Copy link
Copy Markdown
Contributor

@s-nel
s-nel marked this pull request as ready for review April 16, 2023 10:54
Comment thread upcoming_changelogs/6714.md Resolved
@cee-chen cee-chen removed the breaking change PRs with breaking changes. (Don't delete - used for automation) label Apr 17, 2023

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

Thank you so much for this fantastic fix, tests, and documentation - it's seriously very appreciated!

@cee-chen cee-chen changed the title Quote simple_query_string terms [EuiSearchBar] Fix quoted phrases (without a field) removing quotes Apr 17, 2023
@cee-chen
cee-chen enabled auto-merge (squash) April 17, 2023 15:53
@kibanamachine

Copy link
Copy Markdown
Contributor

@cee-chen
cee-chen merged commit dc143b6 into elastic:main Apr 17, 2023
@s-nel

s-nel commented Apr 17, 2023

Copy link
Copy Markdown
Contributor Author

Thanks! I wanted to err on the side of caution since the interface is changing (even though it's fixing a bug) 🙇

mistic pushed a commit to elastic/kibana that referenced this pull request May 5, 2023
## Summary

`[email protected]` ⏩ `[email protected]`

Closes elastic/eui#6724

---

## [`77.2.2`](https://github.com/elastic/eui/tree/v77.2.2)

- Updated `EuiFocusTrap` to support the `gapMode` prop configuration
(now defaults to `padding`)
([#6744](elastic/eui#6744))

**Bug fixes**

- Fixed the `scrollLock` property on `EuiFocusTrap` (and other
components using `EuiFocusTrap`, such as `EuiFlyout` and `EuiModal`) to
no longer block scrolling on nested portalled content, such as combobox
dropdowns ([#6744](elastic/eui#6744))

## [`77.2.1`](https://github.com/elastic/eui/tree/v77.2.1)

**Bug fixes**

- Fixed `EuiFieldNumber`'s native browser validity detection causing
extra unnecessary rerenders
([#6741](elastic/eui#6741))

## [`77.2.0`](https://github.com/elastic/eui/tree/v77.2.0)

- Updated `EuiFieldNumber` to detect native browser invalid state and
show an invalid icon ([#6704](elastic/eui#6704))
- Improved the input widths of `EuiRange` and `EuiDualRange` when
`showInput={true}` to account for invalid icons
([#6704](elastic/eui#6704))
- Improved the `isInvalid` styling of `EuiDualRange` when
`showInput="inputWithPopover"`
([#6704](elastic/eui#6704))
- Updated `EuiFormControlLayoutIcons` to render left icons in expected
DOM order ([#6705](elastic/eui#6705))
- Updated `EuiDatePickerRange`'s `isInvalid` state to match other range
inputs ([#6705](elastic/eui#6705))
- Updated `EuiSuperDatePicker`'s `isInvalid` state to match other range
inputs ([#6705](elastic/eui#6705))

**Bug fixes**

- Fixed `EuiValidatableControl` to correctly display `isInvalid` states
on mount ([#6705](elastic/eui#6705))
- Fixed an issue with `EuiSearchBar` where quoted phrases were not
quoted when generating an Elasticsearch query.
([#6714](elastic/eui#6714))

---------

Co-authored-by: Constance Chen <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Constance Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants