[Radio Button] Proposal (Editor's draft)
Related to: https://github.com/openui/open-ui/issues/251
This PR is still a draft for the radio button proposal. I managed to create two components, one for the radio button and other for the radio button group, and the two would be all it takes to create both a rigid and a flexible layout.
The idea expounded on the proposal, but the gist is that we can either create a group with options inside of it, or a group with options outside of it, that are then bound to the group by a new attribute.
By leveraging slot defaults/fallbacks and proper CSS, we can make basically any layout use case.
===
I would like to validate the basic proposal with the community before developing it too much (you can see I didn't provide much information yet on accessibility, behavior, etc). If this is a valid proposal, I'll carry on.
===
Also, I'm unsure whether I used the "slot logic" correctly... In the group structure, you can see that I put a div inside the choices slot, but maybe the slot should be a direct parent of the radio buttons... If the developer so chooses, then they could fill the slot with a div and then the options. I'm not sure and I'd like your opinion as well.
Hi @una, @gregwhitworth and @levithomason, I am afraid this PR can become a little stale, but I wouldn't like to go very far before validating the main ideas addresses on it. What could we do to proceed? Thanks.
Thanks for filing this @leolopes - I've added @chrisdholt to do a review on this. Also, I may have missed it but did we discuss this anatomy and get resolution on it?
Thanks for filing this @leolopes - I've added @chrisdholt to do a review on this. Also, I may have missed it but did we discuss this anatomy and get resolution on it?
@leolopes this is great! @gregwhitworth I don't think we discussed and resolved. There are a couple super interesting things I think we should discuss though and get resolution on so we can move this forward!
Also, I may have missed it but did we discuss this anatomy and get resolution on it?
Hi @gregwhitworth, how are you? We discussed during a meeting the possibility of having the component either be bound together by tag nesting or by attributes. Thus I proposed both ways in this draft, so the actual proposal can be discussed further.
I'll be answering @chrisdholt on each of his points.
Hello reviewers! Can we proceed with this PR or maybe it is too stale to be merged at this point?
@leolopes friendly ping on this, do you intend on taking this further?
@leolopes friendly ping on this, do you intend on taking this further?
Hi @gregwhitworth , I do, I just have been overwhelmed by work and I thought the proposal didn't get much traction so I didn't prioritize this. But I'll try to reserve some time this week and fix conflicts and make some of the requested changes.
@gregwhitworth , I was trying to resolve the conflicts and now I noticed that the website was rewriten wit Astro in place of Gatsby. I'll have to learn it and make a lot of adjustments so my content will be able to run on the new structure.
There seems to be an error on a file that was not modified by me. I'm not sure how it can be, because I pulled directly from master.
I can try to fix the file and push again later.
@andrico1234 can you take a look at this given the error that @leolopes is seeing?
@gregwhitworth and @andrico1234 I found out what was happening: Husky was messing up with a commented section on the popover.research.explainer.mdx file. I had to bypass the linting proccess on my last commit so I wouldn't run into a syntax error again.
I think either the linter should be reconfigured or the commented section should be removed.
Anyway, the PR is ready for review.
...while the above may seem daunting it's more a shuffle of the content... @gregwhitworth
That's a bit of work but I can manage it 😉 . Just not sure when I'll get back to it, but not as long as it took before. Thanks!