fix: 27054 Conversations do not load if you interrupt the Internet connection when logging in#27380
Conversation
…nnection when logging in
|
@narefyev91 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] |
| key: ONYXKEYS.IS_LOADING_REPORT_DATA, | ||
| value: true, | ||
| }, | ||
| isOpenApp |
There was a problem hiding this comment.
instead of making if else logic inside object - i will suggest to add one default one
const defaultData = {
optimisticData: [
{
onyxMethod: 1,
key: 2,
value: true,
},
],
successData: [
{
onyxMethod: 3,
key: 4,
value: false,
},
],
failureData: [
{
onyxMethod: 5,
key: 6,
value: false,
},
],
};
And add condition at line 148 if (!isOpenApp) return defaultData
And after it
return {
...defaultData,
optimisticData: [...defaultData.optimisticData, {
onyxMethod: 3,
key: ONYXKEYS.IS_LOADING_APP,
value: true,
}],
successData: [...defaultData.successData, {
onyxMethod: 3,
key: ONYXKEYS.IS_LOADING_APP,
value: true,
}],
failureData: [...defaultData.failureData, {
onyxMethod: 3,
key: ONYXKEYS.IS_LOADING_APP,
value: true,
}]
}
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromeandroid-web.movMobile Web - Safariios-web.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
narefyev91
left a comment
There was a problem hiding this comment.
Needs to improve a little bit onyx object (sent suggested changes). Apart from that -
LGTM!
🎀 👀 🎀 C+ reviewed
|
@narefyev91 Thanks for your suggestion. I just updated the PR |
deetergp
left a comment
There was a problem hiding this comment.
Great work! The code looks good and tests well, thanks for the changes!
|
✋ 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/deetergp in version: 1.3.72-0 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.72-11 🚀
|
| onyxMethod: Onyx.METHOD.MERGE, | ||
| key: ONYXKEYS.IS_LOADING_APP, | ||
| value: true, | ||
| }, |
There was a problem hiding this comment.
I am not sure if it's a bad thing and haven't looked into the P/S - but got curious about why we need this. I see a lot of places in the app are "waiting" for the "is loading app" flag now and wonder if we need to do it in all those places or not...
"is loading app" sort of confuses me as a variable name. Maybe would have been better to call this: isLoadingCriticalAppData or something.
| /** Is report data loading? */ | ||
| IS_LOADING_REPORT_DATA: 'isLoadingReportData', | ||
|
|
||
| /** Is report data loading? */ |
There was a problem hiding this comment.
I think it's more than report data. And this comment looks copy-pasta
Details
Fixed Issues
$ #27054
PROPOSAL: #27054 (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-09-13.at.18.26.33.mp4
Mobile Web - Chrome
378054037_9906378476100817_1854384456865788962_n.mp4
Mobile Web - Safari
378008130_6868938326471418_7124091656514801724_n.mp4
Desktop
Screen.Recording.2023-09-14.at.00.24.07.mp4
iOS
Screen.Recording.2023-09-14.at.00.37.22.mov
Android
Screen.Recording.2023-09-14.at.00.37.22.mov