-
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
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] |
src/libs/actions/App.js
Outdated
return { | ||
optimisticData: [ | ||
{ | ||
onyxMethod: Onyx.METHOD.MERGE, | ||
key: ONYXKEYS.IS_LOADING_REPORT_DATA, | ||
value: true, | ||
}, | ||
isOpenApp |
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.
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 |
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.
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 |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -175,6 +175,9 @@ const ONYXKEYS = { | |||
/** Is report data loading? */ | |||
IS_LOADING_REPORT_DATA: 'isLoadingReportData', | |||
|
|||
/** Is report data loading? */ |
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 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 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
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