Skip to content
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

[Awaiting payment some time in the past] [$250] Workspace switcher - Empty workspace switcher does not have "Create a workspace" modal #47525

Closed
6 tasks done
lanitochka17 opened this issue Aug 15, 2024 · 27 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 15, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.21-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in with a new account (account must have no workspace)
  3. Open workspace switcher

Expected Result:

The empty workspace switcher will have "Create a workspace" modal

Actual Result:

The empty workspace switcher does not have "Create a workspace" modal

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6573290_1723753657422.20240816_042526.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01720ac33ff733e428
  • Upwork Job ID: 1824216428360268213
  • Last Price Increase: 2024-08-15
  • Automatic offers:
    • dukenv0307 | Reviewer | 103545556
    • Krishna2323 | Contributor | 103545557
Issue OwnerCurrent Issue Owner: @dukenv0307
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

Triggered auto assignment to @yuwenmemon (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@Krishna2323
Copy link
Contributor

Krishna2323 commented Aug 15, 2024

Regression from #42413

Proposal

Please re-state the problem that we are trying to solve in this issue.

Workspace switcher - Empty workspace switcher does not have "Create a workspace" modal

What is the root cause of that problem?

WorkspaceSwitcherPage uses listFooterContent to render WorkspaceCardCreateAWorkspaceInstance but the selection list is not rendered when the list is empty.

{flattenedSections.allOptions.length === 0 ? (
renderListEmptyContent()
) : (
<>
{!listHeaderContent && header()}
<SectionList

const renderListEmptyContent = () => {
if (showLoadingPlaceholder) {
return <OptionsListSkeletonView shouldStyleAsTable={shouldUseUserSkeletonView} />;
}
if (shouldShowListEmptyContent) {
return listEmptyContent;
}
return null;
};

What changes do you think we should make in order to solve the problem?

  • We should use listEmptyContent={WorkspaceCardCreateAWorkspaceInstance} & shouldShowListEmptyContent={shouldShowCreateWorkspace} props.
  • We should also check for other components which uses listFooterContent and listEmptyContent.

What alternative solutions did you explore? (Optional)

Result

Monosnap.screencast.2024-08-16.02-59-50.mp4

@yuwenmemon
Copy link
Contributor

@Krishna2323 LGTM, thanks for identifying the regression as well. cc @tienifr

@yuwenmemon yuwenmemon added the External Added to denote the issue can be worked on by a contributor label Aug 15, 2024
@melvin-bot melvin-bot bot changed the title Workspace switcher - Empty workspace switcher does not have "Create a workspace" modal [$250] Workspace switcher - Empty workspace switcher does not have "Create a workspace" modal Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01720ac33ff733e428

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @dukenv0307 (External)

@yuwenmemon
Copy link
Contributor

@Krishna2323 Are you able to spin up a PR for CP ASAP?

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Aug 15, 2024

📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@Krishna2323
Copy link
Contributor

@yuwenmemon, yep, just give me few minutes.

@Krishna2323
Copy link
Contributor

@yuwenmemon @dukenv0307, PR ready for review ^

@Krishna2323
Copy link
Contributor

@yuwenmemon, sorry for the delay, I found that there are 25 components that uses listEmptyContent prop without shouldShowListEmptyContent. Due to this, the empty component will never be shown according to the logic below.

const renderListEmptyContent = () => {
if (showLoadingPlaceholder) {
return <OptionsListSkeletonView shouldStyleAsTable={shouldUseUserSkeletonView} />;
}
if (shouldShowListEmptyContent) {
return listEmptyContent;
}
return null;
};

<SelectionScreen
policyID={policyID}
featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED}
displayName={SageIntacctPaymentAccountPage.displayName}
sections={vendorSelectorOptions.length ? [{data: vendorSelectorOptions}] : []}
listItem={RadioListItem}
onSelectRow={updateDefaultVendor}
initiallyFocusedOptionKey={vendorSelectorOptions.find((mode) => mode.isSelected)?.keyForList}
onBackButtonPress={() => Navigation.goBack(ROUTES.POLICY_ACCOUNTING_SAGE_INTACCT_ADVANCED.getRoute(policyID))}
title="workspace.sageIntacct.paymentAccount"
listEmptyContent={listEmptyContent}
connectionName={CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT}
pendingAction={settingsPendingAction([CONST.SAGE_INTACCT_CONFIG.REIMBURSEMENT_ACCOUNT_ID], config?.pendingFields)}
errors={ErrorUtils.getLatestErrorField(config ?? {}, CONST.SAGE_INTACCT_CONFIG.REIMBURSEMENT_ACCOUNT_ID)}
errorRowStyles={[styles.ph5, styles.pv3]}
onClose={() => Policy.clearSageIntacctErrorField(policyID, CONST.SAGE_INTACCT_CONFIG.REIMBURSEMENT_ACCOUNT_ID)}
/>

I have 2 solutions in my mind:

  1. We can default shouldShowListEmptyContent to true.
    shouldShowListEmptyContent = false,
  2. All 25 components pass the listEmptyContent to SelectionScreen, which then passes it to SelectionList. We can introduce a new prop (shouldShowListEmptyContent) inside SelectionScreen and default it to true and then pass the prop to SelectionList.
    listFooterContent={listFooterContent}

@tienifr, can you please take a look?

@dukenv0307
Copy link
Contributor

@yuwenmemon Do we need C+ on this issue?

@tienifr
Copy link
Contributor

tienifr commented Aug 16, 2024

@Krishna2323 Thanks for bumping me. I think we can go with option 1, can you create the PR for that?

@Krishna2323
Copy link
Contributor

@tienifr, thanks for confirming. I will raise a PR for that.

@yuwenmemon yuwenmemon removed the DeployBlockerCash This issue or pull request should block deployment label Aug 16, 2024
@yuwenmemon
Copy link
Contributor

@Krishna2323 Thanks! I'll take this out of review while we work on the larger scoped issue.

@yuwenmemon yuwenmemon added Daily KSv2 and removed Reviewing Has a PR in review Weekly KSv2 labels Aug 16, 2024
Copy link

melvin-bot bot commented Aug 17, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@Krishna2323
Copy link
Contributor

Will create the new PR today.

@melvin-bot melvin-bot bot added the Overdue label Aug 19, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Overdue labels Aug 20, 2024
@Krishna2323
Copy link
Contributor

@yuwenmemon PR ready for review ^, I think @dukenv0307 will review this, right?

@Krishna2323
Copy link
Contributor

@yuwenmemon, PR was deployed to production in 27th Aug, this will be ready for payments tomorrow.

@Krishna2323
Copy link
Contributor

@yuwenmemon, I think no one is assigned to handle the payments, can you please add the labels? 🙏🏻

@yuwenmemon yuwenmemon added the Bug Something is broken. Auto assigns a BugZero manager. label Sep 9, 2024
Copy link

melvin-bot bot commented Sep 9, 2024

Triggered auto assignment to @trjExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 9, 2024
@yuwenmemon
Copy link
Contributor

@trjExpensify Can you help with the payment?

@trjExpensify trjExpensify added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Sep 9, 2024
@trjExpensify trjExpensify changed the title [$250] Workspace switcher - Empty workspace switcher does not have "Create a workspace" modal [Awaiting payment some time in the past] [$250] Workspace switcher - Empty workspace switcher does not have "Create a workspace" modal Sep 9, 2024
@trjExpensify
Copy link
Contributor

Yeah bwoii!

Payment summary as follows:

I note the deploy blocker comment from melvin, but @yuwenmemon @dukenv0307 you agree with @Krishna2323's comment here that states that wasn't a DB from this PR?

@dukenv0307
Copy link
Contributor

I agree

@trjExpensify
Copy link
Contributor

Great, settled up with you both. Closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

6 participants