Repository navigation
[HOLD for payment 2024-04-15] [$500] Expense - Item in report list is not highlighted and list cannot be navigated with keyboard #35843
Description
Activity
- addedDeployBlockerCashThis issue or pull request should block deploymentThis issue or pull request should block deployment
on Feb 5, 2024 👋 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:
- Identify the pull request that introduced this issue and revert it.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
Triggered auto assignment to @srikarparsi (
Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.We think that this bug might be related to #wave6
CC @greg-schroederProposal
Please re-state the problem that we are trying to solve in this issue.
Expense - Item in report list is not highlighted and list cannot be navigated with keyboard
What is the root cause of that problem?
The main problem with issue is that we don't pass
indexOffsetfor sectionsApp/src/pages/EditReportFieldDropdownPage.tsx
Lines 47 to 73 in cd576d8
const sections = useMemo(() => { const filteredRecentOptions = recentlyUsedOptions.filter((option) => option.toLowerCase().includes(searchValue.toLowerCase())); const filteredRestOfOptions = fieldOptions.filter((option) => !filteredRecentOptions.includes(option) && option.toLowerCase().includes(searchValue.toLowerCase())); return [ { title: translate('common.recents'), shouldShow: true, data: filteredRecentOptions.map((option) => ({ text: option, keyForList: option, searchText: option, tooltipText: option, })), }, { title: translate('common.all'), shouldShow: true, data: filteredRestOfOptions.map((option) => ({ text: option, keyForList: option, searchText: option, tooltipText: option, })), }, ]; }, [fieldOptions, recentlyUsedOptions, searchValue, translate]); What changes do you think we should make in order to solve the problem?
To fix this issue we can use logic from
TaskAssigneeSelectorModalto countindexOffsetfor each sectionApp/src/pages/tasks/TaskAssigneeSelectorModal.js
Lines 146 to 185 in 1b489ff
const sections = useMemo(() => { const sectionsList = []; let indexOffset = 0; if (filteredCurrentUserOption) { sectionsList.push({ title: props.translate('newTaskPage.assignMe'), data: [filteredCurrentUserOption], shouldShow: true, indexOffset, }); indexOffset += 1; } sectionsList.push({ title: props.translate('common.recents'), data: filteredRecentReports, shouldShow: filteredRecentReports?.length > 0, indexOffset, }); indexOffset += filteredRecentReports?.length; sectionsList.push({ title: props.translate('common.contacts'), data: filteredPersonalDetails, shouldShow: filteredPersonalDetails?.length > 0, indexOffset, }); indexOffset += filteredPersonalDetails?.length; if (filteredUserToInvite) { sectionsList.push({ data: [filteredUserToInvite], shouldShow: true, indexOffset, }); } return sectionsList; }, [filteredCurrentUserOption, filteredPersonalDetails, filteredRecentReports, filteredUserToInvite, props]); As a result, we need to update sections for
EditReportFieldDropdownPagelikereturn [ { title: translate('common.recents'), ..., indexOffset: 0, }, { title: translate('common.all'), ..., indexOffset: filteredRecentOptions.length, }, ];App/src/pages/EditReportFieldDropdownPage.tsx
Lines 51 to 72 in cd576d8
return [ { title: translate('common.recents'), shouldShow: true, data: filteredRecentOptions.map((option) => ({ text: option, keyForList: option, searchText: option, tooltipText: option, })), }, { title: translate('common.all'), shouldShow: true, data: filteredRestOfOptions.map((option) => ({ text: option, keyForList: option, searchText: option, tooltipText: option, })), }, ]; Also we can add
focusedIndex={0}forOptionsSelector<OptionsSelector What alternative solutions did you explore? (Optional)
NA
we can use logic from TaskAssigneeSelectorModal to count indexOffset for each section
Not really following the solution. This issue does not seem related to tasks.
Reacted by adelekennedycc @s77rt since it's linked to your PR
we can use logic from TaskAssigneeSelectorModal to count indexOffset for each section
Not really following the solution. This issue does not seem related to tasks.
Problem related to EditReportFieldDropdownPage )
I added TaskAssigneeSelectorModal as an example )Interesting, but doesn't quite explain where the regression has happened. We implemented this feature here.
I don't think this is a regression nor a deploy blocker. This bug existed before and should be handled just like any other bug. Using
indexOffsetis the correct solution.Reacted by Hayata Suenaga49 remaining items
This issue has not been updated in over 15 days. @cead22, @mananjadhav, @adelekennedy, @ZhenjaHorbach eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
- addedWeeklyKSv2KSv2Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionand removedMonthlyKSv2KSv2
on Apr 8, 2024 - changed the title
[-][$500] Expense - Item in report list is not highlighted and list cannot be navigated with keyboard[/-][+][HOLD for payment 2024-04-15] [$500] Expense - Item in report list is not highlighted and list cannot be navigated with keyboard[/+]on Apr 8, 2024 Reviewinglabel has been removed, please complete the "BugZero Checklist".The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 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-04-15. 🎊
For reference, here are some details about the assignees on this issue:
- @mananjadhav requires payment through NewDot Manual Requests
- @ZhenjaHorbach requires payment automatic offer (Contributor)
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
- [@mananjadhav] The PR that introduced the bug has been identified. Link to the PR:
- [@mananjadhav] 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:
- [@mananjadhav] A discussion in #expensify-bugs 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:
- [@mananjadhav] Determine if we should create a regression test for this bug.
- [@mananjadhav] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
- [@adelekennedy] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Payouts due:
- Contributor: $500 @ZhenjaHorbach (UpWork)
- Contributor+: $500 @mananjadhav (NewDot)
Upwork job is here.
I couldn't trace the offending PR for this one. But with the refactor of the indexOffset I don't think we need a regression test for this one. The change is generic and the other tests for keyboard will take care of it.
Reacted by adelekennedy$500 approved for @mananjadhav
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: 1.4-36.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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Issue found when executing PR #35770
Action Performed:
recondition:
Expected Result:
In Step 6, the selected item is highlighted
In Step 7, the list can be navigated with keyboard
Actual Result:
In Step 6, the selected item is not highlighted
In Step 7, the list cannot be navigated with keyboard
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6368014_1707150918160.bandicam_2024-02-05_21-30-45-302.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit