Robata: put it on the grill
This is a macOS app written in Swift and HTML/JS/CSS (Mobx/React/Tailwind).
I created it because the default "Mission Control" window manager for macOS has some issues:
- A. It is not possible to quickly jump from one space to another when there are other spaces between them.
- The "three-finger side swipe" trackpad gesture only works well when swiping to a neighboring space, and when you know what you will find on the space.
- Otherwise, you end up paying the cost of each animation as you swipe between each space searching for the window you are looking for.
- The "three-finger side swipe" trackpad gesture only works well when swiping to a neighboring space, and when you know what you will find on the space.
- B. "Expose" does not work well when you have more than 3 windows on a space.
- This is the "three-finger swipe up" trackpad gesture.
- The animation seems to "explode" the windows to show them all, but this is quite distracting and unpredictable. The more windows you have, the smaller each one will be in this view. The animation also takes a few seconds to complete.
- The fact that windows are semi-randomly placed and small makes it difficult to visually scan them.
- C. The top "space viewer" is so small you can barely tell which windows are on those spaces.
- It also requires that you jump through two animations to get there "three-finger swipe up", and then mouse over the spaces row at the top of a monitor.
- D. Stage Manager does not seem to work well with spaces, adding another layer of groupings and UI when a better interface to the existing spaces could work well.
- E. The default cmd-tab of macOS switches between apps and not windows. It also orders by most recent, but often the window I want to switch to is around 4-6th place depending on the tasks I am currently working on.
- A. It is not possible to quickly jump from one space to another when there are other spaces between them.
The default macOS animations for spaces are nice, but when they take a few seconds and are unpredictable, I think they have a negative effect on the user experience. A good principle for animations seems to be that if they are predictable, they are good, but if the user has no idea what the animation will reveal, it makes for a worse experience as the user has to wait for the animation, then spend a lot of visual processing time working out what information the animation is presenting. You cannot disable the animations for spaces on macOS.
Robata has minimal animations and shows windows instantly to avoid the double-edged sword of animations. Humans have very fast visual pattern matching, which is why I want to show the actual windows, as the patterns of the window UIs for different apps should be instantly recognizable.
I also do not like the icon-centric design of the default macOS cmd-tab. I feel scanning for the right icon is a waste of time, as you then have to scan for the right window contents to select the window you are looking for. It is better just to remove the icons and keep the window screenshot and title, as these are more specific to the task you are actually working on in those windows. An example is Chrome—you might have 10 tabs open, so the icon does not give you any clue as to which tab you want.
The app uses private macOS APIs to get data and events on spaces and raw trackpad events. These are undocumented, so they require a lot of experimenting with. I feel Apple should support and create documentation for these APIs so users can develop UIs to use their own computers how they like.
You can activate the Robata UI by resting a finger on the corner of the trackpad. My thumb naturally rests on the bottom left corner of my external trackpad, so it's very natural to rest it there to open Robata. Also, the tactile feel of the corner of the trackpad makes it easy to find without thinking. An issue with the MBP built-in trackpad is that it is flush with the body of the laptop, so it takes more effort to find the corner. So, I added the ability to use
cmd-{x}
—where x is any char the user picks. This lets you open Robata with just your right hand on one half of the keyboard, or just your left hand on your trackpad. The key shortcut is also for mouse users.The Robata app is around 1.8MB and has no dependencies (other than the macOS system libraries). It uses web views, which turned out to be very performant. As soon as the web views are no longer visible, they go into a sleep mode, reducing their RAM and CPU usage. Robata is not visible for most of the time, so this works well.
Some Swift developers have noted that text rendering using SwiftUI actually takes a lot of CPU when the text changes every second. I feel the optimizations built into web browsers make for a more performant UI in some cases. Also, the instant reload and Chrome dev tools make it much easier to develop with. You can change your text and see the re-render instantly, like painting a canvas. With SwiftUI, it is a minimum of a few seconds to recompile and navigate to the app state you are working on. Also, SwiftUI layout seems to be harder to debug than HTML/CSS, as the Chrome dev tools will show you why your elements are positioned where they are with flex/grid ruler overlays. SwiftUI has no debug tooling.