News for hackers. Stuff that matters.
Re:Sanding UI by rollcat on Sunday September 22, 2024 @10:08AM (#41617180)
I really wish we had something resembling a "native" UI toolkit, but for the web. Just throw together a couple <button>s or <input type=checkbox>es with absolutely zero additional JS/CSS, but have it actually look & work moderately decent, the way SwiftUI does.

CSS is too powerful, OOB HTML is too basic/ugly.

Re:Sanding UI by ansgri on Sunday September 22, 2024 @03:25PM (#41619305)
Bootstrap started as something like this, but it both evolved too quickly IMO, and for some reason a generic look on the web is considered bad (by who? marketing? designers? even users as they think lack of distinctive style means lack of developer skills?)
Re:Sanding UI by cezart on Sunday September 22, 2024 @05:58PM (#41620437)
I still just throw in default bootstrap in a .container div when I need a fast prototype that looks decent.
Re:Sanding UI by rollcat on Monday September 23, 2024 @03:11AM (#41623196)
> Bootstrap started as something like this [...]

Exactly, and meanwhile relied on jQuery until the most recent major release (3 years ago).

Once you're starting with one framework (no matter how "lightweight"), you can't gradually introduce a different one that better fits your problem domain, you usually have to rip it out & redo at least some parts.

> [...] for some reason a generic look on the web is considered bad [...]

Yeah it is bad. I won't go into specifics but it's horribly bad, and the sheer amount of CSS frameworks out there is evidence enough.

But the main problem isn't even that it looks (&works) ugly, it is also lacking/incomplete as a basic UI toolkit. How long did we wait to have a standardised date picker? Color picker? Where's the progress bar? Context menu? Tab bar? Icons with labels, representing files/objects? Half the other stuff we've had figured out in the 1980s and considered absolutely necessary by 90s?

Fire up Borland Delphi Builder from the 90s and marvel at how easy it was to stitch together a simple UI that looks decent next to every other app that ran on your computer. JS is ~30 years old, and we've been building web apps even before that, there was plenty of time to match it - but we've spent it on churning through frameworks instead.

Re:Sanding UI by ansgri on Monday September 23, 2024 @09:04AM (#41625628)
I myself started programming with Delphi from 90s, but your arguments sound like only a perfect toolkit would be useful. I'd be perfectly happy to have 80% of Delphi 7 VCL in web-native format with a clear defined way to add custom components that fit in. Like color picker, which more often than not needs customization. And not like it was themable back then. WinXP-level theming should be enough.
Re:Sanding UI by troad on Monday September 23, 2024 @02:52AM (#41623062)
We do have a native toolkit for the web. You put a <button> down, the browser will render a button.

But then some people don't like the button: it's not animated enough for them, the corners aren't rounded enough, the button is too skeumorphic, or not skeumorphic enough, there is too much / not enough white space, etc etc. Everyone has a different idea of what the new button should look like, and we're immediately back to fragmentation.

There are financial incentives to seeming trendy and new, and that requires constant change. The standard <button> may be sturdy and steady and not require three hundred npm packages, but it will never, by definition, look trendy or new.

Re:Sanding UI by pglevy on Monday September 23, 2024 @12:45PM (#41627990)
I like minimal, semantic frameworks like Pico CSS for this. You just give it HTML and it looks really nice. Tools like Bootstrap are great when you need more control but they also encourage more fiddling.