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

InlineHelp: Make requests cancelable #43860

Open
retrofox opened this issue Jul 2, 2020 · 4 comments
Open

InlineHelp: Make requests cancelable #43860

retrofox opened this issue Jul 2, 2020 · 4 comments

Comments

@retrofox
Copy link
Contributor

retrofox commented Jul 2, 2020

It'd be nice if the enqueue requests can be cancelable in order to avoid hitting the API unnecessarily.

Steps to reproduce

  1. Locate the Get Help... section in the customer home page (http://wordppress.com/home/<your-site>)
    OR open the inline help clicking on the FAB icon (any another page)

Customer home

Inline help

  1. Open the network tab of your developer browser
  2. May you'd like to filter the requests by search term

  1. Type a term in the search input element, wait for the threshold ends, and do again, and so on.

What I expected

Run only one (the last one) request and cancel the rest of them

What happened instead

The client performs all requests, even those that won't be used.

image

@getdave
Copy link
Contributor

getdave commented Jul 7, 2020

Is this related to the situation whereby if you search for some nonsense like ;;;;pppp;;;; then it takes ages for the request to complete? Also is this related to the need to upgrade to a proper data layer implementation?

@retrofox
Copy link
Contributor Author

retrofox commented Jul 8, 2020

Is this related to the situation whereby if you search for some nonsense like ;;;;pppp;;;; then it takes ages for the request to complete?

I'm not totally sure. I think that isn't exactly the same issue but a matter of defining a smaller request timeout?

Also is this related to the need to upgrade to a proper data layer implementation?

Maybe yes, it would require to connect with the data-layer.

@getdave
Copy link
Contributor

getdave commented Aug 13, 2020

Consider following cancellable promise wrapper approach as used in Automattic/jetpack#15228

@github-actions
Copy link

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants