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

Advanced: optimistic UI updates (and UNDO action) #21

Open
w3b3 opened this issue Jul 31, 2021 · 0 comments
Open

Advanced: optimistic UI updates (and UNDO action) #21

w3b3 opened this issue Jul 31, 2021 · 0 comments
Assignees
Labels
help wanted Extra attention is needed
Projects

Comments

@w3b3
Copy link
Owner

w3b3 commented Jul 31, 2021

It is a pain to wait for 2 API calls to fully resolve to ONLY THEN be able to continue operating with the App.

It feels weird. It should be instantaneous. API responses should come whenever AND (ONLY THEN) we will worry with a error state.

Examples:

  • I will send a delete entry call
    • The app should assume the call was successfully submitted and responded at the same instance. Meaning the task should be removed from the screen upon clicking.
    • When the API returns a 200, the list is updated (maybe a new pagination, maybe a new ordering) but the user is already interacting with something else.
    • When the API returns a 400/500 response, a pop-up is displayed to the user and the response comes back with a revert operation in whatever was changed (maybe the old state of the article list has to be promoted again, since the fast one is not the most accurate given the bad response).

This implies that some actions will have to cache/keep an old state and a new state in memory. The new state always replaces instantaneously and the old state is only used when the response is bad. If response is good, old state is discarded.

@w3b3 w3b3 added the help wanted Extra attention is needed label Jul 31, 2021
@w3b3 w3b3 self-assigned this Jul 31, 2021
@w3b3 w3b3 added this to To do in v3 Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
v3
To do
Development

No branches or pull requests

1 participant