Skip to content

[Due for payment 2025-03-24] [$250] ioS mWeb-Track expense - The page doesn't auto-scroll down after creating track expense #57379

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

Closed
1 of 8 tasks
mitarachim opened this issue Feb 25, 2025 · 25 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 External Added to denote the issue can be worked on by a contributor

Comments

@mitarachim
Copy link

mitarachim commented Feb 25, 2025

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: v9.1.5-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
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): n/a
Issue reported by: Applause Internal Team
Device used: iPhone 13/Safari/Chrome
App Component: Chat Report View

Action Performed:

  1. Navigate to https://staging.new.expensify.com
  2. Open a SelfDM
    3.Create a track expense

Expected Result:

The page is auto-scrolls down after creating track expense

Actual Result:

The page doesn't auto-scroll down after creating track expense

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6753273_1740456701032.ScreenRecording_02-24-2025_23-05-11_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021895068233418155876
  • Upwork Job ID: 1895068233418155876
  • Last Price Increase: 2025-02-27
  • Automatic offers:
    • huult | Contributor | 106401715
Issue OwnerCurrent Issue Owner: @laurenreidexpensify
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Feb 25, 2025
Copy link

melvin-bot bot commented Feb 25, 2025

Triggered auto assignment to @laurenreidexpensify (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.

@mitarachim
Copy link
Author

This issue reproduce in iOS/mWeb/chrome.
not reproduce in Android/mWeb/chrome.

ScreenRecording_02-25-2025.13-52-55_1.MP4

@melvin-bot melvin-bot bot added the Overdue label Feb 27, 2025
@laurenreidexpensify laurenreidexpensify changed the title mWeb-Track expense - The page doesn't auto-scroll down after creating track expense ioS mWeb-Track expense - The page doesn't auto-scroll down after creating track expense Feb 27, 2025
@laurenreidexpensify laurenreidexpensify added the External Added to denote the issue can be worked on by a contributor label Feb 27, 2025
Copy link

melvin-bot bot commented Feb 27, 2025

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

@melvin-bot melvin-bot bot changed the title ioS mWeb-Track expense - The page doesn't auto-scroll down after creating track expense [$250] ioS mWeb-Track expense - The page doesn't auto-scroll down after creating track expense Feb 27, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 27, 2025
Copy link

melvin-bot bot commented Feb 27, 2025

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

@huult
Copy link
Contributor

huult commented Mar 1, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-03-01 08:34:26 UTC.

Proposal

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

The page doesn't auto-scroll down after creating track expense

What is the root cause of that problem?

Due to scrollToBottom running before the DOM updates, this issue occurs, preventing it from scrolling to the bottom.

reportScrollManager.scrollToBottom();

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

To resolve this issue, we use requestAnimationFrame, which ensures execution after layout updates, making the scroll effective. This solution is widely used in many places.

reportScrollManager.scrollToBottom();

update to

    requestAnimationFrame(() => {
        reportScrollManager.scrollToBottom();
    });
Screen.Recording.2025-03-01.at.15.28.30.mov

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

We scroll to the bottom in onLayout to ensure the layout is updated.

  1. Create new state
const [isEableScrollToBottom, setIsEableScrollToBottom] = useState(false);
  1. Enable scroll to bottom for current user action

reportScrollManager.scrollToBottom();

add to:

  setIsEableScrollToBottom(true);
  1. Call scroll to bottom when onLayout excuted

Update to:

       onLayout(event);

        if (isEableScrollToBottom) {
            reportScrollManager.scrollToBottom();
            setIsEableScrollToBottom(false);
        }

@laurenreidexpensify
Copy link
Contributor

@rojiphil bump for review ^^

@melvin-bot melvin-bot bot added the Overdue label Mar 3, 2025
@rojiphil
Copy link
Contributor

rojiphil commented Mar 3, 2025

Thanks @huult for the proposal. I do not like the requestAnimationFrame approach as it simply uses delay hoping that the list is updated by the time scrollToBottom is called. But I like the alternate solution to scroll to the bottom via state at the time of rendering the updated list.
@huult proposal with the alternate solution LGTM.
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Mar 3, 2025

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

@dylanexpensify dylanexpensify moved this to Bugs and Follow Up Issues in #expensify-bugs Mar 4, 2025
@melvin-bot melvin-bot bot added Overdue and removed Help Wanted Apply this label when an issue is open to proposals by contributors labels Mar 5, 2025
Copy link

melvin-bot bot commented Mar 5, 2025

📣 @huult 🎉 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review and removed Daily KSv2 labels Mar 6, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Overdue labels Mar 6, 2025
Copy link

melvin-bot bot commented Mar 14, 2025

⚠️ 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.

@rojiphil
Copy link
Contributor

@huult Something has changed after our PR that has resulted even our fix to not work. Can you please check?

@huult
Copy link
Contributor

huult commented Mar 14, 2025

@rojiphil can you share your screenshot?

@rojiphil
Copy link
Contributor

Here are the test videos. Please check

Post our PR Fix here
57379-PR-Fix.mp4
Post Regression Fix PR
58469-PR-Fix.mp4

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 17, 2025
@melvin-bot melvin-bot bot changed the title [$250] ioS mWeb-Track expense - The page doesn't auto-scroll down after creating track expense [Due for payment 2025-03-24] [$250] ioS mWeb-Track expense - The page doesn't auto-scroll down after creating track expense Mar 17, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 17, 2025
Copy link

melvin-bot bot commented Mar 17, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Mar 17, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.13-5 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-03-24. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Mar 17, 2025

@rojiphil @laurenreidexpensify @rojiphil The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@huult
Copy link
Contributor

huult commented Mar 17, 2025

@rojiphil After our PR, another PR related to scrolling was created by someone else. I will check it ASAP

@huult
Copy link
Contributor

huult commented Mar 20, 2025

@rojiphil On main branch, the scroll issue is fixed! Does it still occur on your side?

Screen.Recording.2025-03-21.at.00.26.08.mov

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 24, 2025
@laurenreidexpensify
Copy link
Contributor

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment:

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion:

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal Template
  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

Test:

Do we agree 👍 or 👎

@laurenreidexpensify
Copy link
Contributor

@rojiphil bump for checklist thanks

@huult
Copy link
Contributor

huult commented Mar 26, 2025

@rojiphil bump for checklist thanks

@rojiphil
Copy link
Contributor

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production
  • 2b. Reported on staging (deploy blocker)
  • 2c. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment:

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion: Not Required. The existing checklist is good enough to capture such issues.

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal

Precondition:

Test:

  1. Open a SelfDM.
  2. Create a track expense.
  3. Verify that the page auto-scrolls down after track expense creation.

Do we agree 👍 or 👎

@rojiphil
Copy link
Contributor

@laurenreidexpensify Checklist done. Sorry for the delay here.

@laurenreidexpensify
Copy link
Contributor

Payment Summary:

  • C+ $250 @rojiphil requires payment through NewDot Manual Requests
  • Contributor $250 @huult paid via Upwork

@melvin-bot melvin-bot bot removed the Overdue label Mar 27, 2025
@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in #expensify-bugs Mar 27, 2025
@garrettmknight
Copy link
Contributor

$250 approved for @rojiphil

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 External Added to denote the issue can be worked on by a contributor
Projects
Status: Done
Development

No branches or pull requests

6 participants