Live data from Hacker News

Portal Windows for Electron

blog.tandem.chat

21–30 of 52 posts

Re: Portal Windows for Electron

#21
post #20
post #9

Earlier quoted context omitted.

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.

As in, their app is really bad all around?

Totally agree.

Re: Portal Windows for Electron

#22

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.

> other than some middle manager's desire to buy a new boat.

Good enough for me to consider tech. Means you can have acceptable result without spending more money.

Re: Portal Windows for Electron

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

[deleted]

Re: Portal Windows for Electron

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

I'm not the OP but even the demos with the actual software are kinda stuttery. Like the one where you move the outlined spotify window, it's just not great. It's cool that you were able to make it simple to do, and not worry about it, and it's really impressive work, but I guess still feels off a little.

Re: Portal Windows for Electron

#26
post #24

Earlier quoted context omitted.

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.

I'm not the OP but even the demos with the actual software are kinda stuttery. Like the one where you move the outlined spotify window, it's just not great. It's cool that you were able to make it simple to do, and not worry about it, and it's really impressive work, but I guess still feels off a little.

Ah, I know the one you’re referring to—-that purple window actually isn’t using this library.

We can get the position of our _own_ windows easily, but when it comes to getting Spotify’s position, we need to do some more complex polling, which is slower (and only works when the 3rd-party window is in focus).

Re: Portal Windows for Electron

#28
post #21
post #20

Earlier quoted context omitted.

I think Discord strikes the balance of your two mistakes well.

As in, their app is really bad all around? Totally agree.

Ha, I meant it in the opposite way, that it avoids making either mistake. Yes, it consumes a lot of resources, but it's success has proven that users don't mind this as much as commenters on hacker news seem to.

And it's a program that is slick, intuitive, and supports so, so many use cases without ever feeling overloading.

Re: Portal Windows for Electron

#29
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

- you want to make sure that people respect the importance of your app by not running it along with everything else because it needs 10x the amount of resources a native app would

Users don't care anymore. Phones have 12GB of RAM. A $500 laptop will have plenty of RAM, CPU power, and storage for the average user to not even notice anything. HN and reddit are the only ones who can't seem to grasp the idea that it's not 1995 anymore, and apps taking even 1-2 GB of RAM isn't that big of a deal for the average user.

Do I want my CAD software as an electron app. Obviously not, but for most applications electron is just as good an option as anything else.

Re: Portal Windows for Electron

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

It's curious to me, because I've seen compositors in both Linux and Windows handle it perfectly, but I admittedly haven't played with MacOS more than I'm forced to. I'm not very familiar with Quartz, I sorta assumed it would cover x11 functionality by default.
Post reply on HN