-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Refactor to use an explicit prop for VBA loading state #9170
Conversation
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.
Left a small comment!
Co-authored-by: Carlos Martins <cmartins@expensify.com>
Updated! |
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.
LGTM and tests well!
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 the change here! 🙇
@@ -112,7 +111,7 @@ class WorkspacePageWithSections extends React.Component { | |||
> | |||
<View style={[styles.w100, styles.flex1]}> | |||
|
|||
{this.props.children(hasVBA, policyID, isUsingECard)} | |||
{this.props.children(isLoadingVBA, hasVBA, policyID, isUsingECard)} |
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.
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.
Indeed! Thank you for catching 🙏
Code, tests, and videos updated. Ready for another look! |
@@ -139,7 +139,7 @@ class WorkspaceSettingsPage extends React.Component { | |||
</FixedFooter> | |||
)} | |||
> | |||
{hasVBA => ( | |||
{(isLoadingVBA, hasVBA) => ( |
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.
Maybe the current behavior is fine, but should we consider disabling the currency picker until we can confirm that the account does NOT have a VBA?
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.
Yeah I'm kinda on the fence about it, but I suppose it looks better to go from disabled -> enabled than the reverse
<> | ||
{!hasVBA ? ( | ||
{!isLoadingVBA && !hasVBA && ( |
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.
NAB and maybe out of scope: Just wondering if we should have a spinner when we hide the content when isLoadingVBA = true
. I think the current behaviour just leaves the page white.
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.
Yeah idk, curious for others' opinions here as well. I think when the full page is white, a spinner might be nice. But I think it'd look kind of odd on the Reimburse expenses
screen where it'd be like 2 section blocks followed by a spinner. In that scenario, what would be nice is a gray skeleton (as proposed by @francoisl here). But considering we don't yet have those placeholder components, I'm not sure it makes sense to implement in the confines of this PR (...but also happy to if everyone is on board!).
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.
Yea, I agree with Amy here and would wait for the skeleton components to be implemented.
🚀 Deployed to staging by @marcaaron in version: 1.1.68-2 🚀
|
@marcaaron This PR is failing in iOS, we already have this issue raised #9161. Do we have to create a new ticket for this? Image.from.iOS.MP4 |
No thanks and I closed the linked issue. We are going to fix this as part of a more holistic project. Can we flag this test case as something we skip for now? |
🚀 Deployed to production by @Julesssss in version: 1.1.68-2 🚀
|
1 similar comment
🚀 Deployed to production by @Julesssss in version: 1.1.68-2 🚀
|
🚀 Deployed to production by @Julesssss in version: 1.1.68-2 🚀
|
Please ignore these duplicated messages, we only deployed once but the message appears each the iOS deploy fails. |
🚀 Deployed to production by @Julesssss in version: 1.1.68-2 🚀
|
1 similar comment
🚀 Deployed to production by @Julesssss in version: 1.1.68-2 🚀
|
Details
Minor refactor to increase code clarity, coming from @marcaaron's suggestion here
Fixed Issues
N/A
Tests
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
Same as those listed under
Tests
Screenshots
Web
9170-web.mov
Mobile Web
9170-mobile-web.mp4
Desktop
9170-desktop.mov
iOS
9170-ios.mp4
Android
9170-android.mov