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

refactor: install form #4154

Merged
merged 3 commits into from
May 9, 2024
Merged

Conversation

TinsFox
Copy link
Contributor

@TinsFox TinsFox commented May 7, 2024

Description

This change has modified the verification of the install form, using react-hook-form to manage the form, and using zod to verify the form data.

At the same time, the error reporting method when the form item verification fails is improved. Display errors directly below the input box instead of using toast

Before
image

Affter
image

Related #3667

Type of Change

Please delete options that are not relevant.

  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade, three new dependencies have been added, react-hook-form, @hookform/resolvers, zod

How Has This Been Tested?

Enter the system installation page http://localhost:3000/install , fill in the form and switch languages ​​at will

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. dependencies Pull requests that update a dependency file labels May 7, 2024
@takatost takatost requested review from iamjoel and zxhlyh May 7, 2024 10:09
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 9, 2024
@crazywoola crazywoola merged commit cc835d5 into langgenius:main May 9, 2024
7 checks passed
@takatost takatost mentioned this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants