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

Form Component #9995

Merged
merged 11 commits into from
May 20, 2024
Merged

Form Component #9995

merged 11 commits into from
May 20, 2024

Conversation

MrFlashAccount
Copy link
Contributor

@MrFlashAccount MrFlashAccount commented May 18, 2024

Pull Request Description

This PR provides initial support for Form component and is supposed to be a first step in the long run.
Over the next iterations, we're going to continue adding new features that support <Form /> out of the box(inputs, checkboxes, and so on)

Current PR is focused on providing the first version of Form component

As a tech stack, we chose:

  1. react-hook-form for being mature and feature-complete and performant
  2. Zod as validation library instead of ajv(that is present in the project already) for smaller bundle size, simpler and ts-friendly configuration, and better support

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

@MrFlashAccount MrFlashAccount self-assigned this May 18, 2024
@MrFlashAccount MrFlashAccount added CI: No changelog needed Do not require a changelog entry for this PR. g-dashboard labels May 18, 2024
@MrFlashAccount MrFlashAccount marked this pull request as ready for review May 19, 2024 10:36
Copy link
Collaborator

@somebody1234 somebody1234 left a comment

Choose a reason for hiding this comment

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

code looks fine, but it would be nice to see it being used somewhere so it can actually be tested.

also you might want to double check package-lock.json, 8k lines of changes looks kinda suspicious... did you accidentally remove package-lock.json before running npm i?

@MrFlashAccount
Copy link
Contributor Author

also you might want to double check package-lock.json, 8k lines of changes looks kinda suspicious... did you accidentally remove package-lock.json before running npm I?

Yeah, it is changed, because I ran npm dedupe to get rid of duplication of react-query.

@MrFlashAccount
Copy link
Contributor Author

MrFlashAccount commented May 20, 2024

code looks fine, but it would be nice to see it being used somewhere so it can actually be tested.

Yeah, we'll start using it in the next iterations. ATM it's not very usable without integration with form components (inputs, checkboxes, etc).

But it's definitely out of the scope of the current PR.

Also, I tried to write a couple of unit tests and found that we're missing some configuration and libs to do it properly. Will add this eventually (it also is out of the scope of the PR)

The goal of this PR is to introduce a first (not very usable though) implementation of Form component and continue improving it in the future

@MrFlashAccount MrFlashAccount added the CI: Ready to merge This PR is eligible for automatic merge label May 20, 2024
@mergify mergify bot merged commit 1991aab into develop May 20, 2024
36 of 37 checks passed
@mergify mergify bot deleted the wip/sergeigarin/add-form branch May 20, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge g-dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants