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

chore: internalize FormBuilder #2420

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

yohanboniface
Copy link
Member

@yohanboniface yohanboniface commented Jan 6, 2025

fix #2280

That's a first step, which:

  • internalize Formbuilder as a bunch of modules
  • use Javascript classes instead of Leaflet ones
  • remove dependencies to Leaflet (L.DomUtil…)
  • replaces L.FormBuilder by Form (in theory generic, but not quite) and U.FormBuilder by MutatingForm (knows about isDirty, inheritable and such)

There is much more room for refactor, but let's do it step by step!

@yohanboniface yohanboniface changed the title Formbuilder to module chore: internalize FormBuilder Jan 7, 2025
@yohanboniface yohanboniface force-pushed the formbuilder-to-module branch from 59533bc to 550ddad Compare January 7, 2025 17:07
@yohanboniface yohanboniface force-pushed the formbuilder-to-module branch from 550ddad to 176b8bd Compare January 7, 2025 17:08
@yohanboniface yohanboniface marked this pull request as ready for review January 7, 2025 17:15
Copy link
Contributor

@davidbgk davidbgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is huge! And it paves the way to improve forms' accessibility 👍

I wonder if we could replace the callback mechanism, let's discuss that in particular before merging.

@yohanboniface
Copy link
Member Author

I wonder if we could replace the callback mechanism, let's discuss that in particular before merging.

For sure! What kind API do you have in mind ?

@davidbgk
Copy link
Contributor

davidbgk commented Jan 8, 2025

For sure! What kind API do you have in mind ?

Not sure how we can deal with a Promise or dedicated events here (and maybe that's a bad idea).

Copy link
Contributor

@davidbgk davidbgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All 🟢

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

Successfully merging this pull request may close these issues.

Internalize and modularize FormBuilder
2 participants