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

Improve Filter Editor UI #12161

Merged

Conversation

cjcenizal
Copy link
Contributor

@cjcenizal cjcenizal commented Jun 4, 2017

Based on #11375 (review)

Changes

  • Use labels consistently in Filter Editor dropdown.
  • Improve screen reader and keyboard accessibility.
  • Convert 'Edit Query DSL' button to a checkbox.

CC @snide

filter_editor_checkbox

@snide
Copy link
Contributor

snide commented Jun 4, 2017

I'd go for a straight toggle link rather than the checkbox.

@cjcenizal cjcenizal force-pushed the improvement/filter-editor-form-ui branch from 41eaa88 to fd04368 Compare June 4, 2017 21:49
@cjcenizal
Copy link
Contributor Author

Good idea @snide! Here's how it looks now.

image

image

@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()"
Copy link
Contributor Author

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?

Copy link
Contributor Author

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()"
Copy link
Contributor Author

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.

@Bargs
Copy link
Contributor

Bargs commented Jun 5, 2017

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?

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 {} so mentioning the query dsl may provide a helpful hint about what's valid input.

@cjcenizal
Copy link
Contributor Author

@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?

@Bargs
Copy link
Contributor

Bargs commented Jun 5, 2017

Is https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html the best reference we have available for explaining the Query DSL?

Yeah that seems good to me.

And am I correct in understanding that this use of the Query DSL involves the filter context?

Ironically, our filters do not currently go under the filter context.

@cjcenizal
Copy link
Contributor Author

@Bargs I changed the language back, and added a link to the docs. Thoughts?

image

image

@Bargs
Copy link
Contributor

Bargs commented Jun 5, 2017

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.

Copy link
Member

@lukasolson lukasolson left a 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.

@cjcenizal cjcenizal merged commit 7b7cf51 into elastic:master Jun 5, 2017
@cjcenizal cjcenizal deleted the improvement/filter-editor-form-ui branch June 5, 2017 23:33
cjcenizal added a commit to cjcenizal/kibana that referenced this pull request Jun 5, 2017
* 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.
cjcenizal added a commit that referenced this pull request Jun 5, 2017
* 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.
PopradiArpad pushed a commit to PopradiArpad/kibana that referenced this pull request Jun 6, 2017
* 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.
PopradiArpad added a commit to PopradiArpad/kibana that referenced this pull request Jun 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Filters release_note:enhancement Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. v5.5.0 v6.0.0-beta1 v6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants