Studio: New site form can be submitted with incorrect values using enter key - #2959
Conversation
📊 Performance Test ResultsComparing 33d3d55 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
epeicher
left a comment
There was a problem hiding this comment.
Thanks @katinthehatsite! This works as described, but should we also disable the Add site button when the name is empty? Alternatively, I think we can remove the siteName.trim() condition as the site name is correctly inferred from the folder name. What do you think?
| Site can be added with empty site name in the form | The site name is populated from the folder |
|---|---|
![]() |
![]() |
|
@epeicher I added the empty site name to the list of errors to be consistent with how other errors work |
|
Thanks @katinthehatsite for addressing the comments! Now I can see that the |


Related issues
Fixes https://linear.app/a8c/issue/STU-1490/new-site-form-can-be-submitted-with-incorrect-values-using-enter-key
How AI was used in this PR
Not used
Proposed Changes
This PR ensures that the site creation form can not be submitted with the
Enterkey when the site name is empty or when there are validation errors.Testing Instructions
npm startAdd siteEnterkeyPre-merge Checklist