search-ui icon indicating copy to clipboard operation
search-ui copied to clipboard

Loading indication

Open kokolem opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. The results can take some time (a few seconds) to load and the user has no way of knowing that something is happening in the background (waiting for a response from elasticsearch).

Describe the solution you'd like It would be good to add some loading indicator.

Describe alternatives you've considered A custom loading indicator can be implemented with something like:

<SearchProvider config={config}>
  <WithSearch>
    {({ isLoading }) => {
      if (isLoading) return <YourLoader />
    }}
  </WithSearch>
</SearchProvider>

(See: https://github.com/elastic/search-ui/issues/523)

kokolem avatar Jul 20 '22 21:07 kokolem

FWIW, a few seconds is a generally bad user experience. Any ideas why the search is taking so long? Is this App Search or Elasticsearch as a backend?

JasonStoltz avatar Jul 21 '22 13:07 JasonStoltz

It's a huge dataset and a complex query, it's expected to take a bit of time. Using Elasticsearch backend.

kokolem avatar Jul 21 '22 19:07 kokolem

I marked this one as a good first issue because I think the logic is relatively easy here. We'd probably want to include:

  1. An LoadingIndicator component that works well with our default layout
  2. A prop in our default layout, titled something like "showLoadingIndicator" which would execute the logic outlined above, showing the loading indicator when necessary.
  3. A prop in our default layout, titled something like "loadingIndicator" which would let a user provide their own loading indicator

JasonStoltz avatar Jul 22 '22 13:07 JasonStoltz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Is this issue still important to you? If so, please leave a comment and let us know. As always, thank you for your contributions.

botelastic[bot] avatar Sep 20 '22 13:09 botelastic[bot]