Skip to content

Allow any character to be used in Query#3432

Merged
chandlerprall merged 5 commits intoelastic:masterfrom
chandlerprall:feature/2325-allow-arbitrary-characters-in-phrases
Jul 1, 2020
Merged

Allow any character to be used in Query#3432
chandlerprall merged 5 commits intoelastic:masterfrom
chandlerprall:feature/2325-allow-arbitrary-characters-in-phrases

Conversation

@chandlerprall
Copy link
Copy Markdown
Contributor

@chandlerprall chandlerprall commented May 6, 2020

Summary

Closes #2325 and closes #3426

  • Updated query syntax to allow any character inside double-quoted phrases; " and \ characters must be escaped with a backslash
  • Added unit test covering AST->ES DSL generation when a " or \ is present
  • Updated AST -> ES querystring conversion and added a unit test to escape " and \ characters

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation examples

  • Added or updated jest tests
  • Checked for breaking changes and labeled appropriately
    - [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3432/

@cjcenizal
Copy link
Copy Markdown
Contributor

This is going to be so awesome. ES UI tables break whenever & is filtered on using =.

@naderhen
Copy link
Copy Markdown

@chandlerprall is there anything I can do to help get this over the line?

@chandlerprall chandlerprall force-pushed the feature/2325-allow-arbitrary-characters-in-phrases branch from 3a20cfa to 2a4d538 Compare June 30, 2020 15:56
@chandlerprall
Copy link
Copy Markdown
Contributor Author

@naderhen thanks for the reminder :) I was out last week, but am back to working on this.

Just pushed a refactor of the change to maintain backwards compatibility, better parsing, and correct pretty value printing of these values. Also added a unit test. Remainder of work is to validate the generated ES query string & DSL is correct. I should have this in a completed state soon.

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3432/

@chandlerprall chandlerprall marked this pull request as ready for review June 30, 2020 18:48
Copy link
Copy Markdown
Contributor

@bevacqua bevacqua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3432/

1 similar comment
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3432/

Copy link
Copy Markdown
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@geeklisted
Copy link
Copy Markdown

Will this fix be available soon?

@chandlerprall
Copy link
Copy Markdown
Contributor Author

Will this fix be available soon?

This was included in the v26.2.0 release.

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.

[EuiSearchBar] Allow Escaping @-symbol (or any configurable set of tokens) EuiSearchBar: allow arbitrary string when using quotes

8 participants