Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gen the whole html5 model #112

Open
gedw99 opened this issue Feb 6, 2024 · 15 comments
Open

gen the whole html5 model #112

gedw99 opened this issue Feb 6, 2024 · 15 comments

Comments

@gedw99
Copy link

gedw99 commented Feb 6, 2024

https://github.com/delaneyj/gostar is a htmx style system that has strong typing support for all the of the html5 standard:

Its generated to here: https://github.com/delaneyj/gostar/tree/main/elements

It looks like its not that hard to reuse this as a basis to gen into https://github.com/chasefleming/elem-go/blob/main/elements.go

Then every possible html5 element and attribute is covered and strongly typed.

cc @delaneyj

@chasefleming
Copy link
Owner

chasefleming commented Feb 6, 2024

I agree @gedw99 strong typing on the elements would be nice. I have been thinking about how to do it without burdening the user to know many different types given this library follows a different pattern. It would be a breaking change though so I'm delaying implementing it most likely until a v1 or near that.

@delaneyj
Copy link

delaneyj commented Feb 6, 2024

I build off the HTML/SVG specs... If you have ideas around this @chasefleming I'm happy to collab

@chasefleming
Copy link
Owner

I'll put together my thoughts on what I was thinking for the pattern and post it soon to get feedback from you all.

@gedw99
Copy link
Author

gedw99 commented Apr 24, 2024

No movement in n this yet @chasefleming

I have been playing with fully component libs that’s are already baked to make it easy to build projects.

https://daisyui.com etc

@chasefleming
Copy link
Owner

chasefleming commented May 10, 2024

@gedw99 just to clarify regarding this issue so I can address it properly, are you looking for the elements to have type safety in terms attributes or looking for a component library on top of this library?

@gedw99
Copy link
Author

gedw99 commented May 11, 2024

component lib on top of it would be highly popular I think.

what do you think ?

@chasefleming
Copy link
Owner

Yep, I agree. Funny you should mention that @gedw99 , because I'm actually working on a separate component library with this library as its base. It's not ready yet, but I can make it public early if you want to start using it in its early form. If anyone else is reading this though, I highly encourage as many component libraries as possible to be built on top of this one. The more the merrier.

@gedw99
Copy link
Author

gedw99 commented May 12, 2024

thats wonderful.
Yes I would love to see the community start to build reusable components like your doing. I hope that this gets traction.

Please if you can let me see this repo , even if not finished that would be great. I will see what I can add / help.

Maybe also worth eventually making a TODO of components needed. A bit like what the DaisyUI web site has.

@chasefleming
Copy link
Owner

@gedw99 sounds good. I'll post something as soon I have it ready to use in an alpha state. Will speed up my development now that I know someone needs it :)

@gedw99
Copy link
Author

gedw99 commented May 16, 2024

Will be happy to help ..

there are a ton of golang htmx devs that need something like this. Not just me. I am going to use it to build high quality forum software that will be open .

https://github.com/Depado/pb-templ-htmx-tailwind Is one of many. They use templ as do many but I think there is definitely some that want full control of the html like what go-elem does.

Having full control is always best if you need flexibility

@chasefleming
Copy link
Owner

So, @gedw99, would you prefer an elem-go component library that has simple-to-use components—you just pass in your arguments and receive updates and bug fixes, similar to Chakra UI—or a tool like Shadcn that generates the component files for you and allows complete customization because you have the code, but doesn't provide updates and bug fixes?

@gedw99
Copy link
Author

gedw99 commented May 20, 2024

Shadcn seems like a great one, because it will provide a base to get going quickly for devs.

I think that we should aim to provide bug fixes by using elem-go to build the Shadcn at runtime, so that we avoid fragmentation, and build a strong base and then many devs will use it and also help fix things.

Style Customisations

elem-go styles and attributes should be enough for devs to alter the styles. You even have a style manage. SO then a dev can pass that in.

I am really curious what you think too.

@chasefleming
Copy link
Owner

The component library I'm building is built on top of elem-go, with the overriding of styles and attributes available through the component props, but I guess I don't see a need a CLI or component library have to be separate. Once one is built, the other can write them into files if a developer prefers that approach.

@gedw99
Copy link
Author

gedw99 commented Jun 1, 2024

This sound great . When you have the basics setup I would be very happy to contribute.

Takes ages to fill out a decent library of components . Luckily Shadcn has done all the really hard work

@gedw99
Copy link
Author

gedw99 commented Jun 1, 2024

Feel free to grab me on telegram if you need to also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants