-
Notifications
You must be signed in to change notification settings - Fork 50
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
Encryption password UX #492
Conversation
Deploying with Cloudflare Pages
|
31af0b4
to
41aba8e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
3419331
to
447d302
Compare
Upon learning how modular forms works more, I don't think createEffect is a good route afterall, the standard validate after submitting is sufficient. It continuosly checks on its own after submitting once already. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks / works great just needs rebase. thank you!
createForm<EncryptPasswordForm>({ | ||
initialValues: { | ||
existingPassword: "", | ||
password: "", | ||
confirmPassword: "" | ||
}, | ||
validate: (values) => { | ||
setError(undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes more sense to put this in handleFormSubmit
because that's where the setter happens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tried this, but I remembered why its here, we need the error to reset on any change to the form and not only on submit since an error prevents the user from submitting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to the encryptButtonDisabled
the encrypt button is unclickable until the user has made a change to any of the forms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh k makes sense
0d1ae85
to
d8e7d28
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
Closes #490 after Mutiny-node/#727 is merged
Adds similar logic to prevent #462 from cropping up here