-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Changes from all commits
741c768
4a0bbeb
30e79ff
8423bb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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 |
||
<View style={[styles.pageWrapper, styles.flex1, styles.alignItemsStretch]}> | ||
<AvatarWithImagePicker | ||
isUploading={this.props.policy.isAvatarUploading} | ||
|
@@ -176,7 +176,7 @@ class WorkspaceSettingsPage extends React.Component { | |
onInputChange={currency => this.setState({currency})} | ||
items={this.getCurrencyItems()} | ||
value={this.state.currency} | ||
isDisabled={hasVBA} | ||
isDisabled={isLoadingVBA || hasVBA} | ||
/> | ||
</View> | ||
<Text style={[styles.textLabel, styles.colorMuted, styles.mt2]}> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,11 +25,12 @@ const WorkspaceBillsPage = props => ( | |
route={props.route} | ||
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_BILLS} | ||
> | ||
{(hasVBA, policyID) => ( | ||
{(isLoadingVBA, hasVBA, policyID) => ( | ||
<> | ||
{!hasVBA ? ( | ||
{!isLoadingVBA && !hasVBA && ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
<WorkspaceBillsNoVBAView policyID={policyID} /> | ||
) : ( | ||
)} | ||
{!isLoadingVBA && hasVBA && ( | ||
<WorkspaceBillsVBAView policyID={policyID} /> | ||
)} | ||
</> | ||
|
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.
Since we changed up the order of arguments we must also check each usage of
WorkspacePageWithSections
. Spotted a few we missed: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 🙏