-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2022-01-19] When setting a custom pronoun that is over the character limit, the API throws an error but the user isn't informed - Reported by: @anthony-hull #6492
Comments
Triggered auto assignment to @iwiznia ( |
Proposal
pronounsLength: 'Pronouns shouldn\'t be longer than 50 characters',
else if (response.jsonCode === 666) {
Growl.error(Localize.translateLocal('personalDetails.error.pronounsLength'), 3000);
} ResultScreen.Recording.2021-11-26.at.5.22.05.AM.mov |
Should we even attempt the API call if we know it will fail? |
or even better use: |
Triggered auto assignment to @kadiealexander ( |
Yes we can use Or we can add pronouns validation to this function App/src/pages/settings/Profile/ProfilePage.js Lines 161 to 169 in d2eadd4
it will be something like this: const {pronounceError} = PersonalDetails.getPronounsError(this.state.hasSelfSelectedPronouns, this.state.pronouns);
this.setState({
firstNameError,
lastNameError,
pronounceError,
}); |
Reading into it more I think it's bad practice to limit the text with maxLength, you don't want to interrupt the user mid flow. Let them get it all down and then fix the limit after. Putting it into the validate function and putting the error into the input context like above is probably best. I'm still not convinced it's worth putting in error handling logic from the API for a state the user shouldn't be able to get to once there it client side validation. You shouldn't be allowed to submit the form if it fails validation. I'd like to work on this issue. I think your suggested approach is a good one, I would do the same, copying the implementation of the first and last name validation and errors. |
Upwork job here: https://www.upwork.com/jobs/~0179b0bb6fe5bcfda3 |
Triggered auto assignment to @parasharrajat ( |
Triggered auto assignment to @Julesssss ( |
@Julesssss and @parasharrajat, would you guys mind please reviewing @anthony-hull's proposal above? :) |
I don't see any formal proposal(exact approach) from @anthony-hull. I liked @kakajann #6492 (comment) and he posted first. I also think we won't need API checks after putting in this code. @anthony-hull If you can think of a better approach then I would like to hear about it as you raised the issue. 🎀 👀 🎀 |
sure I'm working on this today and tomorrow. |
No worries, thanks for the update! I hope you're feeling better. |
Triggered auto assignment to @bfitzexpensify ( |
Reassigning this as I'm ooo until 10th Jan, thanks @bfitzexpensify!! |
have a great break! |
@anthony-hull When can we expect the PR for this issue? |
I will finish the PR tomorrow. I just finished the first pass of coding the change. |
|
Progress being made in #6899, Melv |
this should be merging today 🤞 |
has been approved, waiting for it to merge |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.27-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2022-01-19. 🎊 |
No regressions — @anthony-hull, ended the contract and paid you $500 (for reporting + fix). Thanks! @parasharrajat, sent you an offer here for C+ review. |
All wrapped up. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
There's an error letting the user know that the pronouns should be under a certain amount of characters.
Actual Result:
Nothing happens, changes are not saved and no error is displayed.
Workaround:
N/A
Platform:
Where is this issue occurring?
Version Number: 1.1.16-9
Reproducible in staging?: Yes
Reproducible in production?: Yes
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
New.Expensify.1.mp4
Expensify/Expensify Issue URL:
Issue reported by: @anthony-hull
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1637837622005000
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: