Every Frame Perfect
tonsky.meI just look at the largest tech companies in the world that with their unlimited finances cannot produce software that isn't glitchy like this.
If you're curious, you can see it here: https://www.thisischris.dev/projects/project-6/
The improved versions where the elements actually transform into each other, sharing the same visual real estate, is so much better.
At the same time, why does everything need motion? My understanding is that motion should be used if an action subtly changes the UI in a region that's different from where the action was triggered (e.g. toasts)
I think many of these transitions are unnecessary and would feel just as good if they snapped immediately with instantaneous reflow.
Often with out it your brain has to rescan the entire page on each refresh.
"Back-in-the-days" you'd click and stuff would instantly happen, and I don't remember anything being more difficult to visually interpret.
On my Kubuntu desktop if I disable all animations (the whole compositor) I don't feel there is an increased cognitive load of rescaning things - but maybe it's my preexisting memory of the UIs and certain baked in UI expectations. Maybe this animated stuff helps people that are computer illiterate? (software made for the lowest common denominator)
The key here is that animations happen outside the foveal area. Our vision is tuned to be extremely sensitive to motion and changes _outside_ the foveal area. So when something moves at the corner of your vision, it distracts your attention from your current focus.
This makes a lot of "modern" UI literally anti-productive. It actively _slows_ _down_ people and increases cognitive load.
https://tonsky.me/blog/every-frame-perfect/toolbar@2x.mp4, for example
I don't think I would have to rescan the entire page to figure out where things were afterwards. Everything's shifted to the right, just like when I open my browser bookmarks.
The notification area doesn't need animations either, because a GUI is only appropriate for displaying non-urgent notifications. If something really needs urgent attention, you need alarms and flashing lights, not an animated "toast".
I think it should work this way vs “how it be”
The only time I have to "rescan" is if I input a scroll and anticipate a scroll and it doesn't scroll. It has nothing to do with motion. In fact, in that case, I "rescan" even though the page hasn't changed, but because it doesn't match my expectation that it would change.
Proceeds to give a self only data point
Come on guy. Think a bit.
The only case I can think of where this is true is on scroll, and that barely counts as animation. Anything else is an irritating waste of time.
The absolute worst offence is animating page content on scroll. Great job making me wait on pointless nonsense while scanning your website for the bit I'm looking for. People who do this should be sent to reeducation camps. Both for the animation, and for disregarding 'prefers-reduced-motion'.
That said, I still prefer sway over the animated alternatives for other reasons.
Squash and stretch is a whole art style that relies on unrealistic frames.
Compare an ordinary pencil (no animations, movement is directly tied to your hand) to a pencil with a pompom on a spring attached to the end. Which is most fun for brief use? Which would you rather write a whole page of text with?
Consider a toolbar with a mix of enabled and disabled buttons. Hover effects (which I would consider animations) convey that something is clickable, and on-click effects confirm an action. These effects convey meaningful information to both beginner users and power users of any software, and are in no way inconvenient to either group.
I generally agree animations tend to get in the way when you want to get shit done, but the idea that animations are only applicable as artistic effects rings untrue to me.
One of the ways to achieve this is to not actually transition between states, but simply animate the "end bounce" of an introduced element, as if it was eased into position. So not actually slid from the left, for example, but rebounding the last few pixels from an imaginary slide. Our eyes just draw their conclusions to inform us of a movement, and in exchange the component is readable and usable immediately.
[1] ~100ms represents optimal reflex time in recent research. [2] Anything that requires user attention to interact after the component appears is very comfortable with a 150ms transition. One important note is that for components you can navigate across (i.e. one key shortcut invokes a modal state, another key runs a command in that modal), experienced users will "type" consecutive shortcuts in one go, and you must have the second behaviour responsive from frame 1.
[2] Some athletes seem to train down to ~80ms on very specific reflexes, which recently lead to race-start controversies when block timers disqualify sub-100ms reactions for runners.
For unpredictable inputs. Intervals between a human own actions or discrepancies in delays between successive external events can be effected or perceived with significantly greater precision, especially for people with e.g. music training, especially for percussionists. I’d bet on somewhere between one and two orders of magnitude more precision, that is single-digit milliseconds, at higher skill levels. (Chopin’s Fantaisie-Impromptu is among the easier rhythm-based parlour tricks and already requires staying below ~30ms of error. Alternatively, a single frame at 60fps is 17ms, and speedrunners can hit single frames of a game pretty reliably.)
Reasons:
1) I'm doing that thousands of times per week, I know what's going to happen
2) It's my desktop, there is no one else who might be puzzled by a non standard behavior
3) It's faster.
By the way, it is a GNOME desktop on Debian 13.
Oops, I lied. I was about to click on Reply and I realized that the bottom panel (which on a standard GNOME is at the top) is on autohide with a short transition. Maybe because it's the only transition that I activate with the mouse pointer: I hit the bottom of the screen and while it's traveling the last pixels the bar starts sliding in. It's very fast.
Other applications are to do things. They should do the thing and get out of the way as fast as possible. Animation-induced delays are fundamentally contradictory with that; they waste the user's time instead of doing the thing.
Good and useful animations communicate something, they're not there just to be there or to make it "pretty", which is most designers use them. But they can actually communicate intent, action, immediacy and other important things, if they're used sparingly in the right situations, without actually getting in the way.
Probably the most basic animation most of us PC users see every day is the very basic animation of a text cursor blinking on/off in text fields, like the one I write it right now. It's super basic, but communicates that the computer is waiting for you, it's alive and you can enter things. If it was static, you get the impression something is stuck instead, or couldn't tell exactly where the cursor is at a glance. But it blinks, and that tells us stuff.
Instant transitions are something I strongly prefer and use in practice. There's no question, I don't want my operating system slowing itself down to a factor (literally) of 1000x, pointlessly fading and jiggling and sliding and bouncing and wiggling. And, as this article points out, animations in operating systems often make a visually illegible mess in the meanwhile.
Animations might be a good idea in theory, but it doesn't seem like anyone has figured out how to do them right.
It also doesn't matter whether it's true if the majority or not- "Instant transitions are only good in theory" is not a true statement. Instant transitions are good in practice for many people and that has been true for decades.
Your experiences are not universal.
Probably because I had run into some apps with bugs when animations are disabled, and making them run twice as fast as normal is more compatible and reduce the annoyance enough that I forget its enabled. Apps that animate at normal speed in defiance of my settings get deleted.
But I also set windows not to show window content while moving or resizing, because I find that to be annoying too.
Reducing duration or eliminating animation is one of the first settings I do on a new install.
Maybe software programs got faster with our faster CPUs but all the animations just made everything feel slow.
They don't. Most things don't. This kind of nonsense keeps an extra half-dozen people employed, and gives license to a half-dozen other people to smugly proclaim $BRAND's design language is superior to alternatives.
In most of the cases shown, it would probably feel better if the animations weren't there. I clicked the button, show me the thing. Don't do a dance and then show me the thing, just show it!
The cursor appears on the left because that’s where the user will actually start writing. I assume that’s where people look, if they know the UI. Having it appear in the middle of the screen and then move over would be unnecessary and distracting.
The stand-in text slides over to the left, to draw the attention of the unfamiliar user.
Instead, we get a zooming in/out raccoon (making fun of the reader, IMO) for recognizing this problem via the OP author.
Maybe it's just a really hard problem to solve across all devices & latencies... Perhaps more time needs spent on "problem solving" vs "problem description".
- No partially loaded content. - No relayout while content loads.
Holding those as hard rules leads to delay or rejection. Instead, while I agree it's better to have everything up front, gracefully handling cases when we don't is important, and some degree of responsiveness, even with partially loaded content, often makes for a better experience for the user than a delay.
Just be up front about it and find ways to keep continuity of relationship and smoothness. Diffeomorphic mappings are your friend...
Like the issue with the osx side bar transition is that the order of operations makes no sense.
When expanding, it makes the buttons vanish only to animate their reappearance from nothing once a panel slides over them.
It would make sense in the physical world if the panel occluded the buttons during transition.
During closing, the reverse problem happens. The buttons aren’t occluded but clip through the panel like it became water.
It happens fast but not so fast that you can’t see it, and there is an unnecessary distortion.
In today’s world of AI, good taste is all we human workers have so we should call out cut corners.
Now it’s 30-ish years later and computers have not recovered the latency increase from compositing, double-buffering, and other attempts to make every frame perfect. If you are showing a frame on the screen that has failed to react to input that already occurred, especially more than about 20ms later, that frame is not perfect. It’s extra imperfect if the user cannot easily do what they’re trying to do while waiting for the computer to catch up with them.
But yes, most of the examples in the article are surely both imperfect in the sense the author meant and pointlessly slow, so there is no dichotomy :-/
Old Apple knew not to overdo things.
On a personal level, if thing works - I say, cool, lets focus on something else now.
But I have worked with people who are similar to the author and we will get into the conversation:
- they: wait, but the bundle size is 2.4Mb, it can be improved a lot
- me: by how much? and we have 10k users/day and we have cache policy setup
- they: we can reduce it to 1Mb, imagine saving 10k*1.4Mb every day
- me: yeah, but its not costing us much, if you focus on making it perfect your salary will cost us 2 years of outbound traffic cost.
- they: no, but its not perfect
I admire those people, because they're valuable asset in some companies (e.g. Google scale, saving 1.4Mb for 1 Billion people every day is a lot), but my mind doesn't even want to think about what's perfect.How do I get there? What are the resources I can read and learn from to look at things to make them perfect?
The issue with “premature optimization is bad” is that some see it as a permission to not optimize at all. Hence you eventually end up with a system where everything is bad.
—
Although for some of us being obsessive-compulsive weirdos this is the only way of life: an itch that keeps on physically scratching until resolved.
“Be guided by beauty. I really mean that. Pretty much everything I’ve done has had an aesthetic component, at least to me. Now you might think ‘well, building a company that’s trading bonds, what’s so aesthetic about that?’ But, what’s aesthetic about it is doing it right. Getting the right kind of people, and approaching the problem, and doing it right […] it’s a beautiful thing to do something right.”
Absolutely, but on the other hand businesses operate with lots of broken windows as well, and they are fine with it.
Dilemma I am having is, on one side, business needs my best judgement for today and short term, because this is how most businesses survive, on the other hand, on a personal level I feel like I am stuck making non-perfect decisions, hence I can't even think about perfect world, because I am not training that part of my brain.
In that bandwidth case I'd be annoyed by the waste which kind of pervades software already, and it'd feel great to know at least we countered it a little bit.
I have mine at 0.5x and that feels sufficient, still fast but I can see apps opening and closing etc.
The problem with 0x is that it seems to only affect like 90% of the UI. Certain things still animate, and the cadence feels awful as a result.
At 0.5x the stuff that's mysteriously unaffected by the animation speed setting isn't as jarring.
I would use 0x if it worked properly.
Many transitions in Android are perfectly fine at 0x animation speed. The majority of transitions that suck without animation suck because the pre-/post-transition layout sucks and the transition between the two states doesn't make sense as a result.
It's the same with several of the transitions in TFA. For example, the address bar placeholder text[1] should just be left-aligned all the time. The save dialog[2] should leave all the basic controls in their original location[3] when switching from the basic mode to the advanced mode. That means the "Where:" label should also remain in the advanced mode, and the controls[4] that pop up to replace it should either be moved to the right or below. The search bar should also be moved down.
These are some really basic details and it is my understanding Apple used to not screw them up nearly as badly.
[1]https://tonsky.me/blog/every-frame-perfect/safari@2x.mp4?t=1...
[2]https://tonsky.me/blog/every-frame-perfect/save@1x.mp4?t=178...
[3]https://imgur.com/ZpHLCsv Artist's rendition. Please excuse the minor jank and criminal amount of empty space; I couldn't be arsed to fiddle with the screenshots to get pixel-perfect positioning and shrink the advanced dialog horizontally. Bikeshedding over where exactly the new controls belong is welcomed but irrelevant to the point I'm making.
[4]Is it just me, or are their icons uselessly, impenetrably, unhelpful?
With MacOS I felt there was a major quality change for visual quality & animations when SwiftUI was used BY Apple for the OS and applications.
I'm not a developer, but it felt there were areas where an icon or window just didn't visually work the way it used to or SHOULD in placement or animation.
The hackish-ness hasn't changed over time: there are so many examples throughout the OS/Applications that I want to say "it was always like that", except it wasn't: Apple set the bar and it was high, the quality was exceptional.
I feel there are a lot of hacks going on with SwiftUI to achieve the same UI placement or animation.
Last quick note I think about often: a lot of analog creation was really hard. It still is. When it comes to digital we've been thinking we'll come back to things later, but never do... we build more bad on top of bad... sadly.
After reading this blog post, I think the rule of thumb should be "If I take a screenshot of your app at any moment (except during animations), it must make sense". I don’t think making sense during an animation should really be a goal, as long as it makes sense before and after.
Maybe I've just spent too many years as a pixel-perfect chasing frontend developer, but things can look very janky if they jump out of place during animations, compared to where they are before/after.
My comment starts with "After reading this blog post"; of course I read it, but it left me totally unconvinced, especially because the author doesn’t bother showing good examples: he criticizes these and then leave you with a random raccoon animation and that’s all. For example, I don’t understand what’s wrong with the Youtube animation; it looks perfectly fine to me.
In an ideal world, it is hard to argue with. Yes, sure it should make sense. But also, please don't spend precious cycles on this unless all the other bugs are fixed, and this animation consistency is truly the most important remaining issue to address.
Computer graphics is all about exploiting features of the human visual system. We perceive things differently when they're moving vs. when they're standing still. It's very possible that a "wrong" frame in isolation is the best looking one in a real-time context. We can also pick apart screenshots but these don't capture everything about how the user perceives a display in real-world lighting conditions.
I would draw an analogy to film. A fast tracking shot might look bad on individual frames because of motion blur. A wide-angle shot might make some objects look "wrong" because of optical distortion. But these are still the right choice if they have the intended artistic effect in the theater.
The idea that I would defend screen shake is a complete straw man. How do you get from my comment to that conclusion?
This is just true though. It isn't the only thing that matters but if you are creating a game or a video sometimes you do capture things frame by frame to understand why something looks off when animated.
Your film thing isn't an analogy, you are trying to say film is an example where some frames have motion blur so they don't look good, but since that's okay in film, it should be okay in software and apps. The word "good" is being overloaded to mean different things in each example. Screen shake in a video game or chromatic abberation in a film can be good in those contexts because they are the intent of the artistic direction. Maybe if you are hung up on the word "good" replace it with "appropriate" or "intentional".
I do like the point the article makes about using ui fidelity as a proxy for software quality, and agree that they pointed out some bad animations. But, I think you hit the nail on the head .. frame by frame coherence isn't the best yardstick for measuring animation "goodness".
It's one thing if the frame halfway through an animation looks a bit "funny", but is still completely logically correct. It is another if the intermediate state of the animation legitimately doesn't make any sense and is just the result of not really caring about what actually goes on during the animation. In that case I'd almost rather just not have the animation at all, or just have a simpler one.
That said, I think it's fair to hold most practical UIs to a different standard. Prioritizing amusement leads to a lot of strange non-ergonomic places.
GP's point is that those frames aren't broken, but they're intentional and calculated, and so they're not even relevant here.
Adding the correct blur to motion makes it appear clearer but seen as a still, it's obviously not clearer. The nuance is correct motion blur appears clearer while guaranteeing it's as clear as the human visual system can perceive moving details at that speed, so no perceptual detail is actually lost. It's a method that objectively improves perception which only works in motion. If frozen, the method breaks. Thus, evaluating motion blurred stills for clarity or interpretability is incorrect.
The rest of the article focuses on details of proper implementation while missing the opportunity to question whether some of these animations should exist at all. IMHO, motion can be a valuable affordance in limited doses but it's reached a point of overuse and, in some cases, outright abuse of the user's visual field and cognitive load. Designers (and their PMs) see it as a badge of 'Refined Modern UX' but it's devolved into a trendy gimmick aping good design without being good design.
Yes, I think we agree. When a thing is becoming a larger/smaller form of itself in a different place, it can be useful to cue the relationship visually with motion. But there are times when the change or displacement is minor enough, I do prefer 'just do it', even when the animation is hyper-fast. It's just more visual/cognitive clutter.
It's obviously situational, and if such motion is always very fast, consistent and well-motivated, it never rises to the level of annoying me. I might personally prefer some instances where, if the position overlaps and the size change is minor, just skipping it, but it's not 'bad'. I think the key may be that, done properly, such motion should cognitively be a 'barely there' hint. The moment a state-change animation rises to having perceivable aesthetic value, like being 'pleasing', it's too much.
As the senior product owner, I once had a new designer argue that if an animation was as fast as I wanted, no one would be able to appreciate the excellent S-curve ease-in/out. :-) I had to explain if a simple state-change animation was slow enough to be consciously 'appreciated', it had failed in its purpose.
Or you find out you can input as the animation happens, but when the animation finishes, you’ve lost where your input ended up and don’t know if you can backspace/delete and retype.
(Yes, I’m expressing multiple issues here w/ui & animation & input)
Also: Apple dumped Flash ~15 yrs ago, so whatever it is... it's very slow. The larger, more recent suspects for any "collapse of Adobe empire" would be "Adobe forcing $ubscription model" and "rise of Figma."
I find AI to feel real nice for pushing delight like this further than I used to have time for as it was never a priority.
Wouldn't be the worst takeaway from the article. You should avoid animation for animation's sake in general. Imagine if we animated letters flying up from your phone's keyboard into the text field as you type them for example.
When iOS first launched, some of the brilliance was in how UI elements transformed into one another—a title in the title bar becoming a "back" button on the left, for instance. There were no intricate morphs, just a simple cross-dissolve between two elements shown briefly at the same time. It read as meaningful without being literal.
The Crop/Adjust example doesn't hold up here, because the two modes don't share a focus. The crop animation is deliberately different: it emphasizes the cropping controls at the edges of the image that you might otherwise miss, prepping you visually for the task and tying the controls into the image workspace. Adjust mode has no direct controls on the image itself, so the transition out should differ. The mismatch is the point, not a flaw.
For most UI, you don't need pixel-perfect morphs between small elements. The real job of animation and behavior is to convey meaning and context. Make your transitions pixel-perfect and most people would never notice the difference.
For anyone curious, https://www.thisischris.dev/projects/project-6/
Snow Leopard was the first to integrate iOS's CoreAnimation framework. Nearly all animations now are based on that. Before, the CPU manually updated the sizes and positions of things, frame by frame, in a loop. This is how you'd program a Game Engine.
After, with CA, state-change property models are sent to a different process entirely which does its own interpolation to animate the UI at a higher thread-priority than any other process in the operating system. This is fantastic if maintaining 60+ FPS at all times, even on an iPhone 1 or 3G with less power than you'd have in today's AirPod chips, was a central requirement. (And it was, the first iPhones dominated their competitors in terms of input latency and framerate)
But programming CoreAnimation is much more complicated and easy to make mistakes in if you want "every frame perfect". Trust me, I made a lot of the animations that shipped in iOS 7 (the Calendar app is full of them, OS level transitions for the core chome elements of iOS). It took nearly a year of meticulousness to get things looking ok. In the years since I left the company, I've noticed these transitions get more and more janky and buggy and full of artifacts. Clearly, whoever replaced me doesn't have the same eye and sense of craft. Oh well.
The result is that the indicator is not really indicating what it's supposed to (since it's out of sync with the view): It's indicating the old view when I'm already in the new one, and then it's indicating something between the old and new views, when clearly I'm not between views at all. So it's completely wrong for the entire animation until it finishes.
The save dialog, albeit a little shakey, is nowhere as chaotic as in your example. The buttons in Notes move between panes in a perfect seamless manner. Albeit the animation occasionally glitches out when you repeatedly focus and deselect the Safari bar, the cursor is perfectly timed with the text, only fading in after the text is done moving to the left. The Preview bug must be something recent too, I can't reproduce this.
I miss it when companies like Apple, Sony, and IBM paid attention to the smallest details. Apple in particular earned its current valuation with the iPhone, an all-touch device that did nothing extraordinary compared to Windows Mobile and Symbian PDAs of the time (and was in fact functionally lagging behind compared, failing to even match the then-contemporary feature phones in some areas) BUT one that you didn't actually want to smash against a wall after a few minutes of use. Now these animations are bringing back exactly the Windows Mobile and Symbian vibes.
Remember how happy Steve used to be with OS X animations? He would replay them on stage multiple times, in slow motion. These though, these would have the people behind them face the fate of the iPhone 4 antenna man.
I think this is a weakly presented argument. The article doesn’t actually present stronger alternatives or even why anything shown is negative to the user. It might be negative but otherwise this is the same vacant critique that is levied by pointing at smear frame or transitional points in media to critique it.
The user also has an untenable maxim. Every frame must make sense? I would posit this is impossible, or I’d ask the author how they’d handle window resizing while keeping every frame perfect.
I also think the author themself finds it easier to point out flawed frames (again without actually explaining why they’re issues) than doing as they say. Tap the header links on their blog and see the animations play after the click is complete. Or go see their own UI projects and see how text and objects don’t stay within their containers. Surely someone saying that this is a tenet that should be followed could demonstrate it themselves.
I think this is just a very hollow critique on their end.
A more competently written article would have focused on why anything shown is bad for the end user, and how they might handle it instead. A good critique should actually include some substance and point to more than just the what, but the why and how.
The article is presenting an idea, not a solution. You've failed to see this and have constructed several strawman arguments in order to critique it.
Most importantly the article does not present itself in a definite sense - it is written with care to say "I think", "Next thought:", "Probably", "So yeah.". This article is a person sharing what they are thinking, and unlike many of my thoughts - it is a fairly complete thought which is clearly sparking many other reasonable people to think along similar lines.
The author doesn't present the solution - but there is no reason they should have to. What an odd and unreasonable bar you set.
I also don't find your attacks on the authors site particularly endearing. The taste gap is well known, and punishing someone for their conceptual contribution outstripping their practical skill is quite... distasteful.
A more competently written critique would have been more charitable and in the spirit of this community.
Can it be possible to make everything during a user interaction perfect looking? What does that mean?
That was part of my original comment that you skimmed past rather than engaging with. So if you truly believe this should be a starting point of a discussion, then why not even bother taking that point to build a discussion point off of?
I’d also argue that this is not presented as just an idea. That is disingenuous. The author clearly writes “I call these situations “The technology has outsmarted the programmer” “
That is more than just a discussion point but a levied criticism at the skill of the people making things. In turn therefore they’ve set the framing of skill as part of the discussion and I don’t think it’s unfair to point out their own lack of ability to execute to their high standard.
But let’s go by your standard of saying that we shouldn’t take the authors own execution or their own words into consideration but only focus on the core idea they present.
Then that still leaves defining what they consider every frame being perfect. What are the bounds of that statement?
The article establishes an arbitrary standard, provides examples and criticizes them on the basis that they don't meet that arbitrary standard, and then... nothing.
It is easy to criticize something from the outside. Much harder to dig deep, learn the material and understand why it produces the status quo, and then propose workable solutions. That's where the actual value lies.
Lazy, lazy development.
"Job done, boss! Ready to ship to... checks notes... 3 billion users!"
"Did you test it?"
"Test? I thought we had a QA department!"
"Nah, we fired all of them a decade ago. You're the QA now."
Wasting processing cycles making things look pretty yet it almost always results in a worse situation for the user.