Optimistic Update vs. Immediate Intent
27 points by henvic
27 points by henvic
I hard disgree with immediate intent for fast routine operations. It’s awkward to see an intermediate “Liking…” for 100ms while the server waits for success 99% of the time. For such an innocuous operation an optimistic update is totally fine, and it can revert to the starting state if it fails. For something like uploading a large document which is much more likely to fail, immediate intent makes much more sense
Question for the UI/UX folks:
What is the correct way to indicate to a user that an action they took is not yet complete? For a program on a computer, most things seem to be instantaneous so I don't usually see "loaders" or timers, etc. that tell me that the computer is doing something and my button-click/scroll/whatever is not complete.
Do we assume that all actions may have a delay and implement an interim visual that triggers based on how long the program is taking to process a user action? If so, what is the standard for how long to wait (under which we would skip the intermediate "loading" indicator)?
Depends on the interaction. If the action is all local (e.g., a tabbed view where all the data is already loaded, just hidden), no loading state is needed. If the action makes a network request or is otherwise async, you cannot predict the conditions that can lead to latency. A loading state of some kind should be used so the user isn’t either lied to or left wondering if they actually tapped a button.
A baseline I was taught is humans perceive delays on the order of 100-200ms, so around then you want to start communicating with your user. Regardless of that delay, disabling the interaction immediately so a user doesn’t attempt it again while in the loading state should happen regardless. That disabled state can be styled differently from enabled so it’s clear the action shouldn't/cannot be performed again. You could jump straight to a loading view but that sometimes causes jank on the quick happy path, so you typically animate from disabled to loading.
Anecdotally, some of the companies I worked at would intentionally condition the in-office WiFi network to be slower one day a week so that the mobile and web teams could experience their apps closer to what a real user would experience (i.e., a ride share app is rarely used on a 5Gb corporate network, and needs to really, really be reliable and user friendly on a spotty 3G connection).
Often loading state handling and UI can be considered part of a design system and usually included in component libraries. For custom stuff that strays from these, the calculus of when to handle loading comes down to time and resources next to how critical this interaction is to your application. A rarely used, low stakes action does not necessarily need the same amount of energy applied to it compared to the button that lets a user give you money.
Fwiw, I would actually recommend against ever updating state fully synchronously from a UI.
Gmail is a great example of this. I often refresh the whole page (which they must hate with a burning passion because it's supposed to be an SPA) because when I click refresh, it often doesn't give me any indication that it worked. I have no interest in not knowing if what I did really happened, so I use the action that gives me an unmistakeable indication that my intent was fulfilled.