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] Inline shard failures warnings #161271

Merged
merged 76 commits into from
Aug 10, 2023

Conversation

jughosta
Copy link
Contributor

@jughosta jughosta commented Jul 5, 2023

Summary

This PR replaces shard falures toasts with inline warnings in Discover.

  • Intercept shard failures in Discover main app
  • Show inline warnings above the grid instead
  • Handle NoResultsFound case too
  • Implement for Discover context app
  • Implement for saved search embeddable on Dashboard
  • Can we inline timeouts too?
  • Check SQL view
  • Add tests

Discover view with shard failures
Screenshot 2023-07-06 at 14 23 48

Discover view with shard failures (and no results)
Screenshot 2023-07-07 at 13 24 50

Dashboard view with shard failures
Screenshot 2023-07-06 at 16 15 49

Surrounding documents view with shard failures
Screenshot 2023-07-10 at 17 26 31

Discover view with timeouts
Screenshot 2023-07-07 at 16 47 27

Dashboard view with timeouts
Screenshot 2023-07-07 at 16 48 18

Surrounding documents view with timeouts
Screenshot 2023-07-11 at 15 03 41

Testing

For testing please uncomment

or
// response.rawResponse.timed_out = true;
and switch to kibana* data view.

Checklist

Delete any items that are not applicable to this PR.

@jughosta jughosta added release_note:enhancement backport:skip This commit does not require backporting Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Jul 5, 2023
@jughosta jughosta self-assigned this Jul 5, 2023
@jughosta jughosta changed the title [Discover] Intercept shard failures [Discover] Inline shard failures warnings Jul 5, 2023
@jughosta
Copy link
Contributor Author

jughosta commented Aug 2, 2023

Thanks @andreadelrio!

1

The button showing the error shouldn't be overlapping the panels' content. We should show it below in a separate row

Updated the positioning of the badge:
Screenshot 2023-08-02 at 11 22 06
Screenshot 2023-08-02 at 11 21 44

2

Remove gray border this empty prompt

You mean to make it look like the following? Might be not enough contrast. Is there anything else we can use from eui for this case? It's when 0 hits returned and there were some shards failures.

Screenshot 2023-08-02 at 11 41 08

3

Can we group duplicated messages?

Yes, they are grouped based on title and warnings content. The ones from the screenshot have the same title but different details inside.

4

Why the bolt icon? what is it trying to convey and how does it related to the message?

This part I didn't touch in the PR. I guess the idea was to bring users attention to the fact that they reached the earliest or the latest document and there is nothing else to load. Would you suggest to change this callout?

@kertal
Copy link
Member

kertal commented Aug 2, 2023

4

Why the bolt icon? what is it trying to convey and how does it related to the message?

This part I didn't touch in the PR. I guess the idea was to bring users attention to the fact that they reached the earliest or the latest document and there is nothing else to load. Would you suggest to change this callout?

That's legacy. There could be an info icon + the matching color for that callout ... because I don't think this needs to be a kind of warning.

…-error

# Conflicts:
#	src/plugins/discover/public/embeddable/saved_search_embeddable.tsx
#	src/plugins/discover/tsconfig.json
@andreadelrio
Copy link
Contributor

Thanks @jughosta for making the updates.

2

You mean to make it look like the following? Might be not enough contrast. Is there anything else we can use from eui for this case? It's when 0 hits returned and there were some shards failures.

Yes. I don't think the border does a lot to improve contrast tbh and no-border is the recommended pattern in EUI. See https://elastic.github.io/eui/#/display/empty-prompt/guidelines

Screenshot 2023-08-02 at 11 41 08

3

Yes, they are grouped based on title and warnings content. The ones from the screenshot have the same title but different details inside.

Makes sense, thanks

4

This part I didn't touch in the PR. I guess the idea was to bring users attention to the fact that they reached the earliest or the latest document and there is nothing else to load. Would you suggest to change this callout?

Can you update following Matthias' suggestion and send a screenshot? So a callout in color primary. We also need a bit of spacing above this banner (so more spacing below the Load 5 newer documents line).

@jughosta
Copy link
Contributor Author

jughosta commented Aug 3, 2023

@andreadelrio

2

Yes. I don't think the border does a lot to improve contrast tbh and no-border is the recommended pattern in EUI. See https://elastic.github.io/eui/#/display/empty-prompt/guidelines

Thanks!

From eui example:
Screenshot 2023-08-03 at 13 50 08

Based on these guidelines, an icon should be at the top then, no?
Screenshot 2023-08-03 at 13 52 27

Should we also update the icon position for Discover error view? Currently it looks like this:
Screenshot 2023-08-03 at 13 50 16

4

Can you update following Matthias' suggestion and send a screenshot? So a callout in color primary. We also need a bit of spacing above this banner (so more spacing below the Load 5 newer documents line).

Updated the old callout:

Screenshot 2023-08-03 at 11 22 59

@andreadelrio
Copy link
Contributor

From eui example: Screenshot 2023-08-03 at 13 50 08

Based on these guidelines, an icon should be at the top then, no? Screenshot 2023-08-03 at 13 52 27

Should we also update the icon position for Discover error view? Currently it looks like this: Screenshot 2023-08-03 at 13 50 16

Yes, I think this makes sense.

@jughosta
Copy link
Contributor Author

jughosta commented Aug 4, 2023

Updated:

Screenshot 2023-08-04 at 10 36 11

@davismcphee @andreadelrio It's ready for review.

Copy link
Contributor

@andreadelrio andreadelrio left a comment

Choose a reason for hiding this comment

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

Design changes LGTM. Thanks Julia!

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Tested locally again and the latest changes LGTM 👍 Thanks for updating the error callout too!

@kertal
Copy link
Member

kertal commented Aug 10, 2023

@andreadelrio I've got a theory why the bold was being used, maybe Harry Potter accidentally applied a spell creating a PR to Kibana and used a bolt similar to his scar to claim ownership?
Bildschirmfoto 2023-08-10 um 11 36 33

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 608 613 +5

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/search-response-warnings - 8 +8

Async chunks

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

id before after diff
discover 549.1KB 556.3KB +7.2KB
unifiedHistogram 46.7KB 46.7KB +3.0B
total +7.2KB
Unknown metric groups

API count

id before after diff
@kbn/search-response-warnings - 16 +16

History

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

cc @jughosta

@jughosta jughosta merged commit c97d496 into elastic:main Aug 10, 2023
@jughosta jughosta deleted the 155216-inline-shard-error branch August 10, 2023 11:49
jloleysens added a commit to jloleysens/kibana that referenced this pull request Aug 10, 2023
* main: (108 commits)
  [Telemetry Schema Validation] Allow `null` on `string` (elastic#163499)
  [Search] Add Slack and Gmail connectors (elastic#163321)
  [ML] Provide hints for empty fields in dropdown options in Anomaly detection & Transform creation wizards, Change point detection view (elastic#163371)
  chore(slo): Add response required fields (elastic#163430)
  [AO] Fix add_to_case functional test (elastic#163155)
  unskip license type functional test (elastic#163199)
  fix(NA): yarn env vars for node_modules mirrors (elastic#163549)
  [Response Ops][Task Manager] Expose SLI metrics in HTTP API (elastic#162178)
  [Logs UI] Adapt test to ES highlighting changes and unskip (elastic#163592)
  [Infra UI] Implement Telemetry on 'Show' buttons within Inventory (elastic#163587)
  [Enterprise Search]Migrate all usages of EuiPage*_Deprecated (elastic#163482)
  fix(slo): settings and access for serverless (elastic#163514)
  [Infra UI] Implement telemetry for the asset details flyout (elastic#163078)
  [Fleet] Add a banner to the top of the Kafka Output UI to say that Elastic Defend integration is not supported (elastic#163579)
  [Fleet] Re-enable and fix Fleet policy secret integration tests (elastic#163428)
  [Fleet] add managed to imported saved object (elastic#163526)
  [Index Management] Disable index actions using contextRef (elastic#163475)
  [Discover] Inline shard failures warnings (elastic#161271)
  [Security Solution][Detection engine] skips geo_point non-ecs validation (elastic#163487)
  Update EUI layout components in bfetch example plugin (elastic#163490)
  ...
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 release_note:enhancement Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Discover] Inline shard error warnings
9 participants