-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Vis: Default editor] EUIficate filters control #35464
Conversation
@cchaos could you please take a look at the current design of the filters component and provide your feedback 😊 |
💔 Build Failed |
I've been trying to think of ways to improve this UI and the only thing I can come up with would require a bit more work. It would be really nice if these filters could re-use the popover that exists in the global filter bar and then display similarly like so: Otherwise I don't think there's much we can do to enhance this UI. Thoughts on the possibility of accomplishing the above? |
@cchaos looking briefly, we can reuse the popover. That FilterEditor provides ample opportunity (field and operator selector, value, range) and I'm not sure whether we need them for the visualization editor, also it seems for me as a kind of duplication of the global filter bar. |
Maybe if not the actual popover from the global filters, but a similar pattern? So instead of writing out the filters inline in the sidebar, you open a popover with a text editor (similar to the one in "Edit as Query DSL") and then use the filter pill format to display and remove them? |
@cchaos we should for now leave that as simple text boxes, since a filter is something completely different than a query (which you ironically put into the filter aggregation :D). Changing the filter aggregation to use the filter editor (and thus also need to use the filter to query DSL builder (and not a simple lucene query anymore) is a significant rewrite, which goes beyond this PR. Also one filter in the filter aggregation (since being a Lucene string) usually contains multiple filter queries, so basically each filter in a filter aggregation would not be represented by one filter pill/editor but by one filter bar itself. (And also we would need a new filter bar, which supports AND and OR for filters beforehand :D) But please feel free to create a separate issue for this, since @Bargs will anyway be looking into supporting KQL for the filter aggregation. Maybe during that, we come closer with the infrastructure to also use a more UI wise approach with the filter editor. |
If nothing can be done to improve the UI at this point, then from a straight angular to React (EUI) conversion, this is fine. |
💔 Build Failed |
💚 Build Succeeded |
I'd love to see this get merged as soon as possible. As we speak I'm in the middle of converting these inputs into query bars that support both lucene and KQL as well as autocomplete. Having the editor in React will solve one of the issues I'm currently facing. So the sooner this gets merged the sooner I can continue to progress on that work. I did a review of the code and functionality and everything LGTM! |
💚 Build Succeeded |
# Conflicts: # src/legacy/ui/public/agg_types/directives/parse_query.js
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@sulemanof is this good to merge? |
Since this is blocking me I'm going to go ahead and merge it considering the tests have passed and it's been reviewed. |
Hi @Bargs ! Sorry for late reply, I was on vacation. |
EUIfication of filters control for Filters aggregation parameter.
Pinging @elastic/kibana-app |
@sulemanof @Bargs |
If we need to remove the @timroes what should we do with that? |
@sulemanof Yes, I agree with Liza here. Let's move that code into the vis_type_agg_filter directly. Also let's shorten it for what we need, so we can basically remove the wrapping function and just use the inner function on the property @sulemanof @maryia-lapata could either of you open a PR for that? |
@timroes sure, I'll do it. |
Summary
Part of #30922.
EUIfication of filters control for
Filters
aggregation parameter.The previous UI:
The current implementation:
UI changes:
plus
icon intoAdd Filter
button;Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers