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

[Search v2.2] mWeb/Chrome Search-Navigate back to the top of messages instead of the selected message #49923

Closed
1 of 6 tasks
lanitochka17 opened this issue Sep 30, 2024 · 26 comments
Assignees

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 30, 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: 9.0.41
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
Issue reported by: Applause - Internal Team

Issue found when executing PR #49641

Action Performed:

  1. Go to Search option from bottom tab
  2. Tap on "Chat" type from LHP
  3. Tap on any message from the rendered results
  4. When the chat is opened, refresh the browser
  5. Tap on the back button

Expected Result:

The app goes back to the message I tapped on before

Actual Result:

The app redirects to the top of messages instead of returning to the previously selected message

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

Bug6618990_1727574225145.49641-mWeb.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 30, 2024
Copy link

melvin-bot bot commented Sep 30, 2024

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.

@lanitochka17 lanitochka17 removed Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 30, 2024
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Sep 30, 2024
Copy link

melvin-bot bot commented Sep 30, 2024

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

Copy link
Contributor

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

@luacmartins
Copy link
Contributor

I think we can demote this to NAB

@luacmartins luacmartins added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels Sep 30, 2024
@luacmartins luacmartins changed the title mWeb/Chrome Search-Navigate back to the top of messages instead of the selected message [Search v2.2] mWeb/Chrome Search-Navigate back to the top of messages instead of the selected message Sep 30, 2024
@cdOut
Copy link
Contributor

cdOut commented Sep 30, 2024

Hi, I'm Tymoteusz from Software Mansion and I worked on search-related issues before, I will gladly work on this one.

@cdOut
Copy link
Contributor

cdOut commented Sep 30, 2024

Would we want to scroll to the exact same position or would scrolling to the selected chat report be sufficient?

@luacmartins
Copy link
Contributor

luacmartins commented Sep 30, 2024

I think we'd want to scroll to the selected message

@melvin-bot melvin-bot bot added the Overdue label Oct 2, 2024
@lakchote
Copy link
Contributor

lakchote commented Oct 3, 2024

Not overdue @cdOut is working on this.

@melvin-bot melvin-bot bot removed the Overdue label Oct 3, 2024
@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 10, 2024
@lakchote
Copy link
Contributor

Latest update is here.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 14, 2024
@lakchote
Copy link
Contributor

@cdOut how is it going?

@melvin-bot melvin-bot bot removed the Overdue label Oct 16, 2024
@cdOut
Copy link
Contributor

cdOut commented Oct 17, 2024

Sorry for the late update, I've had to go back to my other ongoing issues with Guided Setup that have higher prio after some backend changes were merged for them. I'll update later today or early tomorrow with the state of the PR for this issue.

@melvin-bot melvin-bot bot added the Overdue label Oct 21, 2024
@lakchote
Copy link
Contributor

@cdOut friendly bump

@melvin-bot melvin-bot bot removed the Overdue label Oct 22, 2024
@cdOut
Copy link
Contributor

cdOut commented Oct 22, 2024

Here's the update, I've created a POC to check whether to only utilize the selected message link id or to save the offset in session storage. I'm currently testing whether we don't have any possible situations where we lose the saved onyx search data after reload so we wouldn't be able to scroll to an unloaded item. Will report back tomorrow.

@melvin-bot melvin-bot bot added the Overdue label Oct 24, 2024
Copy link

melvin-bot bot commented Oct 25, 2024

@lakchote, @cdOut Whoops! This issue is 2 days overdue. Let's get this updated quick!

@cdOut
Copy link
Contributor

cdOut commented Oct 25, 2024

There was a bunch of new code that is also plugged into the SelectionList ref so I had to refactor it quite a bit, draft should be ready early next week.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 25, 2024
@lakchote
Copy link
Contributor

Draft by @cdOut should be ready early this week.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 29, 2024
Copy link

melvin-bot bot commented Nov 1, 2024

@lakchote, @cdOut Whoops! This issue is 2 days overdue. Let's get this updated quick!

@lakchote
Copy link
Contributor

lakchote commented Nov 4, 2024

@cdOut any update for the draft PR?

@melvin-bot melvin-bot bot removed the Overdue label Nov 4, 2024
@Kicu
Copy link
Contributor

Kicu commented Nov 4, 2024

@lakchote hey! Sorry for the delays here, someone else will take over the task, read through the partial solution that @cdOut left and push this forward.

I will write an update by eod today.

@289Adam289
Copy link
Contributor

Hi! I can take over this task. Please assign me

@Kicu
Copy link
Contributor

Kicu commented Nov 4, 2024

@lakchote @luacmartins

We spent a bit of time looking at this task with @289Adam289 and we have some considerations, mainly a question: is this really a bug?

reasoning 1

In general preserving scroll position on a webpage after full refresh is not so obvious.
We are lazy loading data in Search, which means that before clicking on a report you might've scrolled down to for example search result number 200+.
After user clicks report, and then hits "refresh", then clicks back button on the report what should happen? should we somehow make sure that the same 200 search items are fetched?

I personally as a user of websites would not expect that, after refreshing page with lazy loaded data, that my scroll will be preserved.

reasoning 2

In addition to above, we tried to find a similar pattern in E/App and we couldn't find cases where scroll position would be preserved like this.
Please as an example take a look that the exact same behaviour happens on chat list page.

scroll not preserved after refresh on chat list

Screen.Recording.2024-11-04.at.16.54.25.mov

@luacmartins
Copy link
Contributor

luacmartins commented Nov 4, 2024

Those are really good points @Kicu. I agree with those and as such, I think we can just close this issue. @lakchote what do you think?

@luacmartins
Copy link
Contributor

I'm gonna close this issue for now. Please reopen if needed.

@github-project-automation github-project-automation bot moved this from Polish to Done in [#whatsnext] #expense Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

7 participants