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

[$500] Room-Scrolled up members list scrolled down in admins account everytime message received #31110

Closed
5 of 6 tasks
izarutskaya opened this issue Nov 9, 2023 · 36 comments
Closed
5 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@izarutskaya
Copy link

izarutskaya commented Nov 9, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.3.97-1
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: Applause-Internal Team
Slack conversation: @

Action Performed:

  1. Launch app
  2. Tap on a room with many members
  3. Tap on header
  4. Tap members
  5. Scroll up the page and note last contact
  6. Go to https://staging.new.expensify.com/
    in other device
  7. Login in as member who is shown in last in room members list while scrolled up
  8. Tap on room
  9. Send a message
  10. Note - Admin room members list page scrolled down everytime user sends a message
  11. Navigate back to Room and note new message received
  12. Again tap header--Members
  13. Scroll up the page
  14. From members account, as mentioned in step 9 again send a message
  15. Note - Admin room members list page now got scrolled down
  16. Navigate back to room and verify new message received

Expected Result:

Scrolled up members list must not scrolled down in admins account when message is sent from invited user account.

Actual Result:

Scrolled up members list scrolled down in admins account everytime message is sent from invited user account.

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

Bug6269768_1699525155057.last_user.mp4
Bug6269768_1699525081372.room_scrolled.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01198909fcc1f7f42d
  • Upwork Job ID: 1722573758151155712
  • Last Price Increase: 2024-03-28
@izarutskaya izarutskaya 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 Nov 9, 2023
@melvin-bot melvin-bot bot changed the title Room-Scrolled up members list scrolled down in admins account everytime message received [$500] Room-Scrolled up members list scrolled down in admins account everytime message received Nov 9, 2023
Copy link

melvin-bot bot commented Nov 9, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01198909fcc1f7f42d

Copy link

melvin-bot bot commented Nov 9, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 9, 2023
Copy link

melvin-bot bot commented Nov 9, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Nov 9, 2023

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

@dummy-1111
Copy link
Contributor

dummy-1111 commented Nov 9, 2023

Proposal

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

Scrolled up members list is scrolled down every time message received

What is the root cause of that problem?

When a message is received, RoomMembersPage is re-rendered, and the data is recalculated as you can see below

const data = getMemberOptions();

When section data is changed, we set focus to the first item and scroll to it

useEffect(() => {
// do not change focus on the first render, as it should focus on the selected item
if (firstLayoutRef.current) {
return;
}
// set the focus on the first item when the sections list is changed
if (sections.length > 0) {
updateAndScrollToFocusedIndex(0);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [sections]);

This is the root cause

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

As mentioned above, we set focus to the first item and scroll to it when section data is changed. This isn't an intended behavior. This was added to focus and scroll to the first item when search(PR #30438 for issue #29080)

This isn't correct. This fix causes the selection list focus and scroll to the first item every time section data changes. We only need to focus and scroll to the first item when sections data is changed by changing search value.

Update the dependency to [textInputValue] would fix this issue

    useEffect(() => {
        // do not change focus on the first render, as it should focus on the selected item
        if (firstLayoutRef.current) {
            return;
        }

        // set the focus on the first item when the sections list is changed
        if (sections.length > 0) {
            updateAndScrollToFocusedIndex(0);
        }
        // eslint-disable-next-line react-hooks/exhaustive-deps
    }, [textInputValue]);

Note: Of course, we can use React.memo and useMemo not to recalculate the sections data when unrelated data of report is changed, but this can't solve the issue. Focusing and scrolling happen even when you select/unselect the option in members list because sections data is needed to be recalculated in this case. I think the above solution is the best option

Result
31110.mp4

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Nov 13, 2023
@abdulrahuman5196
Copy link
Contributor

Hi, Will review again today, just back from weekend

@melvin-bot melvin-bot bot removed the Overdue label Nov 13, 2023
@abdulrahuman5196
Copy link
Contributor

abdulrahuman5196 commented Nov 13, 2023

@zanyrenney Multiple contributors pointed this issue as an regression from #29080.

could you kindly put this issue on hold for #29080?

@dummy-1111
Copy link
Contributor

@abdulrahuman5196

This is a general issue of SelectionList, not specific to timezone list. I think we can solve the issue here
My solution solves both #29080 and this issue

Copy link

melvin-bot bot commented Nov 16, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Nov 16, 2023
@zanyrenney zanyrenney changed the title [$500] Room-Scrolled up members list scrolled down in admins account everytime message received [ON HOLD] [$500] Room-Scrolled up members list scrolled down in admins account everytime message received Nov 16, 2023
@zanyrenney zanyrenney removed the Daily KSv2 label Nov 16, 2023
@melvin-bot melvin-bot bot added Monthly KSv2 and removed Overdue labels Nov 20, 2023
Copy link

melvin-bot bot commented Nov 23, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

3 similar comments
Copy link

melvin-bot bot commented Nov 30, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Dec 7, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Dec 14, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Dec 21, 2023
Copy link

melvin-bot bot commented Dec 21, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Dec 28, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

4 similar comments
Copy link

melvin-bot bot commented Jan 4, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Jan 11, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Jan 18, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Jan 25, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Jan 25, 2024
@zanyrenney
Copy link
Contributor

ON HOLD.

@melvin-bot melvin-bot bot removed the Overdue label Jan 25, 2024
Copy link

melvin-bot bot commented Feb 1, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

3 similar comments
Copy link

melvin-bot bot commented Feb 8, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Feb 15, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Feb 22, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Feb 26, 2024
@zanyrenney
Copy link
Contributor

ON HOLD.

@melvin-bot melvin-bot bot removed the Overdue label Feb 27, 2024
Copy link

melvin-bot bot commented Feb 29, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

4 similar comments
Copy link

melvin-bot bot commented Mar 7, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Mar 14, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Mar 21, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Mar 28, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Apr 1, 2024
@zanyrenney
Copy link
Contributor

ON HOLD>

@melvin-bot melvin-bot bot removed the Overdue label Apr 2, 2024
@zanyrenney
Copy link
Contributor

The related issue is now closed, so I think we are good to take this off hold.

@zanyrenney zanyrenney added Daily KSv2 and removed Monthly KSv2 labels Apr 4, 2024
@zanyrenney zanyrenney changed the title [ON HOLD] [$500] Room-Scrolled up members list scrolled down in admins account everytime message received [$500] Room-Scrolled up members list scrolled down in admins account everytime message received Apr 4, 2024
@zanyrenney
Copy link
Contributor

retesting!

@zanyrenney
Copy link
Contributor

I cannot reproduce this anymore - good news! 🎉 I will close it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

4 participants