-
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
Delay section display until ACH state has loaded #9138
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.
I couldn't test this on web locally due to CORS errors while using the Staging API.
How come you are using the Staging API?
I used the staging API because I needed to set up a VBA for the workspace as a prereq of testing. I followed this SO to do so. If you have other suggestions to get it working I'm all ears 😄 I just wasn't sure the ROI was there given that this change is so minor. |
Ah I see. You can use the same steps in DEV, which would get rid of the CORS errors 😄 Anyways, I tested these changes in all platforms and they work as expected. |
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!
✋ 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 @luacmartins in version: 1.1.66-0 🚀
|
Hi @amyevans, This regression was raised, and I don't agree with it tbh. Do you think that your changes in this PR explain why the card isn't immediately shown? (just like you mentioned here in this other blocker). |
No, the changes in my PR cause Looking at the Taking a step back, to truly fix all these intertwined issues (#9166, #9057, #9159) and have optimal UI, we would need to determine if the user has a VBA initially, instead of making a secondary API call. But that's where my limited knowledge of the app trips me up so I'd need to do a lot more digging to figure out if that's feasible or what actual implementation looks like there... |
Thanks for the response. That makes sense and I agree that the true fix would likely be to ensure the |
const hasVBA = achState === BankAccount.STATE.OPEN; | ||
const hasVBA = this.props.reimbursementAccount.loading | ||
? null | ||
: achState === BankAccount.STATE.OPEN; |
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.
suggestion: something like hasVBA
and isLoadingVBA
could be used together in these components to have logic like:
!isLoadingVBA && hasVBA -> show this
!isLoadingVBA && !hasVBA -> show that
Was just thinking someone might see this.props.hasVBA === false
and refactor it to !this.props.hasVBA
and might re-introduce the bug.
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, very good point! I'll get a PR up for that change. Thanks!
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.
Nice catch Marc!
🚀 Deployed to production by @chiragsalian in version: 1.1.66-1 🚀
|
Details
Delays rendering the third section on the Workspace Reimburse Expenses page until the necessary data has loaded. This prevents a brief flash of different copy during loading
Fixed Issues
$ #9057
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
I couldn't test this on web locally due to CORS errors while using the Staging API.
Mobile Web
Same as above.
Desktop
9057-desktop.mov
iOS
9057-ios.mp4
Android