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
[Due for payment 2025-02-28] [$250] Web - Reports - Unable to navigate search router with keyboard after opening filter page #56038
Version Number: 9.0.92-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: Exp Email or phone of affected tester (no customers):applausetester+100106kh@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac 15.0 / Chrome App Component: Search
Action Performed:
Precondition:
User has created some expenses.
Go to staging.new.expensify.com
Go to Reports.
Enter anything that will give results.
Use keyboard up and down key.
Note that the navigation happens within the search result.
Click on the filter button.
Close the filter.
Click on the search field to focus it.
Use keyboard up and down key.
Expected Result:
The navigation will happen within the search result.
Actual Result:
The search router is dismissed and the navigation happens in the expense list instead of search router,
Please re-state the problem that we are trying to solve in this issue.
Web - Reports - Unable to navigate search router with keyboard after opening filter page
What is the root cause of that problem?
We are rendering SelectionList twice: once for autocomplete suggestions and once for listing transactions/reports. As a result, the arrow key listener is captured on the transactions/reports after opening and closing the filters page.
What changes do you think we should make in order to solve the problem?
We would need to introduce priority parameter in useArrowKeyFocusManager hook function with default value of 0
Then we would need to introduce a new prop in BaseSelectionList called arrowKeyPriority which will have the default value of 0 and pass that to useArrowKeyFocusManager through priority param.
In SearchRouterList introduce a new prop isVisible and pass arrowKeyPriority={isVisible ? 0 : 1} to selection list.
And lastly we need to pass isVisible={isSearchRouterDisplayed} from SearchRouter and isVisible={isAutocompleteListVisible} from SearchPageHeaderInput.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
changed the title [-]Web - Reports - Unable to navigate search router with keyboard after opening filter page[/-][+][$250] Web - Reports - Unable to navigate search router with keyboard after opening filter page[/+]on Jan 30, 2025
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[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: The author is aware and has addressed this issue as a follow-up to their previous PR.
[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: N/A
[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:
User has created expenses.
Test:
Go to Reports.
Enter anything that will give results.
Use the keyboard up and down key.
Verify that when AutocompleteList is visible, Navigation happens only in Autocomplete List.
Activity
melvin-bot commentedon Jan 30, 2025
Triggered auto assignment to @bfitzexpensify (
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.Krishna2323 commentedon Jan 30, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Web - Reports - Unable to navigate search router with keyboard after opening filter page
What is the root cause of that problem?
SelectionListtwice: once for autocomplete suggestions and once for listing transactions/reports. As a result, the arrow key listener is captured on the transactions/reports after opening and closing the filters page.App/src/components/Search/index.tsx
Lines 469 to 471 in acd7a79
App/src/components/Search/SearchRouter/SearchRouterList.tsx
Lines 475 to 478 in acd7a79
App/src/components/SelectionList/BaseSelectionList.tsx
Lines 321 to 337 in acd7a79
What changes do you think we should make in order to solve the problem?
priorityparameter inuseArrowKeyFocusManagerhook function with default value of0BaseSelectionListcalledarrowKeyPrioritywhich will have the default value of0and pass that touseArrowKeyFocusManagerthrough priority param.SearchRouterListintroduce a new propisVisibleand passarrowKeyPriority={isVisible ? 0 : 1}to selection list.isVisible={isSearchRouterDisplayed}fromSearchRouterandisVisible={isAutocompleteListVisible}fromSearchPageHeaderInput.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
TEST BRANCH
Result
arrow_key_focus.mp4
[-]Web - Reports - Unable to navigate search router with keyboard after opening filter page[/-][+][$250] Web - Reports - Unable to navigate search router with keyboard after opening filter page[/+]melvin-bot commentedon Jan 30, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021885040797343861848
melvin-bot commentedon Jan 30, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (
External)melvin-bot commentedon Feb 3, 2025
@fedirjh, @bfitzexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
linhvovan29546 commentedon Feb 3, 2025
@Krishna2323 Seems like you missed adding
priorityto useKeyboardShortcut as well. 😁melvin-bot commentedon Feb 5, 2025
@fedirjh, @bfitzexpensify Eep! 4 days overdue now. Issues have feelings too...
45 remaining items
bfitzexpensify commentedon Mar 4, 2025
@fedirjh please complete the BZ checklist
melvin-bot commentedon Mar 10, 2025
@bfitzexpensify Huh... This is 4 days overdue. Who can take care of this?
bfitzexpensify commentedon Mar 11, 2025
Bump @fedirjh
melvin-bot commentedon Mar 17, 2025
@bfitzexpensify Huh... This is 4 days overdue. Who can take care of this?
fedirjh commentedon Mar 17, 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: The author is aware and has addressed this issue as a follow-up to their previous PR.
[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: N/A
[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 👎
bfitzexpensify commentedon Mar 18, 2025
Thanks @fedirjh
Payment summary:
@fedirjh owed $250 via ND request for C+ work.
garrettmknight commentedon Apr 22, 2025
$250 approved for @fedirjh