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

Add Superforms, update RenameAssetModal #5068

Merged
merged 4 commits into from
Jun 17, 2024
Merged

Conversation

briangregoryholmes
Copy link
Contributor

@briangregoryholmes briangregoryholmes commented Jun 12, 2024

This PR begins the process of replacing svelte-forms-lib, which is no longer supported, with Superforms.

It reworks the RenameAssetModal to use the new API. Follow up PRs will replace other uses of the old form library.

@briangregoryholmes briangregoryholmes self-assigned this Jun 12, 2024
@briangregoryholmes briangregoryholmes marked this pull request as ready for review June 13, 2024 13:52
Comment on lines +33 to +37
const validationSchema = object({
newName: string()
.required("Enter a name!")
.matches(VALID_NAME_PATTERN, INVALID_NAME_MESSAGE),
});
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't seem to trigger this validation message. When I leave the form empty, then try to submit it, I don't see the message "Enter a name!" pop up anywhere.

Copy link
Contributor Author

@briangregoryholmes briangregoryholmes Jun 14, 2024

Choose a reason for hiding this comment

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

Unifying the Input components meant bringing over the conditionally shown error behavior from InputV2. One of the conditionals is that there exists a value in the input. Obviously that's in conflict with an error for a missing value... Turned on the alwaysShowError prop for now, though I may consider removing this conditional behavior as I convert more forms.

@briangregoryholmes briangregoryholmes merged commit dd7199d into main Jun 17, 2024
4 checks passed
@briangregoryholmes briangregoryholmes deleted the bgh/superforms branch June 17, 2024 15:12
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.

2 participants