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

Add async search notification #60706

Merged
merged 17 commits into from
Mar 24, 2020

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Mar 19, 2020

Summary

Depends on #60574

Resolves #24227.
Resolves #46370.

Add async search notification.

  • Cancel \ Run beyond timeout work in Basic license
  • In OSS the notification has disabled buttons, and a Learn More link (taking where?)
  • The notifications shows after a query runs for at least 10 seconds
  • When a query finishes running, the toast is dismissed.

In OSS:
image

In Basic:
image

Dev Docs

The async search feature allows users with a Basic license and above, execute long queries. By default, query execution is limited to 30 second time frame. Now Discover, Visualize and most importantly Dashboard applications, will present the user an option to run a query beyond timeout.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@lizozom lizozom requested review from a team as code owners March 19, 2020 22:20
@lizozom lizozom requested a review from lukasolson March 19, 2020 22:20
@lizozom lizozom self-assigned this Mar 19, 2020
@lizozom lizozom added release_note:skip Skip the PR/issue when compiling release notes Team:AppArch v7.7.0 v8.0.0 labels Mar 19, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@lizozom lizozom requested a review from mdefazio March 20, 2020 09:23
@lizozom lizozom force-pushed the newplatform/ui-search-cancel-2 branch from 3567441 to 2e35fde Compare March 20, 2020 12:50
@mdefazio
Copy link
Contributor

Here are a few things I'm noticing (and questions I have):

  1. The icons tend to take awhile to load even when the toast appears. Let's just remove the icon in this instance then.
    image

  2. I don't think we need the cancel button. And so we can also turn the 'Run beyond timeout' button to a hollow button to better align with the EUI toast guidelines.

  3. Does the timeout toast stay on screen all the way until the search completes? I received other timeout errors after it appeared and when those disappeared, so did the timeout toast.

Screen Shot 2020-03-20 at 9 25 23 AM

  1. I know we're going back-and-forth on the copy still, but I don't see a need for the 'Learn more' here. We are only providing a link out if they do not have the functionality available to them (in which case it would be 'Upgrade' or something as you mentioned in the copy doc). And the description isn't necessary either. So for this version, I think the end result would be like this:
    image

  2. Does the timer for the toast only start once the Kibana chrome has loaded (after the main Kibana loading screen)? And is the timer set for 10 sec? I wasn't able to tell a consistent time on my end. Is there a difference between a slow connection load, and a fast connection, large data load for when the timer starts to show the toast?

  3. If we hit the timeout, do we dismiss the toast and then show a timeout error toast? I didn't see this on my end. I just saw the timeout toasts for the individual visualizations.

@lizozom lizozom removed the request for review from a team March 20, 2020 19:58
Copy link
Member

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

Made a couple of comments below, maybe we can sync on these things together.

@lizozom
Copy link
Contributor Author

lizozom commented Mar 22, 2020

Here are a few things I'm noticing (and questions I have):

The icons tend to take awhile to load even when the toast appears. Let's just remove the icon in this instance then.

The behavior of icons on notifications is the same for all types of notifications (they all have icons). And this won't happen if you didn't slow down the network intentionally.

I don't think we need the cancel button. And so we can also turn the 'Run beyond timeout' button to a hollow button to better align with the EUI toast guidelines.

@AlonaNadler should I remove the cancel button altogether?

Does the timeout toast stay on screen all the way until the search completes? I received other timeout errors after it appeared and when those disappeared, so did the timeout toast.

Fixed. Now it will stay on screen until search completes.

I know we're going back-and-forth on the copy still, but I don't see a need for the 'Learn more' here. We are only providing a link out if they do not have the functionality available to them (in which case it would be 'Upgrade' or something as you mentioned in the copy doc). And the description isn't necessary either. So for this version, I think the end result would be like this:

Updated to the copy from the doc. You can see updated screenshots on the issue.

Does the timer for the toast only start once the Kibana chrome has loaded (after the main Kibana loading screen)? And is the timer set for 10 sec? I wasn't able to tell a consistent time on my end. Is there a difference between a slow connection load, and a fast connection, large data load for when the timer starts to show the toast?

The timer starts from the moment the search request is being sent.

If we hit the timeout, do we dismiss the toast and then show a timeout error toast? I didn't see this on my end. I just saw the timeout toasts for the individual visualizations.

Yes, that's the behavior - cancel the notification and show an error.

@lizozom lizozom requested a review from lukasolson March 22, 2020 19:39
@AlonaNadler
Copy link

I read @mdefazio suggestions, not sure I understand why to remove the cancel button

@mdefazio
Copy link
Contributor

I read @mdefazio suggestions, not sure I understand why to remove the cancel button

@AlonaNadler At this stage, doing any action on the dashboard/page would in effect cancel the request. We also try and keep toasts to a single CTA. I know things will change in 7.8, so I'm not saying we don't need it then. But it feels a bit unnecessary now.

@lukasolson lukasolson self-assigned this Mar 23, 2020
@mdefazio
Copy link
Contributor

@lukasolson if we decide to remove the cancel button, then I'd also suggest changing the button style to hollow. If we keep it though, then no other changes on my end.

@lizozom lizozom requested review from a team and removed request for a team March 24, 2020 09:55
Copy link
Member

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@mdefazio mdefazio left a comment

Choose a reason for hiding this comment

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

LGTM!

@lizozom lizozom merged commit c7c6eba into elastic:master Mar 24, 2020
@lizozom lizozom deleted the newplatform/ui-search-cancel-2 branch March 24, 2020 15:41
lizozom pushed a commit to lizozom/kibana that referenced this pull request Mar 24, 2020
* notifications ui

* increase timeout to 10s

* trigger notification from search interceptor

* added an enhanced interceptor

* added an enhanced interceptor

* docs

* docs

* fix ts

* Fix jest tests for interceptor

* update docs

* docs

* Fix handling syntax error in discover

* docs and translations

* fix scripted fields err

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
lizozom pushed a commit that referenced this pull request Mar 24, 2020
* notifications ui

* increase timeout to 10s

* trigger notification from search interceptor

* added an enhanced interceptor

* added an enhanced interceptor

* docs

* docs

* fix ts

* Fix jest tests for interceptor

* update docs

* docs

* Fix handling syntax error in discover

* docs and translations

* fix scripted fields err

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@lukasolson lukasolson added the Feature:Search Querying infrastructure in Kibana label Apr 15, 2020
@lizozom lizozom added release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. and removed release_note:skip Skip the PR/issue when compiling release notes labels Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Search Querying infrastructure in Kibana release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. v7.7.0 v8.0.0
Projects
None yet
6 participants