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

[Discover] Show a fallback empty message when no results are found #128754

Merged
merged 6 commits into from
Mar 31, 2022

Conversation

jughosta
Copy link
Contributor

@jughosta jughosta commented Mar 29, 2022

Closes #126594

Summary

Next to "No results match your search criteria" title in Discover UI, we show a helpful suggestion on what can be adjusted in the search criteria (time range, search query or filters) to still find some results. This PR adds a fallback message which otherwise suggests to make sure that selected data view points to available indices with documents.

Screenshot 2022-03-29 at 12 31 38

During testing, please check these cases:

  • with a data view without a time field
  • with a data view for an index without documents
  • with a data view for a deleted index

Checklist

@jughosta jughosta requested a review from a team as a code owner March 29, 2022 13:41
@jughosta jughosta added the Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) label Mar 29, 2022
@elasticmachine
Copy link
Contributor

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

@jughosta jughosta added this to PRs in Discover via automation Mar 29, 2022
@jughosta jughosta added Feature:Discover Discover Application backport:skip This commit does not require backporting v8.3.0 release_note:fix labels Mar 29, 2022
@jughosta jughosta marked this pull request as draft March 29, 2022 15:01
@jughosta
Copy link
Contributor Author

@elasticmachine merge upstream

@jughosta jughosta marked this pull request as ready for review March 30, 2022 09:11
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 433 438 +5

Async chunks

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

id before after diff
discover 383.5KB 384.0KB +562.0B

History

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

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

Code LGTM, congrats 🎉 ! That's a great debut in the Kibana code base. This PR fixes the issue and makes the code much clearer and better to read! Thx a lot. Works as expected in Safari, Firefox, Chrome, locally tested with a M1 Mac.

And due to the useful description you've added, I also found an issue with the existing way we handle errors. So, I deleted an index I've created for showing the new message. In this case there was an error toast displayed, that's easy to miss. I think the error should be displayed via the no_results component. It's nothing severe, but I think we should fix it in a follow up PR. Here's an example for that, deleted the index, and the toast is easy to miss:

Kapture.2022-03-30.at.17.32.56.mp4

@jughosta jughosta merged commit f4f145d into elastic:main Mar 31, 2022
Discover automation moved this from PRs to Done Mar 31, 2022
@jughosta jughosta deleted the empty-message branch March 31, 2022 07:20
darnautov pushed a commit to darnautov/kibana that referenced this pull request Mar 31, 2022
…lastic#128754)

* [Discover] Show a fallback empty message in Discover UI when no results are found

* [Discover] Update code style

* [Discover] Refactor more and extract into separate components

* [Discover] Revert test id

* [Discover] Update code style

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@jughosta jughosta self-assigned this Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Discover Discover Application release_note:fix Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) v8.3.0
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[Discover] Empty state's description can be completely blank
5 participants