-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Remove brackets and hyphen from phone number input #7328
Remove brackets and hyphen from phone number input #7328
Conversation
PR updated! |
Thanks, will test shortly. |
PR is ready for review now. |
@parasharrajat have you had a chance to review/test this? |
Not yet. I was waiting for the query. I am yet to do the final review and test. @thesahindia You have got some conflicts. thanks. |
Made the suggested changes, it's ready for the review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not look like this error message makes sense now on the Request a Call page. As we moved to a generic PhoneInput. Brackets and hyphens are allowed.
@puneetlath Should we update that as well?
Please update QA steps to show how to navigate to Navigate to RequestCallPage, AdditionalDetailsStep, CompanyStep, AddSecondaryLoginPage
. Testers don't know about the components. Try to use the Page name.
Suggestion: Try to improve your commit messages for future PRs. They should briefly explain the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Company information page. There is length validation. This is different from other phone input in the app. Do we want to keep it like this or make same as other phone inputs?
cc: @puneetlath
Hm, interesting. I would say make it the same as other phone inputs. That feels weird to me for phone numbers. |
I don't mind it. But please ask this on slack for a general opinion explaining the motive behind the PR. |
Asked about it on slack, also at Add phone number page we show the error from the backend and we use the same component for adding email and the error message doesn't asks about removing the brackets or dashes, It says |
I would suggest asking this on the issue/slack thread. These decisions need to be made by the team. |
@parasharrajat, Pr is ready for the review now. |
I'll review it asap. Prioritizing tasks. Delay caused due to broken Mac. |
What's happening with this PR it's been open for 4 months can someone give a brief summary please? |
The PR is about removing the brackets and hyphen from the phone number and for that we created a new component (phoneTextInput) and we added front-end validation for phone number at some places and we made some other code changes to keep the behaviour consistent of phone number fields. Basically the scope of this issue was increased Also it took time because of some communication delays and also because of delays in code changes as I was working on other PRs. |
Please merge main as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that I agree 100% with creating yet another component for this. I'd think that we should strip special chars for frontend validation and on form submission.
If we are going the new component route, we should make sure that it's compatible with the new Form component - docs. There's an example of a refactor to TextInput
in this PR.
Yeah, Correct. @thesahindia you would have to make the new component compatible with Form Design. |
We are using |
I think no. We have to update the new component as well.
we can also do this but I am sure how much effort it would be. |
There are a few callbacks that need to be updated for this component to the the interface that Form expects. You can follow the instructions given in this PR.
Right now, it would involve updating each validate and submit method (~4 usages)? |
Honestly I prefer going this way instead of using a new component. |
@luacmartins, should we go this way? |
I'd say yes, but maybe we should check with the other reviewers as well @marcaaron @parasharrajat (Puneet is ooo) |
I am fine with either of them. |
Can someone quickly summarize what is blocking this PR please? Thanks! Edit: On the original issue if possible. |
any update @thesahindia? |
@parasharrajat, I was waiting for a reply from Marc but I think we can just move forward so I will just go with the new approach. |
What is the new approach? Please summarize it? |
Carlos suggested that instead of using a new component we should be stripping parentheses and dashes at validation and on form submission.
So we are thinking to move forward with it. |
@thesahindia Please summarize in a comment why this PR was closed. |
In this PR we were trying to create and use a new component for all the phone number fields, now that we are going with a different approach we won't need that component. I closed this PR as it was easy to raise a new one instead of reverting the changes. |
Details
Fixed Issues
$ #7007
Tests
QA Steps
Tested On
Screenshots
Web
Screen.Recording.2022-01-20.at.3.36.49.AM.mov
Screen.Recording.2022-01-20.at.3.34.10.AM.mp4
Mobile Web
Screen.Recording.2022-01-20.at.3.45.39.AM.mov
Screen.Recording.2022-01-20.at.3.51.16.AM.mov
Desktop
Screen.Recording.2022-01-20.at.4.07.37.AM.mov
iOS
Screen.Recording.2022-01-20.at.4.21.17.AM.mov
Screen.Recording.2022-01-20.at.4.16.15.AM.mov
Screen.Recording.2022-01-20.at.4.11.46.AM.mov
Android
Screen.Recording.2022-01-20.at.3.57.42.AM.mov
Screen.Recording.2022-01-20.at.4.00.40.AM.mov