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

[ES|QL] [Discover] Keeps the preferred chart type when possible #195588

Closed
wants to merge 15 commits into from

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented Oct 9, 2024

Summary

Part of #184631

It keeps the chart type 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
  • Removing a dimension

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 of columns.

meow

Important note

This doesnt keep all the vis changes, only the chart type

Checklist

@@ -43,3 +43,16 @@ export interface Suggestion<T = unknown, V = unknown> {
changeType: TableChangeType;
keptLayerIds: string[];
}

export enum ChartType {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ Moving this here for reusability

@stratoula stratoula changed the title [ES|QL] Keep the preferred chart type [ES|QL] [Discover] Keep the preferred chart type Oct 23, 2024
@stratoula stratoula changed the title [ES|QL] [Discover] Keep the preferred chart type [ES|QL] [Discover] Keeps the preferred chart type when possible Oct 23, 2024
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7219

[✅] test/functional/apps/discover/esql/config.ts: 25/25 tests passed.

see run history

@stratoula stratoula marked this pull request as ready for review October 23, 2024 13:14
@stratoula stratoula requested review from a team as code owners October 23, 2024 13:14
@stratoula stratoula added release_note:enhancement v9.0.0 backport:version Backport to applied version labels v8.17.0 Feature:Discover Discover Application Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Feature:ES|QL ES|QL related features in Kibana labels Oct 23, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@stratoula stratoula marked this pull request as draft October 23, 2024 14:06
@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 23, 2024

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!

@stratoula
Copy link
Contributor Author

Sorry for the ping, do not review yet, I found a small bug

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 24, 2024

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Integration Tests #2 / incompatible_cluster_routing_allocation retries the INIT action with a descriptive message when cluster settings are incompatible
  • [job] [logs] Jest Integration Tests #2 / incompatible_cluster_routing_allocation retries the INIT action with a descriptive message when cluster settings are incompatible

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 583 584 +1
apm 1880 1881 +1
charts 126 127 +1
cloudSecurityPosture 655 656 +1
dashboard 674 675 +1
dataVisualizer 728 729 +1
discover 994 995 +1
esqlDataGrid 364 365 +1
eventAnnotationListing 579 580 +1
expressionHeatmap 178 179 +1
expressionMetricVis 112 113 +1
expressionPartitionVis 193 194 +1
expressionTagcloud 167 168 +1
expressionXY 254 255 +1
graph 300 301 +1
investigateApp 579 580 +1
lens 1466 1467 +1
logsExplorer 564 565 +1
ml 2036 2037 +1
observability 1063 1064 +1
observabilityAIAssistantApp 381 382 +1
securitySolution 6037 6038 +1
slo 848 849 +1
transform 504 505 +1
triggersActionsUi 850 851 +1
unifiedHistogram 186 188 +2
visDefaultEditor 203 204 +1
visTypeTimelion 63 64 +1
visTypeTimeseries 459 460 +1
total +30

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/visualization-utils 17 18 +1

Async chunks

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

id before after diff
lens 1.5MB 1.5MB -196.0B
observabilityAIAssistantApp 238.7KB 238.7KB -9.0B
unifiedHistogram 70.1KB 70.6KB +516.0B
total +311.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
lens 62 61 -1
Unknown metric groups

API count

id before after diff
@kbn/visualization-utils 19 20 +1

History

@stratoula
Copy link
Contributor Author

Closing in favor of #197453

@stratoula stratoula closed this Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Discover Discover Application Feature:ES|QL ES|QL related features in Kibana release_note:enhancement Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants