Skip to content

Studio: Bubble up path validation error - #564

Merged
katinthehatsite merged 3 commits into
trunkfrom
fix/bubble-up-path-validation-error
Sep 27, 2024
Merged

Studio: Bubble up path validation error#564
katinthehatsite merged 3 commits into
trunkfrom
fix/bubble-up-path-validation-error

Conversation

@katinthehatsite

@katinthehatsite katinthehatsite commented Sep 26, 2024

Copy link
Copy Markdown
Contributor

Closes https://github.com/Automattic/dotcom-forge/issues/9069

Proposed Changes

This PR adds a new error indication to the add site form for the case when:

  • there is an error related to the Local path address
  • AND the Advanced settings tab is closed
Screenshot 2024-09-26 at 2 00 48 PM Screenshot 2024-09-26 at 2 01 04 PM

Testing Instructions

  • Pull the changes from this branch
  • Start the app with nvm use && npm install && npm start
  • Create a site with the name My WordPress Site in Studio
  • Try creating a second site with the same name My WordPress Site
  • Observe that you can see the text 1 error found and the Advanced settings text goes red
  • Open the Advanced settings and see the full error
  • Change the site name to something else
  • Observe that the error goes away and the Advanced settings text goes back to the usual color

RToz6tIuQ7nlZrikBte4GU-fi-3748_312092

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@katinthehatsite katinthehatsite self-assigned this Sep 26, 2024
@katinthehatsite
katinthehatsite requested a review from a team September 26, 2024 12:05

@wojtekn wojtekn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

there is an error related to the Local path address
AND the Advanced settings tab is closed

This description could suggest that the error is relayed only if those two conditions are true, but based on my tests, I see it is relayed also when Advanced settings are open. However, I think it's even better that way.

Comment thread src/components/site-form.tsx Outdated
@katinthehatsite

Copy link
Copy Markdown
Contributor Author

This description could suggest that the error is relayed only if those two conditions are true, but based on my tests, I see it is relayed also when Advanced settings are open. However, I think it's even better that way.

Thanks @wojtekn - yeah this was the original intention and it is the description that failed me 😅

@katinthehatsite
katinthehatsite merged commit 9d7be54 into trunk Sep 27, 2024
@katinthehatsite
katinthehatsite deleted the fix/bubble-up-path-validation-error branch September 27, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants