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

Update a porting in the Porting Embed #2

Merged
merged 11 commits into from
Feb 26, 2024

Conversation

timomeh
Copy link
Member

@timomeh timomeh commented Feb 20, 2024

  • Renders a form to update the porting (currently still a single form, splitting the form in multiple steps is in an upcoming PR).
  • Uses @modular-forms/preact for form state handling and validation. It has a much smaller footprint compared to react-hook-form + zod, and RHF doesn't work well with preact.
  • Updates the porting after submit.
  • Allows to use your own submit button, with a simple <button form="gigsPortingEmbedForm" /> anywhere on the page.
  • Adds an event validationChange which returns true or false when the validation of the form changed.
  • Adds an event submitStatus which sends the status when the porting is submitted:
    • { status: 'loading' }
    • { status: 'success', porting }
    • { status: 'error', error }

@timomeh timomeh marked this pull request as ready for review February 26, 2024 15:54
@timomeh timomeh merged commit a4c02e5 into main Feb 26, 2024
3 checks passed
@timomeh timomeh deleted the timo/conn-679-update-a-porting-inside-the-embed branch February 26, 2024 16:37
@gigs gigs deleted a comment from linear bot Mar 6, 2024
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.

1 participant