-
Notifications
You must be signed in to change notification settings - Fork 0
RFC HTML Forms NPM Package
Carlos Santiago edited this page Sep 28, 2024
·
3 revisions
This RFC proposes the development of a reusable form component using React, Conform, and Zod. The form component will serve as part of Kurocado Studio’s React component library and contribute to the open-source community.
- Develop a form component using Conform for form state management and Zod for schema validation.
- Open-source the component under an MIT license.
- Ensure compatibility with Epic Stack.
- Comprehensive documentation including examples and guides.
- Custom design systems or advanced UI frameworks.
- Complex form workflows such as multi-step forms.
- Frontend: React (with TypeScript for type safety).
- Form Management: Conform for managing form state.
- Validation: Zod for schema-based validation.
- Form Component: Central component for handling form state, submission, and validation.
- Input Fields: Text, checkbox, and radio button components with validation.
- The form component will use props for configuring inputs, validation rules, and form submission handlers.
- As a front-end developer, I want to render a basic form using the form component, so that I can quickly implement forms in my React apps.
Tasks:
- Create the form structure.
- Define input components for text, checkbox, and radio buttons.
Acceptance Criteria:
- The form renders correctly in a basic React app.
- Input fields are interactive.
- As a developer, I want the form state to be managed using Conform, so that I don't have to manually handle form data.
Tasks:
- Install and configure Conform.
- Integrate Conform with the form component.
Acceptance Criteria:
- Form state is automatically managed.
- Changes in form inputs update the state correctly.
ID | Requirement | Priority | User Story |
---|---|---|---|
FR1 | Develop a React form component using Conform | High | As a developer, I want to use a Conform form component for state management. |
FR2 | Integrate Zod for validation and error handling | High | As a user, I want validation and error handling via Zod. |
FR3 | Provide documentation and examples | High | Comprehensive documentation for easy usage. |
ID | Requirement | Priority | Notes |
---|---|---|---|
https://github.com/Kurocado-Studio/html-forms/issues/1 | Ensure Epic Stack compatibility | High | Seamless integration with Epic Stack. |
- Unit Tests: Ensure form component works as expected with various input types.
- Integration Tests: Test form submission and validation using Conform and Zod.
- End-to-End Tests: Optional for complex forms.
Milestone | Estimated Completion |
---|---|
Core Form Functionality | Week 2-4 |
Documentation and Examples | Week 5-6 |
Open-Source Release | Week 7 |
Budget Estimate: $XX,XXX (based on hours and resources needed).
- Do we need to support multi-step forms in the first release?
- Should we integrate Storybook for live component demos in documentation?