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

Ability to provide a comma separated list of values in "Add filter" on the Dashboards Discover page #661

Open
jimishs opened this issue Nov 10, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@jimishs
Copy link

jimishs commented Nov 10, 2022

Is your feature request related to a problem? Please describe.

While using OpenSearch Dashboards Discover panel, when i click on add filter, i am unable to provide a comma separated list of values to match for a specific field. The only way to do this is to click through each value in the dropdown and hit enter, or enter individual values manually and hit enter after each. This can become cumbersome when i have say a list of 100 IP addresses that i want to filter out. (I would also imagine in this case the dropdown to have many hundreds of IP addresses making this problem much more harder)

Describe the solution you'd like
We should consider adding support for a separator in the filter criteria. Eg: if i enter "1.2.3.4, 5.6.7.8", it should automatically convert that to two values in the list "1.2.3.4" and "5.6.7.8". This would enable customers who have a list of comma separated values (csv is a common format to filter against) to enter it directly into this field.

In addition we should also allow the user to select multiple values from the dropdown without having to click or hit enter or any other key, between each selection. Eg: clicking on an option in a dropdown simply ticks it and i just keep going until all the values are selected at which point i can hit enter and the values would all be populated automatically.

Describe alternatives you've considered

Manually entering each value and hitting enter after each. This is painful, much less user friendly and in some cases not feasible when i have hundreds of these values.

Additional context
I spoke to a customer who ingests security event logs and would like to filter out activity from specific IP addresses or clients by providing a comma separated list of values (obtained through threat intel feeds)

@jimishs jimishs added the enhancement New feature or request label Nov 10, 2022
@kgcreative
Copy link
Member

kgcreative commented Nov 17, 2022

Combo box has a withDelimiter prop we can use to allow paste to recognize and split those options.

image

image

@joshuarrrr
Copy link
Member

To add the property, we'd probably start from src/plugins/data/public/ui/filter_bar/filter_editor/phrases_values_input.tsx

@joshuarrrr
Copy link
Member

@kgcreative @KrooshalUX The current combo box is insufficient to do what @jimishs has requested here. To better understand how withDelimiter actually changes the component, compare these two demos

without (current behavior in https://playground.opensearch.org)

Screen.Recording.2023-04-04.at.4.26.49.PM.mov

with comma delimiter (from opensearch-project/OpenSearch-Dashboards#3686)

Screen.Recording.2023-04-04.at.4.27.59.PM.mov

Note that withDelimiter adds each entry every time the delimiter is typed, essentially replacing/augmenting typing enter. However, it still doesn't allow pasted input, which was one of the major requests here. For what it's worth, I think it's still a minor improvement, and worth merging, but it doesn't actually solve the issue reported here.

We'd also need to change other aspects of the combobox behavior to achieve

In addition we should also allow the user to select multiple values from the dropdown without having to click or hit enter or any other key, between each selection. Eg: clicking on an option in a dropdown simply ticks it and i just keep going until all the values are selected at which point i can hit enter and the values would all be populated automatically.

@joshuarrrr
Copy link
Member

Transferring to the OUI repo so we can nail down the right interaction patterns in the component itself.

@joshuarrrr joshuarrrr transferred this issue from opensearch-project/OpenSearch-Dashboards Apr 4, 2023
@joshuarrrr joshuarrrr removed good first issue Good for newcomers help wanted Extra attention is needed labels Apr 4, 2023
@KrooshalUX
Copy link
Contributor

@joshuarrrr to your point about pasted input, that would need to be changed at the OUI level.

UX will need to do a design pass at this - especially around handling potential errors matching pasted strings against the available tags. If I paste a value that doesn't match something in the available filters, how are we communicating that visually within the component itself (do the non matched strings highlight? get automatically removed? etc.

WRT "select multiple values from the drop down without having to click or hit enter or any other key between each selection" - this is an issue of scale, and across several projects we are seeing potential interaction fatigue (search, scroll) against large groups of data. We may need to look at Frankenstein-ing OuiComboBox and OuiContextMenu or another interface entirely to address a more "Select all of X type" interaction. (CC @lauralexis who may be interested in this as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants