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

[Canvas] Handle element changing into a filter #97890

Merged
merged 3 commits into from
Jun 22, 2021

Conversation

crob611
Copy link
Contributor

@crob611 crob611 commented Apr 21, 2021

Fixes #33605

If an expression is edited to become a filter, or a different type of filter, then the filter value on that element would become incorrect.

This fixes that issue by making sure the filter value on the element is of the correct type.

Steps to reproduce/test:

  1. Add an element with the expression filters | render as=debug, so you can see all the filter values
  2. Add a datatable element to your workpad
  3. Change the expression to timefilterControl compact=true column=@timestamp | render
  4. Note that the filter value in the debug element does not change, or is invalid

Also try changing a dropdownFilter expression to a timeFilter expression and vice versa and ensure the correct filter value ends up on the element and shows in the debug.

@crob611 crob611 requested a review from a team as a code owner April 21, 2021 19:42
@crob611 crob611 added Feature:Canvas impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.13.0 v7.14.0 v8.0.0 labels Apr 21, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@crob611 crob611 added review release_note:skip Skip the PR/issue when compiling release notes labels Apr 21, 2021
Copy link
Contributor

@poffdeluxe poffdeluxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool

@crob611
Copy link
Contributor Author

crob611 commented May 13, 2021

@elasticmachine merge upstream

@crob611 crob611 added auto-backport Deprecated - use backport:version if exact versions are needed and removed v7.13.0 labels Jun 22, 2021
@crob611
Copy link
Contributor Author

crob611 commented Jun 22, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky

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
canvas 1.3MB 1.3MB +4.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
canvas 531.2KB 531.5KB +307.0B

History

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

@crob611 crob611 merged commit 46f4378 into elastic:master Jun 22, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 22, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 22, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Corey Robertson <corey.robertson@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Canvas impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing expression to a time filter produces incorrect filter value
4 participants