-
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
Offline/Online toggle data fetch for WorkspacePageWithSections #8946
Offline/Online toggle data fetch for WorkspacePageWithSections #8946
Conversation
} | ||
|
||
componentDidUpdate(prevProps) { | ||
if (!prevProps.network.isOffline || this.props.network.isOffline) { |
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'm confused...
If we were previously offline, and now we are no longer online, wouldn't we want to fetchData
instead of return
?
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.
It is a little confusing but I think it's correct!
It is saying "If we were prev online (!prevPros.network.isOffline) or if we are offline right now, then returns"
Which means, if we just got offline/disconnected from the web don't do anything
But if it doesn't enter that if statement, then it just came back online.
This if statement comes from the parent issue:
https://github.com/Expensify/Expensify/issues/208185
✋ 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 @joelbettner in version: 1.1.61-0 🚀
|
🚀 Deployed to production by @AndrewGable in version: 1.1.61-3 🚀
|
Details
Re-fetch WorkspacePageWithSections data when we toggle from offline -> online
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/208202
Tests
All Platforms:
Web:
api?command=Get
request with the payload formData containingname: expensify_freePlanBankAccountID
Other platforms:
PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
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)PR Reviewer Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followed/** comment above it */
displayName
propertythis
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)QA Steps
All Platforms:
Web:
api?command=Get
request with the payload formData containingname: expensify_freePlanBankAccountID
Other platforms:
Screenshots
Web
web.mov
Mobile Web
web-mob.mov
Desktop
desktop.mov
Android