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

Allow media store to cancel previous media-fetch requests if a new one is sent before the previous is completed #598

Open
1 task
sarayourfriend opened this issue Mar 17, 2022 · 0 comments
Labels
🕹 aspect: interface Concerns end-users' experience with the software ✨ goal: improvement Improvement to an existing user-facing feature 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: frontend Related to the Nuxt frontend

Comments

@sarayourfriend
Copy link
Collaborator

Problem

It's currently possible to cause a race condition in search. If you submit query A and then immediately submit query B, if the API takes longer to return A than it takes to send and return B, then B will come back before A, sent to the store, and then be replaced by the response to A.

Description

Axios supports AbortController so it shouldn't be too bad to use an abort controller entry in the media store as a "lock" on the search execution that is forcefully released each time a new search is executed.

Alternatives

Prevent sending requests in the UI by blocking new requests while existing ones are still evaluating... This seems like a bad UX though.

Implementation

  • 🙋 I would be interested in implementing this feature.
@sarayourfriend sarayourfriend added 🟩 priority: low Low priority and doesn't need to be rushed ✨ goal: improvement Improvement to an existing user-facing feature 🕹 aspect: interface Concerns end-users' experience with the software labels Mar 17, 2022
@obulat obulat transferred this issue from WordPress/openverse-frontend Feb 22, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Openverse Backlog Feb 23, 2023
@obulat obulat added the 🧱 stack: frontend Related to the Nuxt frontend label Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕹 aspect: interface Concerns end-users' experience with the software ✨ goal: improvement Improvement to an existing user-facing feature 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: frontend Related to the Nuxt frontend
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants