Feature: Check username validity on text field return #4647
+90
−0
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.
Hello 👋
I've recently downloaded and the iOS app and when trying to create a wikipedia account, I've gotten too many "username not available" errors after typing every field (especially Captcha is annoying) and tapping "Create". This frustrated me so I went to the web and tried to create an account: to my surprise, web UI checked username validity on text field return, which didn't require me to input all the fields like password.
So I've inspected the API required and implemented it in the iOS app. I couldn't find any official documentation on this API so I've just tested with 3 username types: taken, not available, and available. I'm opening this PR as a draft since I'm sure it needs some changes before being mergeable. I'm not sure the response struct I've implemented can handle all responses this API could return.
Video of the feature:
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-10-01.at.22.52.24.mp4