auto submit magic code during first submit only#29731
auto submit magic code during first submit only#29731joelbettner merged 5 commits intoExpensify:mainfrom
Conversation
|
@cubuspl42 Please 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] |
|
Another contributor correctly noticed that this logic is used in multiple places. Have you verified that the new behavior works well in those places, too? |
|
Yes! I verified with all scenarios |
|
Let's merge |
|
Always be sure to merge (or even rebase on, especially before the review) |
sorry i forgot to do that, merged |
@saranshbalyan-1234 Would you provide at least one video of the other place that uses the magic code logic? |
0c054daa-4f10-4748-b720-196a14bc39c3.mp4 |
@cubuspl42 please check this on add new contact method |
Reviewer Checklist
Screenshots/VideosWebstop-magiccode-instant-submit-onchange-web.mp4Mobile Web - Chromestop-magiccode-instant-submit-onchange-android-web-compressed.mp4Mobile Web - Safaristop-magiccode-instant-submit-onchange-ios-web.mp4DesktopiOSstop-magiccode-instant-submit-onchange-ios.mp4Androidstop-magiccode-instant-submit-onchange-android-compressed.mp4 |
|
Suggestion of improved language for the QA Steps:
Also, under "Tests", add a note "Same as QA Steps" |
| if (wasSubmitted || !props.shouldSubmitOnComplete || _.filter(numbers, (n) => ValidationUtils.isNumeric(n)).length !== props.maxLength || props.network.isOffline) { | ||
| return; | ||
| } | ||
| if (!wasSubmitted) { |
There was a problem hiding this comment.
At this point, wasSubmitted is always false
There was a problem hiding this comment.
As this is a minor thing (as it might be argued that the explicit if adds some readability), I'll still approve. But I would personally remove the if.
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/joelbettner in version: 1.3.86-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.86-5 🚀
|
Details
Fixed Issues
$ #28019
PROPOSAL: #28019 (comment)
Tests
Offline tests
Same as QA steps
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
Android: Native
android_bNbhm8ea.mp4
Android: mWeb Chrome
chrome.mp4
iOS: Native
ios_t6AJ6sBZ.mp4
iOS: mWeb Safari
ios_t6AJ6sBZ.mp4
MacOS: Chrome / Safari
web_gqSyeCQD.mp4
MacOS: Desktop
desktop_e0SM9KHO.mp4