elastic / kibana

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

[Discover] Open histogram in Lens #116590

Closed flash1293 closed 2 years ago

flash1293 commented 2 years ago

Currently functionality to navigate from Discover to Lens is hard to discover naturally.

it’s required to pick a field, expand the information popover, then click the visualize button in there.

In a lot of cases, people don’t want to visualize a specific field from the start but just play around with the currently configured time range / filter context (maybe splitting the series by filters etc).

A central button next to the histogram “open in Lens” which just loads the current histogram as a Lens visualization is not a holistic solution, but it would be an easy change which can be achieved in the short term to improve the navigation.

this can be implemented using a ui action similar to the existing “Visualize” link

elasticmachine commented 2 years ago

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

timroes commented 2 years ago

Cc @ryankeairns happy on your input on this

ryankeairns commented 2 years ago

+1 behind the reasoning. This seems like a natural extension point and is a pattern that, in time, we may carry to all visualizations created by Lens (i.e. let me jump to Lens from any visualization).

Let's have @andreadelrio assist with the UI / button placement. Andrea, it would probably be good to consider this alongside this recent issue for the new chart options menu. Not to say they necessarily need to share the same space and menu but what we do there might affect what we do here.

andreadelrio commented 2 years ago

While the space is limited in that area here are some options. Let me know what you think.

Frame 440 Frame 438 Frame 439

Additionally, we should place this as a new one option under the "Chart options" menu.

ryankeairns commented 2 years ago

That was quick, thanks Andrea!

This generated some new thoughts:

  1. The term Lens is not often mentioned, sometimes it's just an icon or its the thing land on when editing visualizations (i.e. Create Visualization from Dashboard). Is that intentional because Lens is more of an internal term at this stage? @shaunmcgough @ghudgins
  2. Having it not be under the Chart options button does increase the discoverability, although, it does seem rather related. Perhaps they should be near one another.

In considerations of those two thoughts, it may make sense to move it up alongside the Chart options button and, depending on the product direction, keep or remove the button labels.

Screen Shot 2021-10-29 at 7 55 42 AM Screen Shot 2021-10-29 at 7 58 21 AM Screen Shot 2021-10-29 at 7 59 05 AM
ghudgins commented 2 years ago

@ryankeairns it's okay to say "Open in Lens" but if we could keep it more generic it would serve us better in the long run ("Customize Visualization"?). The icon is good

related to this issue https://github.com/elastic/kibana/issues/104940

shaunmcgough commented 2 years ago

This is a good idea. I presume that any changes made to the default Discover histogram will not be persisted and become the default view in Discover. That would be almost too good to believe, but this issue was opened by @flash1293 so he has a vested interest now. In the future, it would be valuable for each user to be able to configure the Discover histogram for default use, and also per saved search. I'm happy to see that this might be a quick way to drive more traffic to Lens. We are trying to do that wherever possible. It also goes without saying that 'Open in Discover' would be a good open to start adding to Lens everywhere.

timroes commented 2 years ago

No the chart in Discover would not actually change by what is done in Lens or be replaced by it. We're not using a Lens embeddable for that chart, because we need to use the same query for gathering the document count, which we only can do while we're controlling the query. Thus no Lens embeddable, thus no replaceability of that chart.

For that reason I'd also be a bit on the fence with names like "Customize ..." or "Edit ...", because they sound to me like whatever you'll do in Lens would have any effect on Discover. Though I def understand @ghudgins concern around the more generic naming. Only other name I could come up with would be "Open in Visualize Editor" to make it less generic, but not sure if that is really better than "Open in Lens". "Visualize Data" maybe?

Design wise, I like the first design Ryan shared a lot, with both buttons beside each other and both with labels. I think we might want to change that in general to hide the labels on smaller screens to get more space (which we currently don't do).

ghudgins commented 2 years ago

For that reason I'd also be a bit on the fence with names like "Customize ..." or "Edit ...", because they sound to me like whatever you'll do in Lens would have any effect on Discover. Though I def understand @ghudgins concern around the more generic naming. Only other name I could come up with would be "Open in Visualize Editor" to make it less generic, but not sure if that is really better than "Open in Lens". "Visualize Data" maybe?

good point about "customize" language. "Open in Visualization Editor" is too long. Happy to kick the lens name problem down the road. Solutions also currently use "open in lens" for its brevity

shaunmcgough commented 2 years ago

Thanks for confirming that the changes will not stick. I think this is a good step in the right direction.

kertal commented 2 years ago
Screen Shot 2021-10-29 at 7 55 42 AM

adding my 2 cents, we might think of some responsiveness here how the buttons are presented, since once Field statistics are displayed by default, this area gets crowded again

ryankeairns commented 2 years ago

adding my 2 cents, we might think of some responsiveness here how the buttons are presented, since once Field statistics are displayed by default, this area gets crowded again

That's a good reminder. I'm also curious to see/learn if the field statistics button may make more sense in the left sidebar which already presents all-things-fields related. There was some initial feedback on this, we should evaluate that further with customers. Or, as you suggest, we'll need to re-work this section above the chart a bit more.

kertal commented 2 years ago

@ryankeairns one additional note about it, there's already an issue when loading a saved search, also I'd be curious who is using the Reset search functionality

Bildschirmfoto 2021-11-03 um 16 02 50
ryankeairns commented 2 years ago

Something to consider: A 'quick fix' may be reverting to icon-only buttons on smaller screens.