Live data from Hacker News

Portal Windows for Electron

blog.tandem.chat

11–20 of 52 posts

Re: Portal Windows for Electron

#11

Why not just write a native application?

The go-to excuses for this are "easier," "cheaper," and "good enough for the users."

Also known as "laziness," "greed," and "lack of pride in one's work."

I'm OK with some rando startup using something like Electron in their formative years. But companies like Microsoft have no excuse other than some middle manager's desire to buy a new boat.

Re: Portal Windows for Electron

#13
post #3

The current version being shown off here is extremely stuttery, is there a way to smooth the animation yet?

This is a constraint of the APIs provided by MacOS, they allow you to position by (x,y) coordinate and resize by width/height, but there's no way to tween these values...and nor should there be.

What's Tandem are doing here is (interesting, but) atypical behaviour.

Re: Portal Windows for Electron

#14
post #8

Why not just write a native application?

Because it's cheaper, quicker and the vast majority of users are fine with it. I'm not excusing it, I curse Slack every day I have to use their Electron app (though mostly just use it in a browser tab now) but we have this exact same conversation every time anything about Electron is posted on HN. None of the parameters for making the choice have changed since the last time we did.

> I curse Slack every day I have to use their Electron app

I did that too for the last couple of years, but recently switched to this client: https://cancel.fm/ripcord/ Found the link in comments here on HN.

Works well so far. There’re couple minor UX issues, e.g. hard to react to messages with these modern hieroglyphs, also images are loaded in web browser, but I can live with them. The upsides (ability to setup font faces and sizes, resource usage, GUI latency) are far more important for me.

Re: Portal Windows for Electron

#15
post #13
post #3

The current version being shown off here is extremely stuttery, is there a way to smooth the animation yet?

This is a constraint of the APIs provided by MacOS, they allow you to position by (x,y) coordinate and resize by width/height, but there's no way to tween these values...and nor should there be. What's Tandem are doing here is (interesting, but) atypical behaviour.

On Windows, you can update these as often as you want to and the compositor will handle it fine - you can do a lot of cool animations/demos with it.

Is this a macOS specific issue, or is the JS API these guys are providing not able to catch up quickly enough?

Re: Portal Windows for Electron

#16

Why not just write a native application?

No, really why not write a native application? If I'm understanding it correctly, Electron is depending on third-party libraries like Portal Windows to get functionality like "create new windows, treat them as objects, and poke around in them" which comes for free in single-process GUI libraries like Qt.

Re: Portal Windows for Electron

#17
post #3

The current version being shown off here is extremely stuttery, is there a way to smooth the animation yet?

Hey! Author here: this demo is just the most extreme example I could quickly write to show the power of this library.

Realistically, you won’t need to chain window movement like this in most cases (other than our chatbox, I think none of our windows stay open when their parent window is moved). Fast auto-resizing, on the other hand, is more common, and works great.

Re: Portal Windows for Electron

#18
post #15
post #13

Earlier quoted context omitted.

This is a constraint of the APIs provided by MacOS, they allow you to position by (x,y) coordinate and resize by width/height, but there's no way to tween these values...and nor should there be. What's Tandem are doing here is (interesting, but) atypical behaviour.

On Windows, you can update these as often as you want to and the compositor will handle it fine - you can do a lot of cool animations/demos with it. Is this a macOS specific issue, or is the JS API these guys are providing not able to catch up quickly enough?

Mostly a lack of need-it’s a contrived example I wrote to show a large window count, with child windows spawning nested child windows of their own.

In the actual Tandem app, windows moving like this is uncommon.

Re: Portal Windows for Electron

#19

Why not just write a native application?

The go-to excuses for this are "easier," "cheaper," and "good enough for the users." Also known as "laziness," "greed," and "lack of pride in one's work." I'm OK with some rando startup using something like Electron in their formative years. But companies like Microsoft have no excuse other than some middle manager's desire to buy a new boat.

Microsoft understands the value of being able to develop once and run everywhere. That's why both Java and the web almost upended their business.

It's not just a monetary/time/effort value to Microsoft or other developers either. It has value to me a user. I prefer applications that I can take with me anywhere I go and they'll be exactly the same on every type of desktop that I use them on.

The list of native desktop applications which can actually do this well for me is pretty short.

Re: Portal Windows for Electron

#20
post #9
post #4

Earlier quoted context omitted.

Here's a few very valid reasons imo - Easy cross platform support - Singular language/framework (typescript/react) for everything you're doing - Can share a lot of components/logic with mobile apps if you use React Native

The nice thing about this question for old-timers is that we can recycle the answers we already heard about using Java for cross-platform desktop development from 20+ years ago. Or the rationale for using a cross-platform toolkit with C++ from 30+ years ago. You get substandard desktop applications that tend to frustrate people who are deeply immersed in any one ecosystem and expect native applications to have deep i…

I think Discord strikes the balance of your two mistakes well.
Post reply on HN