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

[Lens][Visualize] Reflect date/time filter to timepicker #122113

Closed
wants to merge 2 commits into from

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Dec 29, 2021

Summary

Fixes #116752

This PR makes the inspector table aware of time fields when filtering.

I'm a bit two mind here for this fix, so I'll take the opportunity of this PR to discuss it:

  • in Lens the timepicker is automatically bound to the current date histogram field
  • in Visualize the timepicker is only bound to the default time filter

While for Lens it "feels natural" as the field and timepicker are bound to the same field, in Visualize it can feel strange to pick a value from another field and use it for the default field in the time picker.

Is that the desired behaviour?

timefield_support

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@dej611 dej611 added Feature:Data Table Data table visualization feature Feature:XYAxis XY-Axis charts (bar, area, line) Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens Feature:Inspector Inspector infrastructure and implementations release_note:fix v8.1.0 labels Dec 29, 2021
@dej611 dej611 marked this pull request as ready for review December 31, 2021 13:37
@dej611 dej611 requested a review from a team as a code owner December 31, 2021 13:37
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@dej611
Copy link
Contributor Author

dej611 commented Dec 31, 2021

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
data 101.5KB 101.7KB +184.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@flash1293
Copy link
Contributor

As you said I think we can’t do this for visualize as it will be objectively wrong as it won’t filter correctly by the selected value (and it will also become problematic for Lens as soon as #118851 is implemented which is planned for 8.2) if we can’t make it behave right (maybe making the bound time fields part of the meta information of the table and looking them up from there to decide whether the filter should go into the time range or into a filter pill)I think the current behavior is better than the behavior of this PR.

Actually putting this information into the datatable meta information seems like a good approach to me because we will have this problem in general once we implement the issue linked above.

@dej611
Copy link
Contributor Author

dej611 commented Jan 3, 2022

Ok, I'll close this in favour of a better fix with #118851

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Table Data table visualization feature Feature:Inspector Inspector infrastructure and implementations Feature:Lens Feature:XYAxis XY-Axis charts (bar, area, line) release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.1.0
Projects
None yet
5 participants