Skip to content
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

[HOLD for payment 2024-04-15] [$500] Expense - Item in report list is not highlighted and list cannot be navigated with keyboard #35843

Closed
2 of 6 tasks
lanitochka17 opened this issue Feb 5, 2024 · 38 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Feb 5, 2024

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:

  • User is an employee of Collect workspace
  • The Collect workspace has dropdown field set up in "Report and Invoice Fields" on Old Dot
  1. Go to workspace chat
  2. Create a request
  3. Go to expense report
  4. Click on the report field with the selection list set up from Old Dot
  5. Select an item
  6. Click on the field
  7. Use keyboard to navigate through the list

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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

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
  • Upwork Job URL: https://www.upwork.com/jobs/~013f9bedd40db86a4a
  • Upwork Job ID: 1757818279097016320
  • Last Price Increase: 2024-02-14
  • Automatic offers:
    • ZhenjaHorbach | Contributor | 0
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Feb 5, 2024
Copy link
Contributor

github-actions bot commented 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:

  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.

Copy link

melvin-bot bot commented Feb 5, 2024

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

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave6
CC @greg-schroeder

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Feb 5, 2024

Proposal

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 indexOffset for sections

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 TaskAssigneeSelectorModal to count indexOffset for each section

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 EditReportFieldDropdownPage like

        return [
            {
                title: translate('common.recents'),
                ...,
                indexOffset: 0,
            },
            {
                title: translate('common.all'),
                ...,
                indexOffset: filteredRecentOptions.length,
            },
        ];

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} for OptionsSelector

What alternative solutions did you explore? (Optional)

NA

@marcaaron marcaaron assigned marcaaron and unassigned srikarparsi Feb 5, 2024
@marcaaron
Copy link
Contributor

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.

@marcaaron
Copy link
Contributor

cc @s77rt since it's linked to your PR

@ZhenjaHorbach
Copy link
Contributor

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 )

@marcaaron
Copy link
Contributor

Interesting, but doesn't quite explain where the regression has happened. We implemented this feature here.

@s77rt
Copy link
Contributor

s77rt commented Feb 5, 2024

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 indexOffset is the correct solution.

@marcaaron marcaaron removed the DeployBlockerCash This issue or pull request should block deployment label Feb 5, 2024
@marcaaron
Copy link
Contributor

Ok cool removing the blocker and we can triage this normally. @lanitochka17 please relay feedback about this:

Reproducible in production?: N

🙇

@marcaaron marcaaron added Weekly KSv2 and removed Hourly KSv2 labels Feb 5, 2024
@marcaaron marcaaron removed their assignment Feb 5, 2024
@marcaaron marcaaron added the Bug Something is broken. Auto assigns a BugZero manager. label Feb 5, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

Triggered auto assignment to @adelekennedy (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Feb 5, 2024
Copy link

melvin-bot bot commented Feb 9, 2024

@adelekennedy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Feb 19, 2024

@cead22 @mananjadhav @adelekennedy this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@mananjadhav
Copy link
Collaborator

Yeah @cead22 and @ZhenjaHorbach, if we're able to add this to BaseOptionsSelector then that would work for all the cases. We can test out all places where it's being used.

@melvin-bot melvin-bot bot removed the Overdue label Feb 19, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

📣 @ZhenjaHorbach 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@ZhenjaHorbach
Copy link
Contributor

📣 @ZhenjaHorbach 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Keep in mind: Code of Conduct | Contributing 📖

PR will be ready today or tomorrow

@mananjadhav
Copy link
Collaborator

I was unwell past few days, I'll get to this by tomorrow.

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Mar 19, 2024
Copy link

melvin-bot bot commented Mar 19, 2024

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!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Monthly KSv2 labels Apr 8, 2024
@melvin-bot melvin-bot bot 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 Apr 8, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Apr 8, 2024

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:

Copy link

melvin-bot bot commented Apr 8, 2024

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:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 14, 2024
@adelekennedy
Copy link

adelekennedy commented Apr 15, 2024

Payouts due:

Upwork job is here.

@mananjadhav
Copy link
Collaborator

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.

@JmillsExpensify
Copy link

$500 approved for @mananjadhav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

9 participants