Progress bar design
Aug 19, 2021
It seems to me that a much more useful way to do a progress bar is by setting expectations. The block should be time left until the timeout code kicks in and you give up.
For example, if I have an operation I’m going to do, I start counting down until I give up on the operation so 100 seconds for example. Use a timed update to kick down the pixels in the block until timeout, and use the callback from the long running operation to drive a throbber.
That way your progress bar has a maximum, and is less filled with lies. It also forces you to think about committing to expectations at design time.