thoth-org / Thoth.Elmish.FormBuilder

https://thoth-org.github.io/Thoth.Elmish.FormBuilder/
MIT License
10 stars 5 forks source link

Allow customizing of container element #29

Closed schauerte closed 3 years ago

schauerte commented 3 years ago

I'm looking for ways to support custom layouts (like Flexgird or even more complex views) - something that cannot be achieved with custom fields only. At least, I was unable to do so because of missing control over the fields container element.

So I've added a possibility to replace the form view with a custom component (without adding breaking changes).

Is this a possible solution or should I try other routes? Do you accept merge requests for this at all? Please let me know, when anything needs adjustment to be merged.

This might close #11.

MangelMaxime commented 3 years ago

Hello @schauerte,

I am not sure to understand the addition of this PR.

From, what I see in the changes you are allowing the user to not use the div element to put around the form and perhaps be able to use a form element?

Is it what your are trying to achieve with this PR ?

schauerte commented 3 years ago

Thanks for your comment. I've added some documentation to explain the idea.

schauerte commented 3 years ago

The main goal was to assign custom CSS-classes to the container (to allow "easy" use of Flexbos/Cdd-Grid with Tailwind). After some more digging into CSS I've come to a working solution without this change. It is a bit hacky - since I have to repeat some things (like media-query breakpoints) Tailwind already defines in other ways - but the proposed changes were kind of hacky too.

So I'm closing this pull-request. Sorry for bothering and thank you very much for your great work!

MangelMaxime commented 3 years ago

Hello @schauerte,

sorry I kind of always reported accepting this PR on my side too.

I think it is mostly due to the fact that I am working on Fable.Form which is a complete new form library created since the beginning with personalisation and extension in mind.

For example, on released day the project will consist on 3 packages:

And so anyone can implements their own Fable.Form.Simple or Fable.Form.Simple.Feliz.Bulma depending on their needs.

The packages are not yet released because I am working on cleaning up the examples and writing the documentation for it.

If you have a twitter account and want to be notified when the library will be released you can follow me on twitter.

I am already starting teasing in the open as I my goal is to hit a release this week: https://twitter.com/MangelMaxime/status/1389152779353174018

Edit: Thank you for the kind words ❤ and again sorry.