News for hackers. Stuff that matters.
Re:UI Web Design 5 Rules of Thumb by happytoexplain on Friday December 23, 2022 @09:56AM (#34106474)
Spinner vs progress bar is not short vs long operation, it's non-progressive vs progressive operation (though you may opt for a spinner if a progressive operation is consistently, predictably very short).

In the software world, designers need to be engineers (or work very closely with engineers, very early in the process). We recently had designers give us a nice looking progressive indicator for a non-progressive operation that happened to take a somewhat predictable amount of time. Business loved the look and visual feedback. Then we got use cases where the operation could be instantaneous. They didn't want to skip the progress animation because they liked how it made the app feel like it was doing something, and also if the user got the result instantly, it was "jarring". So now, even if the operation finishes instantly, we show the animation, wasting the user's time.

Re:UI Web Design 5 Rules of Thumb by caradine on Friday December 23, 2022 @10:33AM (#34106875)
I inherited a React codebase that was littered with setTimeout() for no apparent reason.
Re:UI Web Design 5 Rules of Thumb by bmelton on Friday December 23, 2022 @11:40AM (#34107744)
Bad race condition protection or trying to impose a sense of gravitas through loading times?
Re:UI Web Design 5 Rules of Thumb by robocat on Friday December 23, 2022 @03:42PM (#34110385)
I think setTimeout() is a bad code smell because it very often introduces race conditions. Fortunately async has reduced the need for it.
Re:UI Web Design 5 Rules of Thumb by jamil7 on Friday December 23, 2022 @11:44AM (#34107809)
Recently worked on an iOS app with the exact same thing, delays inserted on every write which was basically instant as it was writing to SQLite. Client refused to remove it too, you need to pick your battles as a freelancer to get anything done, so I left them there.
Re:UI Web Design 5 Rules of Thumb by kevincox on Friday December 23, 2022 @12:46PM (#34108594)
If you are lucky it is to give the illusion of the app working hard. If you are unlucky they are "fixing" race conditions.
Re:UI Web Design 5 Rules of Thumb by geysersam on Friday December 23, 2022 @10:19AM (#34106733)
Wonder how often this is the case. Especially a couple of years ago, in early SPA time, show 1s spinner every page navigation. shudder
Re:UI Web Design 5 Rules of Thumb by a-r-t on Friday December 23, 2022 @09:59AM (#34106498)
Do you work for TurboTax by any chance? :)
Re:UI Web Design 5 Rules of Thumb by happytoexplain on Friday December 23, 2022 @10:02AM (#34106537)
No, but I'm aware they do the same thing for psychological reasons. Our road to hell was much less formal (Business: "I like the way it feels").
Re:UI Web Design 5 Rules of Thumb by geysersam on Friday December 23, 2022 @10:22AM (#34106753)
Perhaps you can reduce the animation time by 5% every month. One day people will have gotten used to the faster behavior. Eventually you can remove it without anyone feeling that something is off.
Re:UI Web Design 5 Rules of Thumb by franky47 on Friday December 23, 2022 @10:34AM (#34106883)
And brag to management that you made the app 100% faster.
Re:UI Web Design 5 Rules of Thumb by psygn89 on Friday December 23, 2022 @10:51AM (#34107099)
On the opposite side of jarring there are times where an app refresh action works so fast that users think that it's broken since they didn't visually see a change (even though it did refresh and there is nothing new to show).
Re:UI Web Design 5 Rules of Thumb by ziml77 on Friday December 23, 2022 @01:06PM (#34108821)
My solution to that is to simply have a last updated time on the page with precision down to seconds. Just update it to the current time every time there's a response from the server even if it's empty.
Re:UI Web Design 5 Rules of Thumb by HellsMaddy on Friday December 23, 2022 @02:14PM (#34109566)
You’re thinking way too much like an engineer. Humans aren’t robots. Your solution would work great for a JSON payload, but not well for humans at all.

Your solution adds complexity to the page content with very little, if any, payoff. It requires the user to be aware of the precise time, to be aware of whether a very small region of the page has changed ever so slightly, and does not provide any additional value beyond acting as a poor proxy for whether the user’s attempt to refresh did anything.

A short loading animation is easily visible to the user (we’re great at seeing motion), it’s immediately obvious what it means, and it vanishes as soon as it’s no longer relevant. It communicates exactly the necessary information, no more, no less.

Re:UI Web Design 5 Rules of Thumb by Arrath on Friday December 23, 2022 @03:00PM (#34109957)
"Wait did the page actually refresh? I better hard refresh just be to safe..."
Re:UI Web Design 5 Rules of Thumb by charrondev on Friday December 23, 2022 @09:11PM (#34113138)
For this reason the software I work on pops up a subtle (and auto dismissing) little confirmation toast.

I find a small acknowledgement that the thing works is better than just having an arbitrarily long loading indicator.

Re:UI Web Design 5 Rules of Thumb by simonmales on Friday December 23, 2022 @11:27AM (#34107540)
This is quite a well know pattern for flight ticket aggregators.
Re:UI Web Design 5 Rules of Thumb by Raed667 on Friday December 23, 2022 @11:28AM (#34107557)
A long time ago, I worked on an app that processed a lot of data and the PM wanted to make the user feel that their actions are impactful. So in the specs some loading states needed to appear for at least 1second. Just to make it look the work was "hard"
Re:UI Web Design 5 Rules of Thumb by elboru on Friday December 23, 2022 @11:54AM (#34107975)
Junk apps have taught me that a spinner that takes too much time could be an indication of failure though. The user will be inclined to refresh or close the app.
Re:UI Web Design 5 Rules of Thumb by mort96 on Friday December 23, 2022 @12:01PM (#34108056)
Same, but only if it "looks like" the app expects it to take a short-ish amount of time. If your operation will take more than a few seconds, the app can include text saying "This usually takes a few minutes" (or whatever is appropriate), and I'll know that a long of a delay to expect before I think something's wrong.
Re:UI Web Design 5 Rules of Thumb by lelandfe on Friday December 23, 2022 @12:09PM (#34108175)
> though you may opt for a spinner if a progressive operation is consistently, predictably very short

For greater guidance on this, the Nielsen Norman Group says thusly:

> Use a progress indicator for any action that takes longer than about 1.0 second.

> [A looped loading animation] should be reserved for actions that take between 2-10 seconds. For anything that takes less than 1 second to load, it is distracting to use a looped animation, because users cannot keep up with what happened and might feel anxious about whatever flashed on the screen

> Generally, percent-done progress indicators should be used for longer processes that take 10 or more seconds.

https://www.nngroup.com/articles/progress-indicators/

Re:UI Web Design 5 Rules of Thumb by CharlesW on Friday December 23, 2022 @12:48PM (#34108608)
> Spinner vs progress bar is not short vs long operation, it's non-progressive vs progressive operation…

Spinners are typically used for "indeterminate" operations while progress bars are typically used for "determinate" operations¹.

"Progressive" is a less useful adjective here because indeterminate operations progress too, and it's just that their total duration can't be usefully estimated.

And as you note these aren't hard-and-fast rules, and a spinner is generally a perfectly fine choice for short determinate operations.

¹ Progress bar controls typically have an indeterminate flavor too, and these can be mixed. For example, you'll typically see an indeterminate form of a progress bar until a total duration can be estimated, at which point the progress bar will change to its determinate form.

Re:UI Web Design 5 Rules of Thumb by happytoexplain on Friday December 23, 2022 @03:10PM (#34110084)
>Progress bar controls typically have an indeterminate flavor too

Good point - I was simplifying by referring to all progressive animations as "progress bars" and all non-progressive animations as "spinners".

>indeterminate operations progress too

I normally think of "non-progressive" and "indeterminate" as synonymous in this context. If the UI can't tell what fraction of the whole has been completed by any metric (which could even include best guesses based on historical data), I refer to that as non-progressive or indeterminate, interchangeably.

Re:UI Web Design 5 Rules of Thumb by CharlesW on Friday December 23, 2022 @04:31PM (#34110825)
Cool, I figured we were just using different words for the same thing. I learned a lot of this stuff in the "Inside Macintosh" days, so my UX argot tends to align with it. https://developer.apple.com/design/human-interface-guideline...
Re:UI Web Design 5 Rules of Thumb by wintogreen74 on Friday December 23, 2022 @05:22PM (#34111274)
Even determinate progress bars are challenging because they typically represent a portion of a known measure that doesn't necessarily match with the user's measure of reference. Example: "75%" complete might mean 75 of 100 files updated while the user is thinking "It's taken 15 minutes so 5 minutes longer.
Re:UI Web Design 5 Rules of Thumb by CharlesW on Friday December 23, 2022 @05:57PM (#34111573)
Absolutely! Is there anything more painful than a progress bar that "hangs" at 95% for 30% of the total time?
Re:UI Web Design 5 Rules of Thumb by tshaddox on Friday December 23, 2022 @01:49PM (#34109289)
> So now, even if the operation finishes instantly, we show the animation, wasting the user's time.

I thought it was fairly well accepted that small deliberate UI delays (for things like loading spinners and animations) can in many cases result in a better user experience. Of course, that would depend on how long this animation is that you're talking about.

Re:UI Web Design 5 Rules of Thumb by happytoexplain on Friday December 23, 2022 @03:16PM (#34110135)
You're absolutely right, in some cases. It depends on who you are and what kind of software you use. Delays or animations can improve communication between the UI and the user. Or, they can be pointless and frustrating, e.g. if the software's task feels utilitarian, and there's no confusing or hard-to-perceive transition that an animation would help to bridge, and the user knows the animation is functionless.
Re:UI Web Design 5 Rules of Thumb by jonnybgood on Friday December 23, 2022 @02:01PM (#34109419)
> They didn't want to skip the progress animation because they liked how it made the app feel like it was doing something, and also if the user got the result instantly, it was "jarring".

Like hard bristle toothbrushes. Hard bristle toothbrushes are not good for your gums. So why do they make them? Because customers like hearing the sound of the toothbrush brushing. They like hearing it do something.

Re:UI Web Design 5 Rules of Thumb by simonbarker87 on Friday December 23, 2022 @03:14PM (#34110122)
I had this on a project recently, they wanted the spinner to appear for at least 5 seconds even if the operation took less than that. Most of the time it took under 2 seconds - made me so annoyed.
Re:UI Web Design 5 Rules of Thumb by antifa on Saturday December 24, 2022 @02:06PM (#34120008)
I think the optimal number for a minimum loading animation duration is closer to 0.3 seconds, I can't look up the actual number I use ATM.
Re:UI Web Design 5 Rules of Thumb by merlinran on Friday December 23, 2022 @11:21PM (#34113945)
A proper UI is not about telling people how the things are done, it's about managing/meeting users' expectations on how the things are done, so it's pretty valid to let the users wait longer if that makes them feel better (not saying there are no better ways), pretty much like a placebo.
Re:UI Web Design 5 Rules of Thumb by howaboutnope on Saturday December 24, 2022 @02:30AM (#34114815)
I hate software bloat and thrown away milliseconds, but even then I realize that our visual cortex is really good at noticing movement, but hasn't had any experience in the last millions of years with stuff just popping up out of nowhere or teleporting. I know nothing about usability but just from knowing that, and my own experience, I can't dismiss any and all "useless" animations out of hand. There was a time when we couldn't afford them, now it depends.

Maybe this would be a useful way to look at it: if the average disorientation caused by instant change (which also depends on whether the change is predictable, makes other things change position, etc.) takes longer to recover from than the shortest animation/fade you could come up with, have a transition.

(but even then it doesn't hurt to gate all of that behind a global configuration option, IMO, and if you want to be really fancy make it a float, not a boolean)