Delete Site: toLowerCase() before validating domain #7458
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At WordCamp Boston, a user came up to me while I was working the Jetpack booth and asked me to walk her through the process of deleting her site. So, I did that. But, as I walked the user through how to delete her site on her iPad, I realized that we weren't being very friendly to mobile users in our validation logic.
Specifically, our logic checks that the domain the user entered is exactly the same as the site's acutal domain. The problem with this is that the mobile keyboard by default capitalizes the first character. So, the user, after having entered her site domain multiple times became frustrated.
This PR aims to fix this by lower casing the entered domain before running validation logic as well as turning off
autoCapitalize
.To test:
update/delete-site-to-lower
branch/settings/general/$site
where$site
is a WP.com siteTest live: https://calypso.live/?branch=update/delete-site-to-lower