elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.75k stars 8.15k forks source link

[ES|QL] [Discover] Removes the suggestion selector #180249

Closed stratoula closed 5 months ago

stratoula commented 5 months ago

Describe the feature: In 8.11+ we introduced a suggestion dropdown on the unified histogram plugin, in the cases where the user is visualizing an ES|QL query with stats / keep.

On https://github.com/elastic/kibana/pull/175227 we decided to remove the suggestions selector:

The lens inline editing flyout has already this functionality. We are going to use this instead. In order to do so we need:

<Component
          attributes={visContext.attributes}
          updatePanelState={updatePanelState}
          updateSuggestion={newCallback}
          lensAdapters={lensAdapters}
          output$={lensEmbeddableOutput$}
          displayFlyoutHeader
          closeFlyout={() => {
            setIsFlyoutVisible(false);
          }}
          wrapInFlyout
          datasourceId="textBased"
        />
elasticmachine commented 5 months ago

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

elasticmachine commented 5 months ago

Pinging @elastic/kibana-esql (Team:ESQL)

stratoula commented 5 months ago

Adding impact: high as I hope it will get prioritized cc @davismcphee @jughosta

jughosta commented 5 months ago

@stratoula I'm think about still setting hidesSuggestions to true for ES|QL histogram mode as we are using a different underlying query for this chart.

So if query is from logs* | limit 10, then hide suggestions in the flyout. The underlying query is from kibana_sample_data_logs | limit 10 | EVAL timestamp=DATE_TRUNC(24 hour, @timestamp) | stats results = count(*) by timestamp | rename timestamp as "@timestamp every 24 hour".

If query is from logs* | limit 10 | stats var0 = avg(bytes) by extension.keyword, then allow to use suggestions in the flyout.

Is that okay?

stratoula commented 5 months ago

Yes totally! Good catch, I had mostly in mind the charts that the suggestion selector is being rendered!