Skip to content

Conversation

@Sebastien-Ahkrin
Copy link
Collaborator

No description provided.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 6, 2025

Deploying nmrium with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3d7c489
Status: ✅  Deploy successful!
Preview URL: https://3113f4a1.nmrium.pages.dev
Branch Preview URL: https://3809-start-using-tanstack-fo.nmrium.pages.dev

View logs

@Sebastien-Ahkrin Sebastien-Ahkrin changed the title feat: wip feat: migrate form to tanstack & zod Nov 6, 2025
@Sebastien-Ahkrin
Copy link
Collaborator Author

The form now look like that with react-science components :

CleanShot 2025-11-07 at 11 06 21

@Sebastien-Ahkrin Sebastien-Ahkrin marked this pull request as ready for review November 7, 2025 10:08
@targos
Copy link
Member

targos commented Nov 7, 2025

Validation should not accept an empty string.

@stropitek
Copy link
Contributor

CleanShot 2025-11-07 at 13 49 38@2x

Layout is not ok, please make sure it looks as nice as before.

@Sebastien-Ahkrin
Copy link
Collaborator Author

CleanShot 2025-11-07 at 13 57 46

Do you want it to looks like this ?

@stropitek
Copy link
Contributor

Do you want it to looks like this ?

Not strictly. But the previous layout had a fixed width which made much more sense.

Regarding button color, I don't know on what ground you changed the button color. Ok if it is for consistency reasons, but otherwise keep the original green color.

@targos
Copy link
Member

targos commented Nov 28, 2025

@Sebastien-Ahkrin It seems you forgot this PR.

@Sebastien-Ahkrin
Copy link
Collaborator Author

CleanShot 2025-12-01 at 10 21 04

Is this looking better ? @stropitek

@Sebastien-Ahkrin
Copy link
Collaborator Author

If we want the label text to not be centered, we have to change the react-science components

@targos
Copy link
Member

targos commented Dec 1, 2025

Why is it centered?

@Sebastien-Ahkrin
Copy link
Collaborator Author

Why is it centered?

NVM its because i use DialogContent, i can change the behavior. its now done

@targos
Copy link
Member

targos commented Dec 1, 2025

DialogContent is centered by default?

@Sebastien-Ahkrin
Copy link
Collaborator Author

DialogContent is centered by default?

yep it looks like that

@targos
Copy link
Member

targos commented Dec 1, 2025

I see that DialogContent is a component defined in this file and only used here. I don't understand why you override the value instead of changing the component directly.

Now I think we should entirely remove this component and just render DialogBody.

Copy link
Contributor

@stropitek stropitek left a comment

Choose a reason for hiding this comment

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

Previously, the input element was auto-focused. Now with the refactor it is not anymore.

Probably related to react-science, but I don't think the help message should be red. Only the error message.

Image

@Sebastien-Ahkrin
Copy link
Collaborator Author

Previously, the input element was auto-focused. Now with the refactor it is not anymore.

Probably related to react-science, but I don't think the help message should be red. Only the error message.

Image

Yep, to set the error / text message in other color, i have to change react-science. Same for auto-focus, i should change the behavior in react-science.

@targos
Copy link
Member

targos commented Dec 5, 2025

@Sebastien-Ahkrin Can you fix the conflict and look into the E2E test failures?

@Sebastien-Ahkrin
Copy link
Collaborator Author

@Sebastien-Ahkrin Can you fix the conflict and look into the E2E test failures?

sure, i'm already working on it

@Sebastien-Ahkrin
Copy link
Collaborator Author

best i can to, with removing custom styles is :

CleanShot 2025-12-09 at 11 16 53

Questions, should we keep background of the dialog "white" or should it be gray (by default) ?
I think, gray is better, but we will have to change it everywhere

@Sebastien-Ahkrin
Copy link
Collaborator Author

when errored :
CleanShot 2025-12-09 at 11 21 36

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

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

I think the default style is good.

Do you know how it works to close when we click on cancel since there is no onClick handler?

@Sebastien-Ahkrin
Copy link
Collaborator Author

I think the default style is good.

Do you know how it works to close when we click on cancel since there is no onClick handler?

it doesn't, now it should be good !

@Sebastien-Ahkrin
Copy link
Collaborator Author

CleanShot 2025-12-09 at 14 17 32

@Sebastien-Ahkrin Sebastien-Ahkrin merged commit 89bad18 into main Dec 9, 2025
12 checks passed
@Sebastien-Ahkrin Sebastien-Ahkrin deleted the 3809-start-using-tanstack-form-and-zod-validation-with-react-science-components branch December 9, 2025 13:52
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.

Start using tanstack form and zod validation, with react-science components

4 participants