search-ui
search-ui copied to clipboard
Loading indication
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)
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?
It's a huge dataset and a complex query, it's expected to take a bit of time. Using Elasticsearch backend.
I marked this one as a good first issue because I think the logic is relatively easy here. We'd probably want to include:
- An
LoadingIndicatorcomponent that works well with our default layout - A prop in our default layout, titled something like "showLoadingIndicator" which would execute the logic outlined above, showing the loading indicator when necessary.
- A prop in our default layout, titled something like "loadingIndicator" which would let a user provide their own loading indicator
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.