-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2025-01-13] [$250] Add spinning loader until full list of policies is successfully download on the client #52766
Comments
Current assignee @JmillsExpensify is eligible for the NewFeature assigner, not assigning anyone new. |
Keeping internal until we align on the right solution. |
I still like the spinner. Skeletons make sense to me when we know exactly what the UI is going to look like, but I find the transition from a skeleton loader to a big empty state card (for example) to be pretty jarring. |
Edited by proposal-police: This proposal was edited at 2024-12-04 17:15:04 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Add spinning loader until full list of policies is successfully download on the client What is the root cause of that problem?Feature request, we currently directly show the empty workspace component if there are no policies: App/src/pages/workspace/WorkspacesListPage.tsx Lines 377 to 379 in 03e32f9
What changes do you think we should make in order to solve the problem?We need to show a loading spinner if the const [isLoadingApp] = useOnyx(ONYXKEYS.IS_LOADING_APP);
const isLoading = !isOffline && isLoadingApp; then before the following: App/src/pages/workspace/WorkspacesListPage.tsx Lines 377 to 379 in 03e32f9
We need to add: if(isLoading) {
return(
<ActivityIndicator
size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE}
style={styles.flex1}
color={theme.spinner}
/>
)
} Note that we can skip the
We can also update the we also need to update const WorkspaceCardCreateAWorkspaceInstance = isLoadingApp ? <FullScreenLoadingIndicator /> : <WorkspaceCardCreateAWorkspace />; Style changes will be made during PR phase Result videoScreen.Recording.2024-11-20.at.1.37.01.AM.mov |
Totally agree with Danny there. I like the spinner. |
Proposal updatedAdded result video |
Edited by proposal-police: This proposal was edited at 2024-12-04 16:59:29 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Add spinning loader until full list of policies is successfully download on the client What is the root cause of that problem?Improvement What changes do you think we should make in order to solve the problem?
const [isLoadingApp] = useOnyx(ONYXKEYS.IS_LOADING_APP);
// We can also remove "styles.pt3" when "isLoadingApp" is true.
<ScrollView contentContainerStyle={[styles.pt3, isLoadingApp && styles.h100]}>
<View style={[styles.flex1, isLessThanMediumScreen || isLoadingApp ? styles.workspaceSectionMobile : styles.workspaceSection]}>
{!isLoadingApp ? (
<FeatureList
menuItems={workspaceFeatures}
title={translate('workspace.emptyWorkspace.title')}
subtitle={translate('workspace.emptyWorkspace.subtitle')}
ctaText={translate('workspace.new.newWorkspace')}
ctaAccessibilityLabel={translate('workspace.new.newWorkspace')}
onCtaPress={() => interceptAnonymousUser(() => App.createWorkspaceWithPolicyDraftAndNavigateToIt())}
illustration={LottieAnimations.WorkspacePlanet}
// We use this style to vertically center the illustration, as the original illustration is not centered
illustrationStyle={styles.emptyWorkspaceIllustrationStyle}
titleStyles={styles.textHeadlineH1}
/>
) : (
<FullScreenLoadingIndicator style={[styles.flex1, styles.pRelative]} />
)}
</View>
</ScrollView>
const WorkspaceCardCreateAWorkspaceInstance = isLoadingApp ? <FullScreenLoadingIndicator style={[styles.flex1, styles.pRelative]} /> : <WorkspaceCardCreateAWorkspace />; App/src/pages/WorkspaceSwitcherPage/index.tsx Lines 152 to 168 in 5aa1c18
What alternative solutions did you explore? (Optional)ResultMonosnap.screencast.2024-11-20.02-08-54.mp4 |
Job added to Upwork: https://www.upwork.com/jobs/~021859258055635274316 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
Opened this up for proposals and I will also update the original post with the spinner solution. |
Edited by proposal-police: This proposal was edited at 2024-12-04 16:50:08 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Add spinning loader until full list of policies is successfully download on the client What is the root cause of that problem?New feature What changes do you think we should make in order to solve the problem?The workspace's empty state can confuse in some cases
We also need to do the same in
App/src/pages/WorkspaceSwitcherPage/index.tsx Line 152 in 5aa1c18
OPTIONAL: If we always want to show the spinner while OpenApp is calling even if the policy list isn't empty, we can add theFullScreenLoadingIndicator here if isLoadingReportData is true . otherwise, display this content.
App/src/pages/workspace/WorkspacesListPage.tsx Lines 429 to 430 in a37ff8b
What alternative solutions did you explore? (Optional)If we only want to display the spinner while the
|
Reviewing proposals... |
@JmillsExpensify, @parasharrajat Whoops! This issue is 2 days overdue. Let's get this updated quick! |
How's the proposal review going? |
📣 @twilight2294 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@JmillsExpensify Bump on this question? |
I will make a draft PR today until we wait for the answer @parasharrajat |
bump @JmillsExpensify for the question here |
bump @JmillsExpensify |
Apologies for the delay. No I don't think we want to show the spinner while the user is offline. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.80-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2025-01-13. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Payment summary:
|
Contributor paid out. @parasharrajat please complete the BZ checklist before requesting payment. I'll circle back for any regression test plus approval. |
Regression Test StepsTest 1:Precondition: Be on 3G / Slow internet
Test 2:Precondition: Be on 3G / Slow internet
Do you agree 👍 or 👎 ? |
Problem
In the scenario where an
OpenApp
call still hasn't successfully finished, we confusingly show the workspace empty state, prompting users to create a new workspace as if they didn't have any.Solution
Let's add a loading spinner or where an empty state (or a list of workspaces) would otherwise be.
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @JmillsExpensifyThe text was updated successfully, but these errors were encountered: