Live data from Hacker News

The Overcomplexity of the Shadcn Radio Button

paulmakeswebsites.com

61–70 of 351 posts

Re: The Overcomplexity of the Shadcn Radio Button

#61
post #28
post #10

I normally share the sentiments of the article. But I am also curious, if the goal was: - Implement the radio as the designer sent in the figma file (e.g. something like the radix demo one they're commenting on: https://www.radix-ui.com/primitives/docs/components/radio-gr... ) - Make sure it looks the exact same across all browsers How doable is it with vanilla css? The example they gave was rendered to a black/white…

> - Make sure it looks the exact same across all browsers > How doable is it with vanilla css? It's not doable with your fancy frontend framework and your 20 imports and your ten thousand lines of typescript. "Make sure it looks the exact same across all browsers" is, and always has been, fundamentally at odds with how the web is intended to work. How well does this shadcn crap render in arachne? ladybird? netsurf? l…

Exactly the same when rendered by the evergreen mainstream browsers. That's perfectly doable.

Re: The Overcomplexity of the Shadcn Radio Button

#62
post #17

Earlier quoted context omitted.

Is it sarcastic or does it appear only on high frame rate devices? To me it simply feels like another radio button.

> Is it sarcastic or does it appear only on high frame rate devices? To me it simply feels like another radio button. You're absolutely right! Today I'm using a friends gaming computer. It's a 244hz monitor powered by a RTX 5070 TI and a screamingly fast AMD Ryzen 7 9800X3D CPU with 128GB of overclocked 6000MT/s RAM. Not only does the radio look mundane for such overcomplicated component, but it also misses clicks wh…

It also doesn't catch clicks between the label and the radio button.

Re: The Overcomplexity of the Shadcn Radio Button

#64
post #8

Did they ask the original authors of Radix why it's the way it is?

In 2020, radio buttons weren't easily stylable in all mainstream evergreen browsers. That's usually the case why some components are over engineered. Of course they should have simplified them when all browsers fell in line, but tech debt is hard.

Re: The Overcomplexity of the Shadcn Radio Button

#65

It has to be this way because we (the collective we) refuse to agree on adding proper UI primitives to the web. We’re like 20+ years into web apps being a big thing and there’s still nothing like what’s offered in OS-native frameworks like Swift. So anybody building a web app has to recreate SwiftUI in the browser every time via various bloated hacks (basically what Shadcn is). If we could just agree on adding non-te…

Radio buttons are in html spec for over 30 years and they allow extensive CSS styling on every part of the element.

Re: The Overcomplexity of the Shadcn Radio Button

#67
post #52

I don't touch frontend very often anymore, but you could see the writing on the wall for complexity when React took over and newer devs were working exclusively in that abstraction. Unlike other abstractions where things get tidied up and more simple, React is much more complex than the technology it's building on. Necessarily, to enable it's features, but none the less it is a consequence of this that when all someo…

It was fine when it started, it's the addition of useEffect and hooks that messed everything up. Although normaly I prefer functional, for react classes were 100 times better

Re: The Overcomplexity of the Shadcn Radio Button

#70
post #52

I don't touch frontend very often anymore, but you could see the writing on the wall for complexity when React took over and newer devs were working exclusively in that abstraction. Unlike other abstractions where things get tidied up and more simple, React is much more complex than the technology it's building on. Necessarily, to enable it's features, but none the less it is a consequence of this that when all someo…

Managing state and syncing it to the DOM manually is much harder than React (or any other big framework) for any non-trivial web app. Reactive, inherently asynchronous, event driven applications get complex easily.
Post reply on HN