-
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
[CP Staging] Don't show the loading screen when the connections feature is not enabled #40893
[CP Staging] Don't show the loading screen when the connections feature is not enabled #40893
Conversation
This is not fixing the bug from my side |
with accounting enabled ^ |
@hayata-suenaga thanks! can you please add tests? I find the logic a bit odd as the feature flag is co-dependent to |
@mountiny, the test steps are in the OP 😄 |
@hayata-suenaga they werent when I was posting the comment :D regarding this #40881 (comment) its not true that this logic would load it in Categories page. It does not load it if the connections feature is not on. |
I don't know what you mean by this, but we only need to fetch the connections data if the connections feature is enabled.
This value will be reset on every user session as you can see from |
yes, that's right. That's why we have to check if the connections feature is enabled or not before showing the loading indicator. |
@hayata-suenaga If |
Trying to reproduce this, but I cannot right now. Let me keep trying |
@s77rt okay now it's ready 😓 |
Rewriting the conditions in variable should help with code readability. I don't see why we need to const needToFetchConnections = !hasConnectionsDataBeenFetched && props.policy?.areConnectionsEnabled && !props?.policy?.connections;
const isLoading = needToFetchConnections || status === 'loading'; |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Desktop |
Added only screenshot for web. The simulator is OOO 😅. Let's get this merged |
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
requesting cherry pick -> https://expensify.slack.com/archives/C07J32337/p1713970530252449 |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…screen-when-fetching-connections-data [CP Staging] Don't show the loading screen when the connections feature is not enabled (cherry picked from commit cd3966e)
…-40893-1 🍒 Cherry pick PR #40893 to staging 🍒
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.65-3 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.65-5 🚀
|
Details
If the Connections feature is not enabled on the More Features page, we don't fetch the
connections
data. However, we forgot to account for this case, which resulted in the infinite loading indicator as the Categories screen was waiting for theconnections
data which won't be fetched under this condition.Fixed Issues
$ #40875
PROPOSAL: N/A
Tests / QA Steps
Offline tests
N/A
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop