Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TableListView] Listing page search ignores special characters without warning #151120

Closed
dej611 opened this issue Feb 14, 2023 · 7 comments · Fixed by #197307
Closed

[TableListView] Listing page search ignores special characters without warning #151120

dej611 opened this issue Feb 14, 2023 · 7 comments · Fixed by #197307
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated papercut Small "burr" in the product that we should fix. SharedUX/fix-it-week Bugs that have been groomed and queued up for the team's next fix it week Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)

Comments

@dej611
Copy link
Contributor

dej611 commented Feb 14, 2023

Kibana version: 8.7.0 BC1

Describe the bug:

The Listing page seems to support also special characters search, but unsupported chars are not always documented correctly.

Example on unsupported special char and relative warning:

Screenshot 2023-02-14 at 12 26 41

But using [ or ] leads to no results and no warning ( I've seen the [ some tag ] convention used something as dashboard names, even on sample data):

Screenshot 2023-02-14 at 12 28 33

Screenshot 2023-02-14 at 12 28 41

But there are dashboard with names containing the [ ... ] convention:

Screenshot 2023-02-14 at 12 29 34

Adding a non-special char to the search box makes the search be performed correctly instead:
Screenshot 2023-02-14 at 12 31 12

@dej611 dej611 added bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas labels Feb 14, 2023
@kibanamachine kibanamachine added loe:needs-research This issue requires some research before it can be worked on or estimated impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Feb 14, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@Heenawter Heenawter added Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) and removed Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas labels Feb 14, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@vadimkibana vadimkibana changed the title [Dashboard] Listing page search ignores special characters without warning [TableListView] Listing page search ignores special characters without warning Aug 14, 2023
@sebelga
Copy link
Contributor

sebelga commented Sep 5, 2023

The Listing page seems to support also special characters search, but unsupported chars are not always documented correctly.

I wonder how much on the EUI side this issue is and what we can actually do in Kibana. I'll have a look 👍

Adding a non-special char to the search box makes the search be performed correctly instead

@dej611 I'll look into it. I think we should require that at least 2 or 3 characters be inserted before triggering the search. Would that work?

@dej611
Copy link
Contributor Author

dej611 commented Sep 5, 2023

As long as the user is hinted about adding more chars it's ok for me

@petrklapka petrklapka added the SharedUX/fix-it-week Bugs that have been groomed and queued up for the team's next fix it week label Jul 18, 2024
@timductive timductive added the papercut Small "burr" in the product that we should fix. label Oct 14, 2024
@sebelga
Copy link
Contributor

sebelga commented Oct 22, 2024

Looking at this issue to see how we can improve the search experience.

From what I understand from this PR elastic/eui#7175 we have a limitation on the chars allowed when doing an EQL query (with filters).
@cee-chen when I introduce a wrong char I don't get the toolip anymore when hovering the danger icon in the searchbar. Has it been removed on purpose or is this a regression? I'd like to know the exact list of chars that are not allowed to put them in a helptext underneath.

@cee-chen
Copy link
Member

cee-chen commented Oct 23, 2024

@cee-chen when I introduce a wrong char I don't get the toolip anymore when hovering the danger icon in the searchbar. Has it been removed on purpose or is this a regression?

There has never been a tooltip around error icons in EUI form controls - are you referring to the native browser title "tooltip"? If so, that is still there for me (see EUI example):

Image

I'd like to know the exact list of chars that are not allowed to put them in a helptext underneath.

That's somewhat inferrable in the default_syntax PEG parser for EuiSearchBar here: https://github.com/elastic/eui/blob/54ab23a4d4bcdabb62f3b630f20fb7edaba874ee/packages/eui/src/components/search_bar/query/default_syntax.ts#L172-L176

Currently, any special character outside -_*@ are not allowed. Forward slashes are allowed and double backslashes are allowed.

This is actually a bit stricter than EQL necessitates, as the only characters that EQL explicitly requires for syntax purposes are ", (), : and \ (see elastic/eui#7160 (comment) and elastic/eui#6356).

If you feel strongly that the increased UX outweighs any potential bugs or crashes we might run into with EQL parsing, we could modify the default syntax parser to parse any character that is not the above characters as a word.

It is worth mentioning that the special characters in this issue description do work just fine with double quotes, so Kibana could theoretically also handle double quoting under the hood:

@sebelga
Copy link
Contributor

sebelga commented Oct 24, 2024

Thanks for the input @cee-chen ! I ended up fixing this issue by hardcoding the list of forbidden characters and display hint when one is entered (#197307).

It is worth mentioning that the special characters in this issue description do work just fine with double quotes, so Kibana could theoretically also handle double quoting under the hood

That's good to know. Although it seems like that the parsing from the input element is immediately done by the EUI component and we get the error in the listener after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated papercut Small "burr" in the product that we should fix. SharedUX/fix-it-week Bugs that have been groomed and queued up for the team's next fix it week Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants