Fix: Red dot persists after removing phone number contact method#18473
Conversation
|
@pecanoro @rushatgabhane One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-05-09.at.10.02.40.moviOSScreen.Recording.2023-05-09.at.10.04.43.movAndroidScreen.Recording.2023-05-09.at.10.04.16.mov |
|
Merging! I tested it and it seems to be working well! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
HI, just found that this merge may be actually redundant. We have already fixed this on #18536. |
|
Oh well, both were happening at the same time, we should have caught this up when opening the bug reports. @s77rt I think maybe we just need to pay one bug report as it's exactly the same bug? Or do you think we should pay for both reports? We will be paying for both PRs though since the work is done already. |
|
@pecanoro On another similar scenario (don't have link now) we ended up paying both reporters. But this one seems a little different since the bug reporter is the same. I think the bug bounty should be paid once ($250). As for this PR, can you please revert it? Not only because it's redundant but it's following a "wrong" pattern: The login that we check here should be the same that we end up submitting hereBut it's not, we check We should have called |
|
I am not sure if I am following properly. Are you saying we should move |
This comment was marked as outdated.
This comment was marked as outdated.
|
@pecanoro If the other PR didn't exist, yes we should have moved that to line 83. A little more explanation on the wrong pattern here:
Now the issue is fixed already calling @Pujan92 Let me know if that ^ explained my point better. Or if I should elaborate more. |
|
@s77rt I think with only my change(wrong pattern as you mentioned) when we try to add the same phone number again it skips this part but it should not - due to the comparison of non-sms domain number with sms domain number. Logically it should navigate back from this condition but will not due to the above reason. App/src/pages/settings/Profile/Contacts/NewContactMethodPage.js Lines 85 to 89 in 802e406 Can't we merge these 3 lines directly with App/src/pages/settings/Profile/Contacts/NewContactMethodPage.js Lines 81 to 83 in 802e406 |
|
@Pujan92 I'm not sure you understood my point. Here is the workflow:
Here is what we are doing
|
|
@s77rt I understood your point and tried to provide an example for it(where it gets failed logically without any functional issue). |
|
At this point I don't think it will fail. I just pointed it as a "wrong" pattern. |
|
I meant if the other PR won't be there and only mine was merged then this logical issue may present. At this point, I agree it won't as we are adding the sms domain earlier to the given login value before the existence check within loginList. With that, I think we can revert this PR as seems not required now. |
|
@Pujan92 Can you create a revert PR then? We will still issue payment anyways as all the work was done when we realized about the duplicate. |
|
🚀 Deployed to staging by https://github.com/pecanoro in version: 1.3.13-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.13-5 🚀
|



Details
Added sms domain if the new contact method is phone number to prevent multiple keys creation in the onyx.
Fixed Issues
$ #17889
PROPOSAL: #17889 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Screen.Recording.2023-05-05.at.6.18.06.PM.mp4
Mobile Web - Chrome
abcd.webm
Mobile Web - Safari
Simulator.Screen.Recording.-.iPhone.14.-.2023-05-05.at.18.53.40.mp4
Desktop
Screen.Recording.2023-05-05.at.6.57.08.PM.mov
iOS
Simulator.Screen.Recording.-.iPhone.14.-.2023-05-05.at.18.50.24.mp4
Android
aancd.webm