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

fix(folder): update the folder title to not be empty #750

Merged

Conversation

seaerchin
Copy link
Contributor

Problem

  1. folder titles were allowed to be empty but we want to disallow that so we need more stringent validation

Solution

  1. update the validation mode to onChange - this is because validation (by default) for react hook form starts after submit, which won't be true for our modal (we close after a successful submit)
  2. don't show the permalink box if there is an error

Screenshots

Screen.Recording.2024-10-09.at.7.04.46.PM.mov

@seaerchin seaerchin requested a review from a team as a code owner October 9, 2024 11:06
Copy link

linear bot commented Oct 9, 2024

Copy link

vercel bot commented Oct 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
isomer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2024 11:06am

@datadog-opengovsg
Copy link

Datadog Report

Branch report: chin/isom-1622-edit-folder-settings-allows-empty-title
Commit report: 9f472a6
Test service: isomer-studio

✅ 0 Failed, 8 Passed, 1 Skipped, 7.97s Total Time

@seaerchin seaerchin merged commit 9c4ca71 into main Oct 9, 2024
18 of 19 checks passed
@seaerchin seaerchin deleted the chin/isom-1622-edit-folder-settings-allows-empty-title branch October 9, 2024 18:45
seaerchin added a commit that referenced this pull request Oct 10, 2024
* fix: disable empty titles for folder modal

* chore: update copy for page settings

* fix: update mode for validation

* fix: replace the url field if there is an error

we don't wnat to show both the url + the error cos it's redundant
(invalid url)

* fix: import the correct error message
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