-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[PAID] [HOLD for payment 2024-11-29] [$250] mWeb -Finder -User not scrolled to top of chats list when scrolling down and deleting search #50562
Comments
Triggered auto assignment to @CortneyOfstad ( |
@CortneyOfstad FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
Edited by proposal-police: This proposal was edited at 2024-10-30 14:39:15 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.When writing a few letters to trigger a search, scrolling down to the middle of the results, selecting all the content on search input and deleting it, the chats list updated but the user is not redirected to the top. The list stays in the middle What is the root cause of that problem?When the newUserQuery becomes empty, we have the logic to scroll to -1
But we prevent to scroll if the index is -1 App/src/components/SelectionList/BaseSelectionList.tsx Lines 254 to 256 in de42f2e
What changes do you think we should make in order to solve the problem?We want to prevent scrolling if index is -1 because at the beginning the search term is always -1 then we don't want to do any scroll (If not the list can be blink)
Then update
to
What alternative solutions did you explore? (Optional)We can update this logic to
so the first item will be focused after deleting search text |
Didn't realize this was Android — so having Stevie do some testing for me! |
Confirmed that this was reproducible so getting eyes on it! S/O to @slafortune for her help! |
Job added to Upwork: https://www.upwork.com/jobs/~021846215092993792827 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allgandalf ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.User not scrolled to top of chats list when scrolling down and deleting search What is the root cause of that problem?After deleting the search, scrolling to the top is not possible because App/src/components/SelectionList/BaseSelectionList.tsx Lines 568 to 574 in 7fca65b
The function updateAndScrollToFocusedIndex receives this -1 and passes it to scrollToIndex . Inside scrollToIndex , there's a condition that checks if the index is -1 . If true, it returns without performing the scroll, causing the issueApp/src/components/SelectionList/BaseSelectionList.tsx Lines 252 to 254 in 7fca65b
What changes do you think we should make in order to solve the problem?To resolve this issue, we need to check if // .src/components/SelectionList/BaseSelectionList.tsx#L568
- const newSelectedIndex =
- textInputValue === '' || (flattenedSections.selectedOptions.length !== prevSelectedOptionsLength && prevAllOptionsLength === flattenedSections.allOptions.length) ? -1 : 0;
+ const newSelectedIndex =
+ (textInputValue === '' && !prevTextInputValue) || (flattenedSections.selectedOptions.length !== prevSelectedOptionsLength && prevAllOptionsLength === flattenedSections.allOptions.length) ? -1 : 0; POC
Screen.Recording.2024-10-16.at.01.34.42.movI've tested the previous issue, and this condition still works well after the update POC
Screen.Recording.2024-10-16.at.01.36.45.mp4 |
Triggered auto assignment to @stephanieelliott ( |
Hey @stephanieelliott! I am heading OoO shortly (until 10/23) so reassigning to keep an eye on this! Thanks! |
@allgandalf What do you think about my proposal? Thank you |
@CortneyOfstad, @stephanieelliott, @allgandalf Huh... This is 4 days overdue. Who can take care of this? |
@allgandalf Can you take a look at my proposal? |
FYI @allgandalf @rlinoz I see the video on this issue is presenting old ChatFinder functionality, but the code of ChatFinder is completely removed from App as of a few weeks. Probably when this issue was created, then ChatFinder was still in the code, but in end the final solution landed in As I'm refactoring The previous value of query is right there in Just FYI - I have no idea if the CC @luacmartins just so you know |
Thanks @Kicu! I see that the PR for this issue is already merged. I think we can make changes to the solution if needed though. |
solution changed here: https://github.com/Expensify/App/pull/52568/files#diff-f8e8e46965e7e099296f3ec791faf7d61b208fb68dfff52e20e8d98483479a89R225 I included an android video showing that the bug is still fixed on my code |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.65-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 2024-11-29. 🎊 For reference, here are some details about the assignees on this issue:
|
@allgandalf @CortneyOfstad @allgandalf 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] |
@allgandalf can you please complete the checklist at your earliest convenience? |
Please note that I am going to be OoO on 11/29 due to Thanksgiving in the US, but I will get this paid as soon as I am back on Monday. Most of the team will be out, so I apologize for the delay! |
No worries @CortneyOfstad , Hope you enjoy your time off 😄 |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalPrecondition:
Test:
Verify the chats list is updated and the user is navigated to the top of it Do we agree 👍 or 👎 |
@rlinoz, @CortneyOfstad, @wildan-m, @allgandalf Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Payment Summary@wildan-m — paid $250 via Upwork Regression Test |
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.47-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: https://expensify.testrail.io/index.php?/tests/view/5068088&group_by=cases:section_id&group_order=asc&group_id=229066
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
After deleting the content in search input, the chats list should be updated and the user should be navigated to the top of it
Actual Result:
When writing a few letters to trigger a search, scrolling down to the middle of the results, selecting all the content on search input and deleting it, the chats list updated but the user is not redirected to the top. The list stays in the middle
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6630312_1728534947618.Finder.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @CortneyOfstadThe text was updated successfully, but these errors were encountered: