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

[User Experience App] Improve empty state loading #112531

Merged
merged 6 commits into from
Sep 22, 2021

Conversation

shahzad31
Copy link
Contributor

@shahzad31 shahzad31 commented Sep 20, 2021

Fixes #112530

Only show empty state if there is no data, improved the UI by removing intermediate empty state showing.

It will show loading as we are fetching the call to detemine has data check.

@shahzad31 shahzad31 changed the title improve empty state loading [User Experience App] Improve empty state loading Sep 20, 2021
@shahzad31 shahzad31 marked this pull request as ready for review September 20, 2021 11:47
@shahzad31 shahzad31 requested a review from a team as a code owner September 20, 2021 11:47
@shahzad31 shahzad31 self-assigned this Sep 20, 2021
@shahzad31 shahzad31 added release_note:skip Skip the PR/issue when compiling release notes v7.16.0 v8.0.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Sep 20, 2021
Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

Looks good, just a few questions.

import { i18n } from '@kbn/i18n';
import React, { Fragment } from 'react';

export function EmptyStateLoading() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use one of the loading components instead of a custom component? https://elastic.github.io/eui/#/display/loading

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's the same component, it just adds an EuiEmptyPrompt and a text around it as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i copied this from uptime, we have the same component there.

</PageTemplateComponent>
</CsmSharedContextProvider>
<Fragment>
{isLoading && <EmptyStateLoading />}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if we should only be showing this loading state for the UX content, instead of the entire page. Currently we are hiding everything, including the sidebar. I think showing the sidebar can be helpful for the user, especially if the loading is taking a long time and they want to navigate away from the screen easily.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This loading is only valid for initial hasData call, rest of the loading calls for other content will remain in place.

Copy link
Contributor

Choose a reason for hiding this comment

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

I understand, I just wonder if we should be hiding the entire page for this call, instead of just hiding the UX content, since the hasData call is specific to UX content.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

got it , i have imoroved it now.

@botelastic botelastic bot added Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability labels Sep 20, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

LGTM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1163 1164 +1

Async chunks

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

id before after diff
apm 2.7MB 2.7MB +472.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @shahzad31

@shahzad31 shahzad31 merged commit da1ae49 into elastic:master Sep 22, 2021
@shahzad31 shahzad31 deleted the ux-app-loading branch September 22, 2021 07:29
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 22, 2021
* improve empty state loading

* only show loading in content panel

* eslint fix
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Sep 22, 2021
* improve empty state loading

* only show loading in content panel

* eslint fix

Co-authored-by: Shahzad <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[User Experience App] On load it shows empty state for a moment
4 participants