top | item 44395152

(no title)

merksoftworks | 8 months ago

So egui is great for projects where the application runtime is short lived, or for overlays in longer lived projects. The visual equivalent of scripts, where you know you need a small amount of immediate visual feedback and tweaking parameters for it to be useful to the end user.

Flutter answers questions about more robust UI.

It's good that you chose the right tool for the job and more people should know that there are options. But fundamentally I'm most motivated by the possibility of a robust UI framework made from first principles to be as low friction as egui but with the accessibility, performance, and visual flexibility of stylable retained mode guis.

Raph Levien and the xilem project might be getting us closer.

discuss

order

piker|8 months ago

Both approaches have their downsides and, in my view, retained mode and immediate mode tend to converge as the UI complexity increases. So far, no problems with implementing any UI I want in my experience with egui on a somewhat complicated application (Desktop word processor). Immediate mode is a breath of fresh air from React.

[Edit: although the standard accessibility criticisms apply to my application; although that's more of an issue with my implementation than an indictment of immediate mode generally.]

ethin|8 months ago

Accessibility problems are something both retained-mode and immediate-mode UIs have generally. I've found that you can kind-of hack it together but the best route is to incorporate the actual accessibility frameworks of the operating system(s) your targeting. Egui was doing this at one point I think but I'm pretty sure it's either broken now or just doesn't work all that well.

mhast|8 months ago

From what I've seen immediate mode seems suitable for less fancy UI requirements. If you want to start having a framework solve things like animations and such then you'll probably end up with some form of retained mode.

Over my years making UIs I've found most of the bugs you get is due to incorrect state handling in applications. Having a framework you use which is opinionated and helps you solve that is pretty nice. (If your UI requirements are such that you need it.)

the__alchemist|8 months ago

I'm curious too. I currently have both a plasmid editor, and protein/molecule viewer using EGUI. Both have complex UIs, and I haven't hit roadblocks. I think the protein viewer might be more of a canonical immediate-mode case, because most of the window is a 3D render, but it still has a GUI above it.

nopelynopington|8 months ago

I'm also thinking of building a word processor so I'd be interested to see what you're working on if you fancy sharing?

Aeolun|8 months ago

If your UI is fast enough, why not in complex UI’s either? I’d say it gives you good motivation to keep your UI handling code as fast as possible.

mort96|8 months ago

Doesn't egui always re-render? I like my idle apps to be doing nothing, I don't want them running their render loop in the background

j45|8 months ago

Appreciate the thoughts about both Flutter and egui.

It's not perfect, but I don't know if there's much on the market that addresses robust UI and single code base as well as Flutter.

Very open to other things that are not more complex than Flutter to accomplish the single codebase to multi platform solution it does provide.

dotancohen|8 months ago

  > egui is great for projects where the application runtime is short lived
What is good for a long-lived application, such as an email client? I'm looking for something that fits the same place that Qt fits in the Python world.

Accessibility and keyboard shortcuts are of extreme importance.

merksoftworks|8 months ago

Some of the QT people have forked off and started working on slint[1], iced[2] is the most mature gui in the rust ecosystem right now (in my opinion), but still lacking in some ways, including portability to mobile and component libraries are sort of against the design principle so it's allergic to network effects. Iced is built on some pretty orthodox elm architecture principles by some very talented and devs - but they leave very little room for impurity.

[2] https://iced.rs/ [1] https://slint.dev/demos