Every Frame Perfect

(tonsky.me)

186 points | by ravenical 5 hours ago

20 comments

  • ikesau 2 hours ago
    I'm sure a UI that had none of these imperfect frames would feel better, but now I really want someone to edit each of these clips to show what it would actually look like.

    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.

    • Kiro 30 minutes ago
      Play any game with good UI and you will see animations used everywhere. Instant transitions are only good in theory.
      • Krssst 1 minute ago
        Games are for fun. Wasting time in a game is fine, that's what it is for.

        Other applications are to do things. They should do the thing and get out of the way as fast as possible. Animation delays are fundamentally contradictory with that; they waste the user's time instead of doing the thing.

      • mrob 22 minutes ago
        Games are entertainment products, not tools. It's acceptable for a game UI to draw attention to itself for artistic effect, but I don't want to have to put up with this when I'm trying to get work done. Instant state transitions become imperceptible as you learn how they work. An instant UI effectively functions as part of your body, just like hand tools do. Animations make this impossible.

        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?

        • mawadev 18 minutes ago
          I think this is key to understand the motivation behind pretty and animated UIs. In games it has a different motivation compared to UIs that you use as a tool. If you compare old software to new software, a lot of tab switching and hotkey magic is simply not there anymore. Blender has a notoriously difficult UI but once you get the hang of it, you become very efficient. I think the current way of creating UIs caters to people making decisions of whether to purchase the software but that don't actually use the software in the end.
      • voidnap 5 minutes ago
        No they are not used everywhere. Some games with good UI use animations everywhere that an animation is appropriate. But plenty of good UI exist without animations. The point above is that no animation is better than an inappropriate animation.
      • jayd16 23 minutes ago
        You will also see plenty of cases where a screenshot captures incoherent frames.

        Squash and stretch is a whole art style that relies on unrealistic frames.

      • pmontra 21 minutes ago
        Games are games, work is work. I disabled every animated transitions in my desktop UI. Elements appear instantly at full size in the place they rest and disappear instantly.

        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.

    • ryukoposting 23 minutes ago
      > At the same time, why does everything need motion?

      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!

    • tsunamifury 2 hours ago
      Motion is critical for reorientation after transition.

      Often with out it your brain has to rescan the entire page on each refresh.

      • mrob 1 hour ago
        Outside of dedicated notification areas, a GUI should only change state in response to user action. Because the user requested the state change, they naturally know how it changed. This means any animation is a redundant waste of time.

        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".

      • geokon 1 hour ago
        Do you have some concrete examples?

        "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)

      • ikesau 1 hour ago
        Ah yeah, that makes sense, but I still feel like there's room for a little more discretion.

        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.

  • mrob 1 hour ago
    I'd rather have an imperfect frame now than a perfect frame later. Latency should be the top priority for any UI, because when latency is low enough it feels like a part of your own body, which minimizes cognitive load. Animation is especially bad for this, because animations add hundreds of milliseconds of latency.
    • cloogshicer 52 minutes ago
      I think that's a false dichotomy. The examples the author gives would not be slower in any way if done correctly.
      • chaboud 32 minutes ago
        However, the author makes these assertions:

        - 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...

    • inigyou 1 hour ago
      You might have thought the title was about Wayland and you're right. But this isn't about Wayland.
  • fasterik 7 minutes ago
    I agree that some of the screenshots the author provided are examples of bad animation. But I don't agree with the premise of the article.

    Computer graphics exploits 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 the context of many frames in succession.

  • hk__2 30 minutes ago
    > The rule of thumb is: If I take a screenshot of your app at any moment, it must make sense

    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.

    • montroser 18 minutes ago
      Well, this is the exact opposite of his point. Of course it should make sense when not animating! That is given. The entire crux of his point is that it should also make during an animation.

      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.

      • appplication 16 minutes ago
        I think you nailed it. Animation nuance is fine to burn time on if you’ve run out of things to do.
    • embedding-shape 21 minutes ago
      It's like you read until that point, but then didn't read the justification for why it makes sense to care about frames during the animation, the author does outline a bunch of reasons why it should make sense during the entire thing.

      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.

    • alluro2 12 minutes ago
      But the author tried to show exactly that, if screenshots during animation don't look sensible, it points to animation as a whole not making sense - it being either messy, overlapping, or confusing - and, in general, eroding the user's trust.
    • motoroco 19 minutes ago
      I first heard something similar taking motion design classes in art school: every frame should look good. Transitions and animations that have bad in-betweens look bad overall
  • naet 56 minutes ago
    I think it's not uncommon for good animations to cheat a bit while in motion, rather than look perfect on every frame. Like how cartoons can use smear frames that look bizarre when paused at the wrong time but when viewed as part of a larger animation help sell the motion visually.
    • ryukoposting 18 minutes ago
      I don't think this analogy works because the blur frames look good in motion, and the frames in the blog post look terrible in motion. The animation in the first example is so bad that the first time I watched it I thought there was going to be three buttons at the top at the end, and it was weird and disorienting to realize there was only two.
    • DavidVoid 29 minutes ago
      The game Overwatch is a pretty great contemporary example of this [1]. It has some excellent fluid animations, which look really weird if you freeze frame them.

      [1]: https://youtu.be/vIdeGmN__Pw?t=550

  • mawadev 23 minutes ago
    Feels like UI elements have a lot of abstractions that are not perfect for motions. With every hack you work around the layout engine that gives you this simplicity of defining layouts. Some libraries allow you to define keyframes for the motions in between, but it still isn't perfect, especially if you look at the youtube sample where one element overlaps the other and the animation would take up too much time or look odd if this wasn't the case. Even if you perfect all of this, would you really want to spend more processing power and script weight on these aspects? I feel like most UIs have severe latency issues out of the box, anything that doesn't address the elephant in the room adds insult to injury.
  • hankbond 2 hours ago
    This resonated with me, but I would have loved to see some positive examples as well. The tone did not read as a rant, but as someone that doesn't know too much about good UI construction, I did not feel like I walked away any closer to understanding what a North Star should be.
    • jastanton 1 hour ago
      Or if the author mocked out what each of the bad examples should look like if done properly.
  • mbostock 1 hour ago
    There’s a similar principle of congruence in information visualization, stated in Animated Transitions in Statistical Data Graphics by Heer & Robertson as: “Maintain valid data graphics during transitions. To ensure viewers’ mental models are congruent with the semantics of the data, we suggest that, as much as possible, intermediate interpolation states remain valid data graphics.” https://idl.uw.edu/papers/animated-transitions
  • flyingshelf 2 hours ago
    This is the kind of things that bother me when using software and unfortunately almost every software is affected.

    I just look at the largest tech companies in the world that with their unlimited finances cannot produce software that isn't glitchy like this.

  • satvikpendem 1 hour ago
    An app with no animations at all is going to feel terrible. You can test this out yourself, if you have an Android you can set animation speed to 0x in the developer settings. It is jarring to see instant changes and it actually takes your brain a second to process what happened, and that process is probably slower than having the animation in the first place.
    • bvrmn 53 minutes ago
      I'm a happy user of android with animations turned off. It's the only mean to make it somewhat "snappy". IMHO lag is always worse than lack of fancy transient state in input -> UI change context.
    • ryukoposting 12 minutes ago
      I have mine at 0.5x.

      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.

    • embedding-shape 33 minutes ago
      After using Android for like a decade, I eventually succumbed and got a iPhone 12 Mini (back when it was new). I still miss the ability of turning off animations as I could do on Android, and I'm 110% my current phone would feel 200% faster if I could just turn off every damn animation that just exists to exists. I'd much rather have a second to process if that's needed (which I don't think it is), than being slowed down by one second every time an app changes the page, everything feels like molasses when you navigate around.
    • yellow_lead 1 hour ago
      Not for me, I always turn off animations. It feels fine for me, and I can operate the phone a lot quicker without having to wait for animations to complete.
      • intrikate 56 minutes ago
        I don't turn them off entirely, I kind of enjoy the feeling of momentum animated elements can provide, but I definitely do go in and speed them up massively. I find that when a phone is feeling unresponsive or sluggish, it's usually because I'm moving two steps ahead of the animation and it has to catch up. Feels like tripping on your own feet.
    • saati 53 minutes ago
      All animations are just wasted time while you can't properly interact with the UI, it's much better to just turn every one of them off.
    • ivanjermakov 57 minutes ago
      Give it one day and you won't come back to those sluggish animations slowing your intent down.
  • skybrian 1 hour ago
    These seem like low-priority bugs to spend time on? Most apps have bigger problems.
    • ChrisLTD 58 minutes ago
      These aren’t bugs in the traditional sense. They built the animation system to work like this, and replaced the old system that didn’t produce these psychedelic transition states.
      • skybrian 38 minutes ago
        Is there more about what they did somewhere else? I don’t see any implementation details in the article.
  • jadar 1 hour ago
    I think a lot of these are because Apple has built animations into their products as first-class citizens, but that means that they need to somehow figure out how to compose them well. (Which obviously is a rather difficult problem to solve!) In my experience, you end up spending a lot more time trying to get all of the animations to work well together than you do on creating the actual UI, and that time is just not worth it if your start and end states are beautiful and intuitive. There's also the cross-UI-framework tax that has come up since Apple has allowed mixing SwiftUI and (App|UI)Kit, and animations are part of that.
  • arjie 34 minutes ago
    Negative examples are cool. Time consuming to put together. I did appreciate that. What are some positive examples?
  • sam1r 1 hour ago
    I feel like OP brought up a good problem to solve, with no solution. I dream of the days where posts like these end with "5 ways to better execute on this today".

    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".

  • singiamtel 28 minutes ago
    This blog makes me appreciate my browser's reading mode
  • vlovich123 1 hour ago
    It would have been compelling to describe / show what it should have looked like. Because the only alternative for some of these would just be sharp jumps instead of any animation - animating simultaneous appearance and transition of information will inherently result in frames that look imperfect.
  • boredatoms 1 hour ago
    This explains why I feel compelled to turn off any animation whenever there is a toggle to do so
  • renox 1 hour ago
    Bah, each time someone say this they "forgot" that one side effect of 'every frame is perfect' is that it can increase latency.. Perfection or latency? That should be the user's choice not the developer's..
  • vthommeret 27 minutes ago
    [dead]
  • throwaw12 1 hour ago
    I would love to understand these people, really!

    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?

    • piskov 52 minutes ago
      Broken windows theory

      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.”

      • throwaw12 42 minutes ago
        > Broken windows theory

        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.

    • bontaq 31 minutes ago
      Starting from a literal bandwidth costs perspective definitely won't get you there. I'd start by trying to feel personally annoyed by things like that. Then maybe try to feel more annoyed, since you know it'll touch every customer forever.

      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.