[Bug]: UI Inconsistent when navigating away from a failed post action with optimistic UI #3388
Replies: 2 comments
-
Thanks for opening the issue @JoshuaPhillips! I wouldn't call this one a bug (so I changed it to enhancement) because everything is working as designed. In any app in the world with or without optimistic UI the user can fire off the mutation and close their browser and they'll never know something went wrong. I'm not sure whether we can do anything about this in particular, but maybe the team will have an idea of how we could give you the right primitives to redirect the user back to the failed page (if those primitives don't exist). The UX I'm thinking is:
I'm not sure whether Remix currently exposes the things you'd need to build this kind of user experience, so I'm going to assign this one to @ryanflorence to give it a look. |
Beta Was this translation helpful? Give feedback.
-
With no context of the underlying implementation, I think it would be ideal to bubble up an error to the nearest loaded CatchBoundary or ErrorBoundary. so in the example from the livestream, behavior would be:
|
Beta Was this translation helpful? Give feedback.
-
What version of Remix are you using?
v1
Steps to Reproduce
Expected Behavior
The fact that the request failed should be clear to the end user, or the developer (depending on the implementation of the fix).
Actual Behavior
Not entirely sure, the route appears to alternate between the pre-optimistic UI version of the posting route / component, and the route that you've navigated to. @kentcdodds may be able to elaborate a bit more, as this was done on his livestream.
Beta Was this translation helpful? Give feedback.
All reactions