-
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
[CP Staging] Fix: No notification when closing account #28800
Conversation
@abdulrahuman5196 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] |
_.find(onyxUpdates, ({key, value}) => { | ||
if (key !== ONYXKEYS.IS_USING_MEMORY_ONLY_KEYS || !value) { | ||
return false; | ||
return requestResponse |
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.
@tienifr Why are having this much diff here? I know we are only adding catch to this?
Can we remove the unwanted diff? Any specific reason to have?
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.
That's prettier
diff. Maybe because I added the catch
phrase thus everything was shift down 1 line.
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've already compared line by line and verified that they're the same. You can check it yourself.
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.
Thank you. I also verified. No changes.
shouldPauseQueue: true, | ||
}); | ||
}) | ||
.catch(console.error); |
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.
Kindly add small meaningful tags with error, like Got exception while saving response in onyx
@tienifr
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.
Agree.
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.
Updated!
Thank you checking |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-10-04.at.5.54.06.PM.mp4Mobile Web - Chromeaz_recorder_20231004_180214.mp4Mobile Web - SafariScreen.Recording.2023-10-04.at.5.57.17.PM.mp4DesktopScreen.Recording.2023-10-04.at.6.06.15.PM.mp4iOSScreen.Recording.2023-10-04.at.6.03.51.PM.mp4Androidaz_recorder_20231004_181901.mp4 |
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.
Thanks for quick fix
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.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @mountiny
🎀 👀 🎀
C+ Reviewed
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.
Thanks everyone!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
[CP Staging] Fix: No notification when closing account (cherry picked from commit 130e6d6)
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.3.77-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.77-7 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.79-0 🚀
|
}); | ||
}) | ||
.catch((err) => { | ||
console.error('Got exception while saving response in Onyx', err); |
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.
This catch
causes a regression, it suppresses network errors such as 'Failed to fetch', but I believe it shouldn't.
Unit tests defined in APITest.js
are not failing due to a TypeError which is always raised in SequentialQueue
file here:
First an error is suppressed in SaveResponseInOnyx
:
console.error
Got exception while saving response in Onyx Error: Failed to fetch
at /tests/unit/APITest.js:90:40
52 | })
53 | .catch((err) => {
> 54 | console.error('Got exception while saving response in Onyx', err);
| ^
55 | });
56 |
57 | export default SaveResponseInOnyx;
Later an error is raised as shouldPauseQueue
isn't defined on undefined
response:
error1 = TypeError: Cannot read properties of undefined (reading 'shouldPauseQueue')
at /src/libs/Network/SequentialQueue.ts:73:26)
at log (src/libs/Network/SequentialQueue.ts:81:21)
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.
Thanks!
if (!key) { | ||
return; | ||
} | ||
|
||
if (!key.startsWith(ONYXKEYS.COLLECTION.REPORT)) { |
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.
FYI optional chaining is allowed in TS:
if (!key) { | |
return; | |
} | |
if (!key.startsWith(ONYXKEYS.COLLECTION.REPORT)) { | |
if (!key?.startsWith(ONYXKEYS.COLLECTION.REPORT)) { |
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀
|
Details
No notification when account is closed. This PR fixes that.
Fixed Issues
$ #28748
PROPOSAL: #28748 (comment)
Tests
Offline tests
NA
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
web-compressed.mov
Mobile Web - Chrome
chrome-compressed.mov
Mobile Web - Safari
safari-compressed.mov
Desktop
desktop-compressed.mov
iOS
ios-compressed.mov
Android
android-compressed.mov