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

Cancel requisitions on page transitions #296

Closed
mateuswetah opened this issue Aug 22, 2019 · 1 comment

Comments

@mateuswetah
Copy link
Contributor

commented Aug 22, 2019

This is a delicate but important enhancement that we should look forward to implement on the admin panel code.

When transitioning from one page to the other, if that previous component started ajax requisitions that were not concluded, we're not canceling them with axios. Although usually page transitions in forms usually only happens after a promise is fulfilled, there are other cases. The worst that I can mention, is the Repository Item's page. If you have a lot of collections with a lot of filters, that page never finishes loading it's facets. This loads the http queue easily.

So we should watch router changes and alert the component to cancel requests in case the user goes away from it, or even apply some filter... it's not easy to map all the possible conditions where this happens, but I think it should be done.

@mateuswetah mateuswetah created this issue from a note in tainacan/tainacan (Backlog) Aug 22, 2019
@mateuswetah mateuswetah self-assigned this Aug 22, 2019
@mateuswetah mateuswetah moved this from Backlog to In Progress in tainacan/tainacan Sep 3, 2019
mateuswetah added a commit that referenced this issue Sep 3, 2019
mateuswetah added a commit that referenced this issue Sep 4, 2019
@mateuswetah mateuswetah moved this from In Progress to Validation in tainacan/tainacan Sep 4, 2019
@mateuswetah

This comment has been minimized.

Copy link
Contributor Author

commented Sep 5, 2019

The latest commits deal with the most important requests that I could find. Other situations will be handled in the future separately.

@mateuswetah mateuswetah closed this Sep 5, 2019
tainacan/tainacan automation moved this from Validation to Done Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
1 participant
You can’t perform that action at this time.