-
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
Improve Filter Editor UI #12161
Improve Filter Editor UI #12161
Conversation
…der and keyboard accessibility.
I'd go for a straight toggle link rather than the checkbox. |
41eaa88
to
fd04368
Compare
Good idea @snide! Here's how it looks now. @Bargs and @lukasolson I changed the language from "Edit query DSL" to "Edit raw query" because I don't think most people know what a domain-specific language is. Thoughts? |
<!-- Filter dropdowns --> | ||
<div | ||
class="kuiFieldGroup kuiVerticalRhythmSmall kuiFieldGroup--alignTop" | ||
ng-if="!filterEditor.showQueryDslEditor()" |
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.
Was there any reason we chose to not use ng-if
here originally? Will this disrupt anything?
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.
Answered my own question. ng-if
adds an isolate scope which makes it difficult to access controller properties.
<!-- DSL editor --> | ||
<div | ||
class="kuiVerticalRhythmSmall" | ||
ng-if="filterEditor.showQueryDslEditor()" |
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.
Same question re using an ng-if
.
The one benefit of calling it query DSL that I can think of is that it distinguishes it from other possible types of "raw queries", like a lucene query string. When creating a filter from scratch the editor only contains |
@Bargs Good point. Is https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html the best reference we have available for explaining the Query DSL? And am I correct in understanding that this use of the Query DSL involves the filter context? |
Yeah that seems good to me.
Ironically, our filters do not currently go under the filter context. |
@Bargs I changed the language back, and added a link to the docs. Thoughts? |
I like the addition of the doc link. Could we just have the text say "Filters are built using the Elasticsearch Query DSL."? Query vs filter context doesn't change how the user writes the DSL, so it might just cause unnecessary confusion. I'd also sort of consider it an implementation detail of Kibana that could change. |
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.
Thanks for taking this on! I am a fan of these changes.
I'm not a big fan of the verbiage, "Search filter values", but I'm not really sure of better words to use. Other than that, I'd just agree with @Bargs' comment above about the verbiage.
* Use labels consistently in Filter Editor dropdown. Improve screen reader and keyboard accessibility. * Convert 'Edit Query DSL' from button to toggle link. * Add link to documentation.
* Use labels consistently in Filter Editor dropdown. Improve screen reader and keyboard accessibility. * Convert 'Edit Query DSL' from button to toggle link. * Add link to documentation.
This reverts commit 041f3dd.
Based on #11375 (review)
Changes
CC @snide