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

[$250] #admin rooms opens scrolled to the bottom of the page #55467

Closed
1 of 8 tasks
m-natarajan opened this issue Jan 20, 2025 · 10 comments
Closed
1 of 8 tasks

[$250] #admin rooms opens scrolled to the bottom of the page #55467

m-natarajan opened this issue Jan 20, 2025 · 10 comments
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

@m-natarajan
Copy link

m-natarajan commented Jan 20, 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: 9.0.87-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @quinthar
Slack conversation (hyperlinked to channel name): convert

Action Performed:

  1. Open #admin room

Expected Result:

Should always open scrolled to the oldest unread message, in case if this is the first message should scroll to the top

Actual Result:

But always opening scrolled to the bottom

Workaround:

unknown

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence
Recording.908.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021884485500695569294
  • Upwork Job ID: 1884485500695569294
  • Last Price Increase: 2025-01-29
Issue OwnerCurrent Issue Owner: @s77rt
@m-natarajan m-natarajan added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Jan 20, 2025
Copy link

melvin-bot bot commented Jan 20, 2025

Triggered auto assignment to @adelekennedy (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 the Overdue label Jan 22, 2025
Copy link

melvin-bot bot commented Jan 23, 2025

@adelekennedy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Jan 27, 2025

@adelekennedy 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@adelekennedy adelekennedy added the External Added to denote the issue can be worked on by a contributor label Jan 29, 2025
Copy link

melvin-bot bot commented Jan 29, 2025

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

@melvin-bot melvin-bot bot changed the title #admin rooms opens scrolled to the bottom of the page [$250] #admin rooms opens scrolled to the bottom of the page Jan 29, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 29, 2025
Copy link

melvin-bot bot commented Jan 29, 2025

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

@adelekennedy
Copy link

reproduced

@melvin-bot melvin-bot bot removed the Overdue label Jan 29, 2025
@FitseTLT
Copy link
Contributor

FitseTLT commented Jan 31, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-01-31 23:57:10 UTC.

Proposal

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

#admin rooms opens scrolled to the bottom of the page

What is the root cause of that problem?

We currently always scroll to bottom unless there is linked report action

useEffect(() => {
if (linkedReportActionID) {
return;
}
InteractionManager.runAfterInteractions(() => {
setIsFloatingMessageCounterVisible(false);
reportScrollManager.scrollToBottom();
});
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
}, []);

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

We should scrollTo the index of the unreadMarkerReportActionID so change it to

InteractionManager.runAfterInteractions(() => {
            setIsFloatingMessageCounterVisible(false);
            if (unreadMarkerReportActionID) {
                const index = sortedVisibleReportActions.findIndex((action) => action.reportActionID === unreadMarkerReportActionID);
                reportScrollManager.scrollToIndex(index);
                return;
            }
            reportScrollManager.scrollToBottom();
        });

We can additionally also utilize viewPosition param of scrollToIndex to control the exact position the unread report action is displayed on the view.

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

N/A

What alternative solutions did you explore? (Optional)

We can also optionally pass unreadMarkerReportActionID to initialScrollKey as a fallback to reportActionID and disable the scrollToBottom code when there is unread report action to achieve the scrolling similar to linked report action

initialScrollKey={reportActionID}

                    initialScrollKey={reportActionID ?? unreadMarkerReportActionID}

@melvin-bot melvin-bot bot added the Overdue label Jan 31, 2025
@s77rt
Copy link
Contributor

s77rt commented Feb 1, 2025

Started discussion on slack https://expensify.slack.com/archives/C01GTK53T8Q/p1738418444919069

@melvin-bot melvin-bot bot removed the Overdue label Feb 1, 2025
Copy link

melvin-bot bot commented Feb 3, 2025

@s77rt @adelekennedy this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@s77rt
Copy link
Contributor

s77rt commented Feb 3, 2025

Turns out this is a dupe #35011. Let's close this cc @adelekennedy

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
Development

No branches or pull requests

4 participants