Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.58k stars 2.92k forks source link

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

Closed lanitochka17 closed 2 months ago

lanitochka17 commented 3 months ago

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?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/d08f5aa2-54ec-4d01-82c3-2bac3ed8e4cc

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
melvin-bot[bot] commented 3 months ago

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

github-actions[bot] commented 3 months ago

:wave: 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 commented 3 months ago

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

Krishna2323 commented 3 months ago

Regression from https://github.com/Expensify/App/pull/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.

https://github.com/Expensify/App/blob/5b83a4b929af705f6a8680d3422e5df3c6f6cef8/src/components/SelectionList/BaseSelectionList.tsx#L696-L701

https://github.com/Expensify/App/blob/5b83a4b929af705f6a8680d3422e5df3c6f6cef8/src/components/SelectionList/BaseSelectionList.tsx#L478-L486

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

What alternative solutions did you explore? (Optional)

Result

https://github.com/user-attachments/assets/f5b2c48e-0508-47c4-ab51-db6347d1d0b0

yuwenmemon commented 3 months ago

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

melvin-bot[bot] commented 3 months ago

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

melvin-bot[bot] commented 3 months ago

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

yuwenmemon commented 3 months ago

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

melvin-bot[bot] commented 3 months ago

πŸ“£ @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

melvin-bot[bot] commented 3 months ago

πŸ“£ @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 commented 3 months ago

@yuwenmemon, yep, just give me few minutes.

Krishna2323 commented 3 months ago

@yuwenmemon @dukenv0307, PR ready for review ^

Krishna2323 commented 3 months ago

@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.

https://github.com/Expensify/App/blob/5b83a4b929af705f6a8680d3422e5df3c6f6cef8/src/components/SelectionList/BaseSelectionList.tsx#L478-L486

https://github.com/Expensify/App/blob/b860a583ee25a142f90a4067679b43f56c7f8eba/src/pages/workspace/accounting/intacct/advanced/SageIntacctPaymentAccountPage.tsx#L54-L70

I have 2 solutions in my mind:

  1. We can default shouldShowListEmptyContent to true. https://github.com/Expensify/App/blob/414157d748ca966492794ac726337d296665403d/src/components/SelectionList/BaseSelectionList.tsx#L100
  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. https://github.com/Expensify/App/blob/414157d748ca966492794ac726337d296665403d/src/components/SelectionScreen.tsx#L157

@tienifr, can you please take a look?

dukenv0307 commented 3 months ago

@yuwenmemon Do we need C+ on this issue?

tienifr commented 3 months ago

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

Krishna2323 commented 3 months ago

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

yuwenmemon commented 3 months ago

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

melvin-bot[bot] commented 3 months ago

⚠️ 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 commented 3 months ago

Will create the new PR today.

Krishna2323 commented 3 months ago

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

Krishna2323 commented 2 months ago

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

Krishna2323 commented 2 months ago

@yuwenmemon, I think no one is assigned to handle the payments, can you please add the labels? πŸ™πŸ»

melvin-bot[bot] commented 2 months ago

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.

yuwenmemon commented 2 months ago

@trjExpensify Can you help with the payment?

trjExpensify commented 2 months ago

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 commented 2 months ago

I agree

trjExpensify commented 2 months ago

Great, settled up with you both. Closing!