elastic / kibana

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

[META] [Kibana Analytics] Show consistent empty state when no data #111184

Open ryankeairns opened 3 years ago

ryankeairns commented 3 years ago

Relates to #111374 #111158 #109523

Target empty state design for Analytics apps

For no data, no index patterns

  1. Navigate to an Analytics app (Discover, Dashboard, etc.)
  2. See the new empty state design (below) as it was implemented on the Analytics Overview page
Screen Shot 2022-01-13 at 10 29 13 AM

For have data, no index patterns

  1. Navigate to an Analytics app
  2. Show an in-app EuiEmptyPrompt , similar to this, with a link to 'Create an index pattern'
  3. Clicking the link/button in the empty prompt opens the existing Create and index pattern flyout.

7.16 Analytics no-data changes

Shared components and services

The default approach for all Analytics apps will be to show the same no-data view (based upon the KibanaPageLayoutTemplate). This insures that users will get the same experience, across all apps, which steers them towards the 'Add data' view. At a future time, this will be changed to route them to the 'Integrations' view.

Apply shared components and service to applications

Each Analytics application will need to use the isNewKibanaInstance to conditionally show the shared, no-data view

Related work

Create index patterns: empty state

We also need to simplify the empty state in the 'Create index pattern' flyout. Move the empty state back into the page; reserve the flyout for in-app use, etc.

Create index patterns: integrated in apps

Separately, we should make additional issue(s) for adding 'Create an index pattern' to both an application's empty state (for the has data, no index pattern use case) and to the overflow menu that exists alongside Index Pattern selector UIs

elasticmachine commented 3 years ago

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

elasticmachine commented 3 years ago

Pinging @elastic/kibana-design (Team:Kibana-Design)

alexfrancoeur commented 2 years ago

@clintandrewhall @thomasneirynck @ryankeairns @snide what is the possibility we could still backport this to 7.16? And if not, how about 8.0?

LL6688 commented 2 years ago

@clintandrewhall @alexfrancoeur will we have this in 8.1?

alexfrancoeur commented 2 years ago

@majagrubic would you say https://github.com/elastic/kibana/pull/123366 addresses this issue?

LL6688 commented 2 years ago

@majagrubic would you say #123366 addresses this issue?

majagrubic commented 2 years ago

@LL6688 it's a partial solution for the first part of the probem - "no data, no index patterns" Second part is blocked by https://github.com/elastic/kibana/issues/124019

majagrubic commented 2 years ago

To write a more detailed summary of this: We want to distinguish between two states:

  1. No user-created data views and no data in ES (ie. fresh Kibana instance with no integrations)
  2. There is data in ES, but no data views yet

For now, we have implemented a redirect to Overview page from Discover for case 1. We agreed this would be the fastest way forward and good enough for now.

Use case 2 is a bit more tricky, as there is no standard way to check whether there is data in ES, but no data views. Given we want to implement this for every Analytics app, we'd ideally like to standardize and reuse this check. Data views editor has implemented something like this in one of their components, but we can't have every app copy this code. App-services has agreed to take on building a service that would expose this check (tracked in this issue)

After the service has been implemented, the remaining steps would be:

rayafratkina commented 2 years ago

Potential blockers in the API tracked in https://github.com/elastic/kibana/issues/132478