[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 |
|
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
connectionsdata. However, we forgot to account for this case, which resulted in the infinite loading indicator as the Categories screen was waiting for theconnectionsdata 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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop