Live data from Hacker News

The Overcomplexity of the Shadcn Radio Button

paulmakeswebsites.com

71–80 of 351 posts

Re: The Overcomplexity of the Shadcn Radio Button

#71
post #13
post #8

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

Exactly this. OP fails to understand that there are reasons why it was done this way, and that someone who spent thousand of hours working on this might know something that they don't.

"There are reasons" is a pretty bland defense of why something was done in a bad way. You'd have to show that the reasons are valid, which I highly doubt. Also, somebody spending thousands of hours on making a worse version of something existing, isn't a good justification either. That's on the level of counting lines of code as a measure of productivity.

Re: The Overcomplexity of the Shadcn Radio Button

#72

> Why would you want to do this? Have you tried completely customising a radio button with CSS? Feel free to demonstrate a heavily customised radio button style where you don’t hide the native appearance.

There's literally an example of that in the post.

> where you don’t hide the native appearance

What do you mean by this? Seems like an arbitrary requirement to set. Could you show an actual example of how this overengineered style is easier to customize?

Re: The Overcomplexity of the Shadcn Radio Button

#75
post #60

I am pretty new to frontend development (but have 20 years of backend) I assumed I would need to use one of these libraries at some point. But, perhaps since I am using Svelte instead of React, whenever I ask AI to do something, then since I don't already use a component lib it just spits out the HTML/CSS/TS to do the job from scratch (or, depending on how you look at it, output the mean component from its training d…

I've been dabbling in backend and frontend stuff for about 25 years now, but for the past 15 years or so I haven't really had to do any webby stuff for work (and that's kind of how I like it).

Recently I've needed to put together a few things as "proof of concept" for things like internal directories and catalogues, and it's one of those "How Hard Can It Possibly Be" situations where we've had folk prevaricating for months with outline drawings and sketches and mockups.

So I knocked together a backend for it in Django, which worked okay, and then styled up the raw template with MinCSS[1], and then to do stuff like "find-as-you-type" and other "magical dynamic page" things I used HTMX[2] which has been discussed here endlessly.

No need for AI sloppiness. Just write some code, look at some examples, stick in some styles, and away you go.

[1] https://mincss.com/examples.html

[2] https://htmx.org/

Re: The Overcomplexity of the Shadcn Radio Button

#77

> Why would you want to do this? Have you tried completely customising a radio button with CSS? Feel free to demonstrate a heavily customised radio button style where you don’t hide the native appearance.

There's literally an example of that in the post. > where you don’t hide the native appearance What do you mean by this? Seems like an arbitrary requirement to set. Could you show an actual example of how this overengineered style is easier to customize?

The pseudo element solution alone is extremely limiting in its ability to be customised. For more complex customisation you will need to decorate with additional elements within a ref’ed label - and then you are effectively back to what radix does.

Re: The Overcomplexity of the Shadcn Radio Button

#80

Earlier quoted context omitted.

Based on profits of many webapps, there is no line. What eng here forget is that they are oft not the targeted consumer. The hypothetically perfect website doesnt sell as well as a colorful fat choncker does. It is like fast food, not every cares about farm to table.

Except the correct way can be just as colorful, and it takes more effort to implement the bad way.

The bad ways effort was already paid by someone else, though.
Post reply on HN