Live data from Hacker News

Inspecting Web Views in macOS

blog.jim-nielsen.com

51–60 of 147 posts

Re: Inspecting Web Views in macOS

#53
post #2

Awesome! Do you know more Web Views in use?

Don't quote me on this, but I believe that Apple Music (nee iTunes) has used web views for a long time; probably over a decade. The entire thing probably isn't a web view, but my recollection is that the store components were.

Apple Music is now using a technology they developed to convert web views back to native - https://news.ycombinator.com/item?id=30648424

On macOS 12.2 Music consumes much less RAM, and no longer has a webview process.

Re: Inspecting Web Views in macOS

#54

Earlier quoted context omitted.

Don't quote me on this, but I believe that Apple Music (nee iTunes) has used web views for a long time; probably over a decade. The entire thing probably isn't a web view, but my recollection is that the store components were.

Apple Music is now using a technology they developed to convert web views back to native - https://news.ycombinator.com/item?id=30648424 On macOS 12.2 Music consumes much less RAM, and no longer has a webview process.

Wrong link?

Re: Inspecting Web Views in macOS

#55

I wasn't surprised to see the Family Sharing pane in the first screenshot. It's easily the most janky part of System Preferences that I've had to struggle with: - Loading indicators for several seconds when switching between categories in the left sidebar, on a very decent internet connection. - Janky animations and transitions when opening modals, like clicking the "Details..." button on a family member. - Within th…

Sounds like they need useMemo(), useCallback() and an abort pattern, lol.

Re: Inspecting Web Views in macOS

#56

GUI development is really fucking broken. I get it, it's hard to compete with a standardized platform with a probably billion man hours poured into it but I'm really hoping that Rust will make it possible to write native and web experiences from one codebase.

This post is talking mostly about CSS and it shows a document object model tree. JavaScript is also used, given that he mentions React. Among these options, it seems that Rust is most similar to JavaScript. But this whole article would be the same if React was written with Rust instead. So what is the broken part of GUI development, and why is Rust positioned to fix it? As I see it, not much would change if we used R…

The broken part is that it is worth it to use an inefficient rendering method (lots of JS generated by React + an interpreter and GC + a render tree (React VDOM) + an overcomplicated element tree (DOM) + a rendering system) instead of an efficient rendering system (if React-in-Rust existed, it would be native executables manipulating an in memory tree for a renderer, removing at least two layers of complications). And this seems to be simply because the React+JS model works so well for DX compared to the rest that it allows for way faster feature implementation.

Re: Inspecting Web Views in macOS

#57

That explains how looking at your iCloud preferences are near the most unreliable and slow part of settings. Even more so the Apple engineers never consider someone could live outside the US.

I've always wondered why these panes in particular felt like total garbage in comparison to the rest of System Preferences. Now I know!

Confirmation bias!

Re: Inspecting Web Views in macOS

#58
post #41
post #35

Earlier quoted context omitted.

You'd probably be wrong! Let me introduce you to https://github.com/ocornut/imgui

Which doesn't use React, CSS, or a DOM...? What's your point? ImGUI is imperative UI programming. DOMs are declarative.

ImGui makes UI programming declarative in structure the exact same way React makes UI programming declarative.

React brings to the table is the general concept of immediate mode UI programming. So does ImGUI. Reaching for React doesn't mean it's the only thing the programmers knew, it means it's a general pattern that arises in UI programming.

Re: Inspecting Web Views in macOS

#59

GUI development is really fucking broken. I get it, it's hard to compete with a standardized platform with a probably billion man hours poured into it but I'm really hoping that Rust will make it possible to write native and web experiences from one codebase.

> I get it, it's hard to compete with a standardized platform with a probably billion man hours poured into it Are you talking about the MacOS System Preferences app, which has probably been around since Macs switched to Intel, or about React? Either could fit that description.

I'm talking about WebKit.

Re: Inspecting Web Views in macOS

#60

The headline isn't technically wrong but it's a tiny bit misleading because the use of web views is limited to a small number of iCloud account screens. These aren't really "system" preferences so much as Apple cloud service settings which have been wedged into System Preferences. (And where it is used, it's doing the barest minimum. The preference window itself, the top bar, and the iCloud sidebar are all still nati…

We've reverted the title now. Submitted title was "macOS System Preferences Uses React".

"Please use the original title, unless it is misleading or linkbait; don't editorialize."

https://news.ycombinator.com/newsguidelines.html

Post reply on HN