Skip to content

[8.x] [ES|QL] [Discover] Keeps the preferred chart configuration when possible (#197453)#199069

Merged
kibanamachine merged 2 commits intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-197453
Nov 6, 2024
Merged

[8.x] [ES|QL] [Discover] Keeps the preferred chart configuration when possible (#197453)#199069
kibanamachine merged 2 commits intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-197453

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…ble (elastic#197453)

## Summary

Closes elastic#184631

It keeps the chart configuration when the user is doing actions
compatible with the current query such as:

- Adding a where filter (by clicking the table, the sidebar, the chart)
- Changes the breakdown field and the field type is compatible with the
current chart
- Changing to a compatible chart type (from example from bar to line or
pie to treemap)
- Changing the query that doesnt affect the generated columns mapped to
a chart. For example adding a limit or creating a runtime field etc.

The logic depends on the suggestions. If the suggestions return the
preferred chart type, then we are going to use this. So it really
depends on the api and the type / number of columns. It is as smarter as
it can in order to not create bugs. I am quite happy with the result. It
is much better than what we have so far.

![meow](https://github.com/user-attachments/assets/c4249e5e-e785-4e57-8651-d1f660f5a61a)

### Next steps
I would love to do the same on the dahsboard too, needs more time
though. But the changes made here will def work in favor

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

---------

Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
(cherry picked from commit ccbcab9)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Nov 5, 2024
@kibanamachine kibanamachine enabled auto-merge (squash) November 5, 2024 23:01
@botelastic botelastic Bot added ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant labels Nov 5, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 5, 2024

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress

  • Buildkite Build
  • Commit: 0fb0557
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-199069-0fb0557efe3f

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #77 / lens app - group 2 lens fields list tests ad-hoc datasource should show stats for a keyword runtime field

History

cc @stratoula

@kibanamachine kibanamachine merged commit 1263c97 into elastic:8.x Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants