You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] mWeb/Chrome - Search - Cursor is not moved to the end after selecting for the suggestion #59646
Version Number: v9.1.23-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: - Email or phone of affected tester (no customers):applausetester+ds@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Samsung / Chrome App Component: Search
Action Performed:
Login to any account with expneses
Navigate to the reports page
3.In the search bar, type the following: `status: all type: expense from: [The first letters of a user]
Choose from the suggested,
Expected Result:
After selecting from the suggested, the cursor is moved to the end
Actual Result:
After selecting from the suggested, the cursor is not moved to the end. It stays where it was
For smaller screen we are not updating selection state. So we need to update the selection state when option is selected using keyboard (same as we did for larger screen here) . For this we should replace setTextQuery={setTextInputValue} with setTextQuery={setTextAndUpdateSelection}here
Improvement
Currently text in search field does not move to the end when report name is long. For this I already added proposal here . This both are different issues but still I added here for reference.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA due to UI bug
What alternative solutions did you explore? (Optional)
changed the title [-]mWeb/Chrome - Search - Cursor is not moved to the end after selecting for the suggestion[/-][+][$250] mWeb/Chrome - Search - Cursor is not moved to the end after selecting for the suggestion[/+]on Apr 8, 2025
[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:
1. Open the app
2. Navigate to the reports page
3. In the search bar, type the following: `status: all type: expense from: [The first letters of a user]
4. Choose from the suggested
5. Verify the cursor move to the end of text input
@zanyrenney Could you please review @MarioExpensify comment in the GitHub issue? I was expecting a $75 payment for my contribution as mentioned there. Thanks
$ 250 for thelullabyy for the PR implementation - paid via upwork.
$ 250 for Ollyws as the C+ - please request on ND.
$ 75 for ishakakkad for helping with the solution - paid $75 on upwork.
Activity
melvin-bot commentedon Apr 4, 2025
Triggered auto assignment to @zanyrenney (
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.thelullabyy commentedon Apr 4, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-04 08:45:46 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
After selecting from the suggested, the cursor is not moved to the end. It stays where it was
What is the root cause of that problem?
The issue occurs because we do not pass the
selectionprop in the following location:App/src/components/Search/SearchPageHeader/SearchPageHeaderInput.tsx
Line 244 in f01c7de
On larger screens, this works correctly because the
selectionprop is passed here:App/src/components/Search/SearchPageHeader/SearchPageHeaderInput.tsx
Line 338 in f01c7de
The
selectionprop is ultimately handled in:App/src/components/TextInput/BaseTextInput/index.tsx
Line 392 in 1190a9e
where it determines the position of the text cursor (caret) within the input field.
What changes do you think we should make in order to solve the problem?
selectionprop in:App/src/components/Search/SearchPageHeader/SearchPageHeaderInput.tsx
Lines 244 to 259 in f01c7de
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
ishakakkad commentedon Apr 5, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
After selecting from the suggested, the cursor is not moved to the end. It stays where it was
What is the root cause of that problem?
Cursor not moved to end because we are not passing selection props here in
SearchInputSelectionWrapperfor the smaller screen.For the larger screen we already passed the selection props so it is working fine in larger screen.
App/src/components/Search/SearchPageHeader/SearchPageHeaderInput.tsx
Lines 337 to 340 in f01c7de
What changes do you think we should make in order to solve the problem?
To fix this issue we should do following changes.
SearchInputSelectionWrapperhereFor ex,
selectionstate. So we need to update theselectionstate when option is selected using keyboard (same as we did for larger screen here) . For this we should replacesetTextQuery={setTextInputValue}withsetTextQuery={setTextAndUpdateSelection}hereFor ex,
Improvement
Currently text in search field does not move to the end when report name is long. For this I already added proposal here . This both are different issues but still I added here for reference.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA due to UI bug
What alternative solutions did you explore? (Optional)
melvin-bot commentedon Apr 7, 2025
@zanyrenney Whoops! This issue is 2 days overdue. Let's get this updated quick!
[-]mWeb/Chrome - Search - Cursor is not moved to the end after selecting for the suggestion[/-][+][$250] mWeb/Chrome - Search - Cursor is not moved to the end after selecting for the suggestion[/+]melvin-bot commentedon Apr 8, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021909637145313280933
melvin-bot commentedon Apr 8, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (
External)32 remaining items
MarioExpensify commentedon May 7, 2025
@thelullabyy any news?
Ollyws commentedon May 13, 2025
@zanyrenney This one was deployed to production two weeks ago, can we process payment? Thanks!
Ollyws commentedon May 19, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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: https://github.com/Expensify/App/pull/56326/files#r2095158581
[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.
[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 👎
Ollyws commentedon May 19, 2025
Bump on payment please @zanyrenney
ishakakkad commentedon May 22, 2025
@zanyrenney Could you please review @MarioExpensify comment in the GitHub issue? I was expecting a $75 payment for my contribution as mentioned there. Thanks
MarioExpensify commentedon May 22, 2025
Bumped @zanyrenney, also let her know about your contribution @ishakakkad.
zanyrenney commentedon May 22, 2025
working on it now.
zanyrenney commentedon May 22, 2025
payment summary
$ 250 for thelullabyy for the PR implementation - paid via upwork.
$ 250 for Ollyws as the C+ - please request on ND.
$ 75 for ishakakkad for helping with the solution - paid $75 on upwork.
zanyrenney commentedon May 22, 2025
@ishakakkad sent you a job offer, please accept: https://www.upwork.com/nx/wm/offer/107409984
ishakakkad commentedon May 22, 2025
Thanks @zanyrenney accepted
Ollyws commentedon May 22, 2025
Requested in ND.
zanyrenney commentedon May 22, 2025
payment summary complete, closing!
garrettmknight commentedon Jun 3, 2025
$250 approved for @Ollyws