Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.49k stars 2.85k forks source link

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

Open lanitochka17 opened 3 weeks ago

lanitochka17 commented 3 weeks ago

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 https://github.com/Expensify/App/pull/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?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/d5a247e4-ab36-4385-b460-a20241537f84

View all open jobs on GitHub

melvin-bot[bot] commented 3 weeks ago

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.

melvin-bot[bot] commented 3 weeks ago

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

github-actions[bot] commented 3 weeks ago

:wave: 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 commented 3 weeks ago

I think we can demote this to NAB

cdOut commented 3 weeks ago

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

cdOut commented 3 weeks ago

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

luacmartins commented 3 weeks ago

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

lakchote commented 3 weeks ago

Not overdue @cdOut is working on this.

lakchote commented 2 weeks ago

@cdOut any updates?

melvin-bot[bot] commented 1 week ago

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

cdOut commented 1 week ago

I'm working on a draft PR, should have a working POC by the end of the week. We were slightly concerned about handling the case where you might lose the saved search data after reloading, in which you wouldn't be able to scroll back to it, so I'm trying to see whether and when that could possibly happen here.

lakchote commented 1 week ago

Latest update is here.

lakchote commented 1 week ago

@cdOut how is it going?

cdOut commented 1 week ago

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.

lakchote commented 2 days ago

@cdOut friendly bump

cdOut commented 2 days ago

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.