Archive for January 13, 2025

Monday, January 13, 2025

This Remote Has Me Questioning Everything

Matt Birchler:

I recently lost my Apple TV remote (the latest model) and despite apparently being somewhere in the couch according to Find My, my wife and I can not find it. We were using our phones as remotes for a couple days, which was annoying, but got the job done. But then I was doing something random with the TVs standard remote and for whatever reason I had the Apple TV on screen and used my Hisense remote to arrow around. To my surprise, it totally worked.

I’m sure this is a well-known thing, but I just hadn’t thought about my TV remote being able to control the UI of my Apple TV. I assume this is something to do with ARC over HDMI or something, but whatever the reason it works!

Now, I expected for this to feel like a stopgap until we found the actual Apple TV remote, but I actually really like using this compared to the Apple TV’s real remote. It feels better in the hand, the buttons are more satisfying to press, the buttons are less prone to accidental presses, there’s no trackpad I can accidentally brush and select the wrong thing, and the button layout is more logical to me. Seriously, I’ve been using the redesigned Apple TV remote since 2021 and I still have to look at it to remember where the mute and play buttons are because they’re not where I’d expect. 4 years of use and it’s still not muscle memory!

I stand by my original assessment that even the revised Siri Remote is just not very good.

Previously:

Mac Toolbar Guidelines

Mario Guzmán (Mastodon, Bluesky):

The following sections are general guidelines that describe fundamental Toolbar layout and design principles for Mac applications. Following these guidelines will help you create functional and aesthetically pleasing toolbars that are easy for Mac users to understand and use.

This document will reference a hypothetical Email application to illustrate key points in designing a Toolbar. It will heavily reference classes, structs, and properties in NSToolbar and NSTitlebarAccessoryViewController.

Mario Guzmán:

Have you noticed how some Apple apps just highlight w/ a darker translucency rather than a solid color?

You can see this darker translucency row highlight in apps like Finder & Apple Music sidebars.

Well, if you want to achieve this look for YOUR app, this is how you’d do it:

Subclass NSTableRowView and override isEmphasized so that the getter returns false.

Mario Guzmán:

When designing your sidebars and toolbars, don’t make the Sidebar toggle button a moving target. Don’t make your users chase it back and forth to toggle it. Keep it left-aligned, “pinned” to the window control buttons.

See the video of Disk Utility vs Passwords apps from macOS. Passwords app is how you want to do it.

Safari and Calendar also work like Passwords, though Calendar doesn’t use a standard toolbar. And why doesn’t Contacts have such a button?

It’s definitely bad to make the user chase the button back and forth. On the other hand, for most apps, putting it to the left might give it undue prominence. I thought the convention used to be to pin it to the right. That kind of solved both problems but had the disadvantage of making the button maximally far away from the area that it applied to. And in a Big Sur world of toolbar items that don’t fit, the implicit lowest priority from being the rightmost item would need to be boosted in order to avoid the instability of having it appear and disappear as the window resizes.

Previously:

What Happened to APFS Fast Directory Sizing?

John Siracusa:

Has anyone successfully enabled Fast Directory Sizing on a directory on an APFS volume in macOS and then confirmed that it works using dirstat_np?

Jim Luther:

That’s one of those promised features I was referring to that never really was hooked up or implemented right. IIRC, the problems with it are:

  • You have to create the directory and set an attribute on it before putting anything in it. It’s not available on already existing directories.
  • The size returned only includes the files data fork space. Extended attributes (including the resource fork) are not included.
  • The API is synchronous with no progress callbacks.

Those reasons keep the Finder from using it, and the Finder team asked for that APFS feature.

James Atkinson:

Is it a limitation of APFS that this feature couldn’t be created in a way that was useful to the Finder team, or is it just not a priority perhaps? I do find APFS fascinating. Also curious why the delta snapshot sending that was demoed never amounted to anything?

And Radar 32794924 apparently says that, if even you’re OK with those limitations, the DIRSTAT_FAST_ONLY path currently doesn’t work, so the API can only do the DIRSTAT_FORCE_FALLBACK path of recursively calculating all the sizes.

Previously:

Update (2025-01-16): Kory Heard:

Apple strongly hinted that APFS would be open sourced when first announced but that never came.

See also: Hacker News.

Accessibility That Fits

Soroush Khanlou:

Building a design that’s responsive to both its contents and its environment is a one of the primary challenges of robust user interface programming. There are some false gods out there and some legitimate best practices. However, I’ve found a new strategy that really helps, especially for text that has been scaled up for accessibility reasons.

[…]

So it’s not going to work to just shorten the string a little bit to get the text to fit. It is an interesting idea, though, that you can make the date take up less space by configuring it slightly differently. How do you get it to show the narrower string only if it needs to? You could try to key it off the dynamicTypeSize, which you can pull out of the environment:

@Environment(\.dynamicTypeSize) var dynamicTypeSize

But, this would ultimately be vague guesswork, and might break based on other factors, like screen size.

Fortunately, SwiftUI comes with a tool that helps us pick the best fitting option out of a series of compatible views, and it’s called ViewThatFits.

I’ve usually seen ViewThatFits discussed as a way to make a responsive layout that changes shape based on the available space. But it also seems to be an elegant solution for more mundane situations of figuring out how much text can fit—in this case choosing which date format to use.

I was going to say that Apple has used auto-changing date formats for decades, e.g. in Mail’s table view, but upon checking it looks like Apple removed that when it removed the Mail table view in Catalina and didn’t restore it when bringing back the table view a few years later. The column no longer separately aligns the days and times, either.

Finder does still adjust date formats based on the table column width, and it was not uncommon for apps to implement this themselves when I was initially developing EagleFiler, but Apple never added it as a standard framework feature, and it seems less common these days.