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

[HOLD component refactoring] [$500] [LOW] Green circular loading does not appear when searching for a contact in request money flow #37144

Closed
1 of 6 tasks
m-natarajan opened this issue Feb 23, 2024 · 54 comments
Assignees
Labels
External Added to denote the issue can be worked on by a contributor Monthly KSv2 NewFeature Something to build that is a new item. Not a priority Reviewing Has a PR in review

Comments

@m-natarajan
Copy link

m-natarajan commented Feb 23, 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: 1.4.43-14
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @brunovjk
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1708081508978019

Action Performed:

  1. Click + and select Request money
  2. Enter amount and click next
  3. Search for any contact in the field

Expected Result:

Green circular loading ring is seen like when we search for a contact to chat

Actual Result:

Not appearing when searching in Request money flow

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

Recording.2773.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01788bcdaa345e5022
  • Upwork Job ID: 1761057209378701312
  • Last Price Increase: 2024-02-23
@m-natarajan m-natarajan added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 23, 2024
Copy link

melvin-bot bot commented Feb 23, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01788bcdaa345e5022

@melvin-bot melvin-bot bot changed the title Green circular loading does not appear when searching for a contact in request money flow [$500] Green circular loading does not appear when searching for a contact in request money flow Feb 23, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 23, 2024
Copy link

melvin-bot bot commented Feb 23, 2024

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

Copy link

melvin-bot bot commented Feb 23, 2024

Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@FitseTLT
Copy link
Contributor

FitseTLT commented Feb 23, 2024

Proposal

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

Green circular loading does not appear when searching for a contact in request money flow

What is the root cause of that problem?

We are not passing isLoadingNewOptions prop to the selection list for participants here

<SelectionList
onConfirm={handleConfirmSelection}

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

We should be passing isLoadingNewOptions prop to the selection list as for search page here

isLoadingNewOptions={isSearchingForReports}
/>

after subscribing to it as in here
isSearchingForReports: {
key: ONYXKEYS.IS_SEARCHING_FOR_REPORTS,
initWithStoredValues: false,
},
})(SearchPage);

What alternative solutions did you explore? (Optional)

@brunovjk
Copy link
Contributor

brunovjk commented Feb 23, 2024

Proposal

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

When making a Request money, the circular loading does not appear when we search for contact

What is the root cause of that problem?

We are not setting isLoadingNewOptions correctly in MoneyTemporaryForRefactorRequestParticipantsSelector like we do in SearchPage.

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

We need to get isSearchingForReports from onyx and use it in MoneyTemporaryForRefactorRequestParticipantsSelector SelectionList

What alternative solutions did you explore? (Optional)

@brunovjk

This comment was marked as outdated.

@dukenv0307
Copy link
Contributor

Proposal

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

  1. Green circular loading not appearing when searching in Request money flow
  2. Skeleton loading appears when searching in the Send money flow but doesn't appear in the Request money flow

What is the root cause of that problem?

  1. We don't have isLoadingNewOptions={isSearchingForReports} in here like the NewChatPage, so the loading indicator does not show.

  2. In the Send money flow here, we have the Skeleton loading whenever the user types something to search in the search input, this is inconsistent with the Request money flow where the Skeleton doesn't appear in this case (it only appears initially when first loading the list). This is because in Request money we have a different logic to show the skeleton placeholder based on the didScreenTransitionEnd and isOptionsDataReady here

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

  1. We need to connect to Onyx ONYXKEYS.IS_SEARCHING_FOR_REPORTS there and adds isLoadingNewOptions={isSearchingForReports} here

We need to do the same thing in the MoneyRequestParticipantsSelector too (For the Send money flow)

  1. If we want the behavior in Request money page (not showing skeleton placeholder when searching), in Send money page we should update this to follow the same logic as in Request money page here. If instead we want to show skeleton placeholder when searching like Send money page, update request money page here to use isSearchingForReports similar to Send money page.

What alternative solutions did you explore? (Optional)

NA

@mollfpr
Copy link
Contributor

mollfpr commented Feb 23, 2024

Just a head-ups! I'll be reviewing the proposal from @brunovjk first since the posted the proposal along side with this bug report. Context: https://expensify.slack.com/archives/C01GTK53T8Q/p1708081508978019

@jliexpensify
Copy link
Contributor

Posted to the Wave6 channel - https://expensify.slack.com/archives/C02MW39LT9N/p1708908540463509

@mollfpr
Copy link
Contributor

mollfpr commented Feb 26, 2024

Thank you guys for your patience!

The proposal from @brunovjk looks good to me! I'm also inclined to update MoneyRequestParticipantsSelector to have isLoadingNewOptions, so we can get the same behavior for the send money flow.

🎀 👀 🎀 C+ reviewed!

Copy link

melvin-bot bot commented Feb 26, 2024

Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@dukenv0307
Copy link
Contributor

@mollfpr There's also a similar issue with the loading skeleton in both pages (number 2 in my proposal). The selected proposal won't fix that.

@mollfpr Can you provide some feedback on my proposal, which fixes both issues.

Thank you!

@mollfpr
Copy link
Contributor

mollfpr commented Feb 26, 2024

My consideration is the main issue here is the MoneyTemporaryForRefactorRequestParticipantsSelector missing isLoadingNewOptions. So basically the proposal from @brunovjk has solved the issue, and the other proposal seems doing the same.

Yes, your proposal has an addition to fix the send money flow, but because it's not the main issue, the fix is pretty similar. So I don't think it's fair for another contributor that focus only on the main problem here.

I let @lakchote decide who's gonna work on this issue.

@dukenv0307
Copy link
Contributor

dukenv0307 commented Feb 26, 2024

Yes, your proposal has an addition to fix the send money flow, but because it's not the main issue, the fix is pretty similar. So I don't think it's fair for another contributor that focus only on the main problem here.

@mollfpr I think proposals should be as thorough as possible and not solely limited to only the issue's OP, we don't want to leave bugs behind in the flows we're fixing. The fix is completely different IMO since it's related to the Skeleton, not the Green loading indicator, and it doesn't use isSearchingForReports. It also is not something that could be discovered and fixed during PR review so could be considered substantially different from the selected proposal.

  • If we decide to fix only the main issue of Green circular loading here, I agree it'd be fair to go with the selected proposal.
  • If we decide to fix both issues regarding loading behavior in the pages as stated in my proposal. I think my proposal would be a better and more fair choice (without it the 2nd issue will never be discovered and fixed).
    (A similar case was here where we want to leaves the app/code in a better place than it was before)

Let's wait for @lakchote 's take on the scope of this issue and who to assign.

@brunovjk
Copy link
Contributor

brunovjk commented Feb 26, 2024

@mollfpr Thanks for the review.

In the Send money flow here, we have the Skeleton loading whenever the user types something to search

I didn't mention this because I thought it was out of scope of this issue. I dont think we are going to use MoneyRequestParticipantsSelector. If I'm not mistaken, we are still refactoring SendMoney flow and we can deal with that later :D
I have context on this transition and refactoring: #32665, That's why I reported this bug in the first place. I can "update MoneyRequestParticipantsSelector to have isLoadingNewOptions, so we can get the same behavior for the send money flow." if deemed necessary.

@dukenv0307
Copy link
Contributor

If I'm not mistaken, we are still refactoring Selection List SendMoney flow and we can deal with that later :D

We won't remember/keep track of this to do it. Better to have correct behavior before the refactor, and keep the behavior correct after the refactor.

Let's minimize discussions and wait for @lakchote's final decision on issue scope and assignment

@greg-schroeder greg-schroeder added NewFeature Something to build that is a new item. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Feb 26, 2024
Copy link

melvin-bot bot commented Feb 26, 2024

Current assignee @jliexpensify is eligible for the NewFeature assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Feb 26, 2024
@greg-schroeder greg-schroeder changed the title [$500] Green circular loading does not appear when searching for a contact in request money flow [$500] [LOW] Green circular loading does not appear when searching for a contact in request money flow Feb 26, 2024
@lakchote lakchote changed the title [$500] [LOW] Green circular loading does not appear when searching for a contact in request money flow [HOLD component refactoring] [$500] [LOW] Green circular loading does not appear when searching for a contact in request money flow Mar 12, 2024
@lakchote
Copy link
Contributor

I do agree about splitting the issue to be specific on the problem we're solving.

Let's solve them both.

I've put this on hold then, and once the new component will be in place we'll resume work for it.

@brunovjk
Copy link
Contributor

brunovjk commented Apr 4, 2024

Pages that use SelectionList to handle a options list Skeleton Green Circular
- Search page
Search.page.-.skeleton.mp4
Search.page.-.circular.mp4
- New chat
❌ should be fixed here
New.chat.-.skeleton.mp4
New.chat.-.circular.mp4
New room chat - RoomInvitePage - Press "Start chat"
- Select "Room"
- Fill the name and create a room
- Open room details
- Press "Members"
- Press "Invite"
New.room.chat.-.skeleton.mp4
New.room.chat.-.circular.mp4
- Request money
Request.money.-.skeleton.mp4
Request.money.-.circular.mp4
- Send money
Send.money.-.skeleton.mp4
Send.money.-.circular.mp4
- Assign task
Assign.task.-.skeleton.mp4
Assign.task.-.circular.mp4
Assign task - share somewhere - Press "Assign task"
- Fill the title and press "Next"
- Press "Share somewhere"
Assign.task.-.share.somewhere.-.skeleton.mp4
Assign.task.-.share.somewhere.-.circular.mp4
Invite to workspace - Open "Choose a workspace"
- Press "+" button
- Go to "Members"
- Press "Invite member"
Invite.to.workspace.-.skeleton.mp4
Invite.to.workspace.-.circular.mp4
Share logs - Go to Settings -> About -> Troubleshoot
- Enable "Client Side logging"
- Press "Debug console"
- Press "Share log"
Share.logs.-.skeleton.mp4
Share.logs.-.circular.mp4
  1. I think the Skeleton issue still requires hold. Can we fix them all together in a separate issue/PR later? Since it has different root causes (didScreenTransitionEnd + "loading searchable lists by caching the options") from this issue.

  2. For the Green Circular loading (this issue), I can updat my PR to include all cases. NewChatPage still uses OptionsSelector we could wait Replace OptionsSelector with SelectionList to move on, but I think we are good here, since the green circular on the NewChatPage is working now and should keep working after refactor.

@mollfpr @lakchote @mountiny @dukenv0307 Thoughts?

@mountiny
Copy link
Contributor

mountiny commented Apr 4, 2024

I am up for unifying this

@lakchote
Copy link
Contributor

lakchote commented Apr 5, 2024

I am up for unifying this

I agree with @mountiny 👍

@brunovjk
Copy link
Contributor

brunovjk commented Apr 5, 2024

Sorry but what do you mean by 'unifying this'? Are we focusing on all instances of Green Circular or merging Skeleton and Green Circular issues?

@dukenv0307
Copy link
Contributor

I think:
@brunovjk can raise the PR to fix all Green Circular cases now.

And I can raise a subsequent PR to fix all the Skeleton cases later when it's off hold.

@jliexpensify
Copy link
Contributor

@mountiny and @lakchote if this is fine, I assume we'll have 2x $500 payments for @brunovjk and @dukenv0307?

@mountiny
Copy link
Contributor

mountiny commented Apr 8, 2024

Unifying means as you wrote:

For the Green Circular loading (this issue), I can update my #37842 to include all cases.

Just making sure the green loading works same everywhere we would expect this

@brunovjk
Copy link
Contributor

brunovjk commented Apr 8, 2024

Im on it

@brunovjk
Copy link
Contributor

PR ready for review

@melvin-bot melvin-bot bot removed the Weekly KSv2 label May 7, 2024
Copy link

melvin-bot bot commented May 7, 2024

This issue has not been updated in over 15 days. @lakchote, @mollfpr, @jliexpensify, @brunovjk eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label May 7, 2024
@brunovjk
Copy link
Contributor

brunovjk commented May 7, 2024

PR was merged, but not to staging yet

Edit: PR on staging PR on production

@jliexpensify
Copy link
Contributor

jliexpensify commented May 16, 2024

Payment Summary

NEW UPWORKS JOB

@lakchote
Copy link
Contributor

Payment Summary

Is this correct? I'll need to create a new Upworks job.

This is correct for @mollfpr and @brunovjk! However not for @dukenv0307 as his PR for handling skeleton cases isn't ready, so no payment is due yet.

@jliexpensify
Copy link
Contributor

@lakchote, thanks for checking! I assume I will be paying @dukenv0307 via this job, so we'll need to keep this open?

@jliexpensify
Copy link
Contributor

NEW UPWORKS JOB

@jliexpensify
Copy link
Contributor

Paid @brunovjk

@JmillsExpensify
Copy link

$500 approved for @mollfpr

@jliexpensify
Copy link
Contributor

Note for myself: waiting to pay @dukenv0307

@jliexpensify
Copy link
Contributor

@lakchote feel free to bump me when @dukenv0307 needs payment.

@brunovjk
Copy link
Contributor

brunovjk commented Jun 14, 2024

@lakchote What do you think about close this issue and open another suitable one to deal with skeleton loading in SelectionList?
Keep things organized. Since they have different causes, solutions, assignee and payments. I can help with the issue report if needed.

@melvin-bot melvin-bot bot closed this as completed Aug 12, 2024
Copy link

melvin-bot bot commented Aug 12, 2024

@lakchote, @mollfpr, @jliexpensify, @brunovjk, this Monthly task hasn't been acted upon in 6 weeks; closing.

If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Added to denote the issue can be worked on by a contributor Monthly KSv2 NewFeature Something to build that is a new item. Not a priority Reviewing Has a PR in review
Projects
No open projects
Development

No branches or pull requests

10 participants