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-06-11] [$1000] Web - Three dot menu is not opened via Enter key in Request Money to Add Receipt #33502

Closed
1 of 6 tasks
lanitochka17 opened this issue Dec 22, 2023 · 79 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 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@lanitochka17
Copy link

lanitochka17 commented Dec 22, 2023

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.16-3
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:

Action Performed:

  1. Login to ND Expensify
  2. Tap FAB button
  3. Tap Request money
  4. Select Manual tab
  5. Select a currency and enter any amount
  6. Tap Next
  7. On the Payor screen
  8. Tab until you get to the "three dot menu"
  9. Press Enter key

Expected Result:

The "Add receipt" option should pop up after pressing Enter key on three dot menu

Actual Result:

Nothing happens when press Enter key while the focus on the three dot menu in Manual Expense modal

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

Bug6323248_1703196327384.2023-12-21_21-33-59.mp4

Bug6323248_1703196651854!ellipsis

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d30724d2128b5dca
  • Upwork Job ID: 1738244084031193088
  • Last Price Increase: 2024-01-23
Issue OwnerCurrent Issue Owner: @Christinadobrzyn
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 22, 2023
@melvin-bot melvin-bot bot changed the title Request Money - Three dot menu is not opened via Enter key in Request Money to Add Receipt [$500] Request Money - Three dot menu is not opened via Enter key in Request Money to Add Receipt Dec 22, 2023
Copy link

melvin-bot bot commented Dec 22, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01d30724d2128b5dca

Copy link

melvin-bot bot commented Dec 22, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 22, 2023
Copy link

melvin-bot bot commented Dec 22, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 22, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External)

@FitseTLT
Copy link
Contributor

FitseTLT commented Dec 22, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Three dot menu is not opened via Enter key in Request Money to Add Receipt

What is the root cause of that problem?

We have two problems here

  1. There is a key down event listener for enter here
    const enterConfig = CONST.KEYBOARD_SHORTCUTS.ENTER;
    this.unsubscribeEnter = KeyboardShortcut.subscribe(
    enterConfig.shortcutKey,
    this.selectFocusedOption,
    enterConfig.descriptionKey,
    enterConfig.modifiers,
    true,
    () => !this.state.allOptions[this.state.focusedIndex],
    );

    So because it will preventDefault by default it is disabling the default behaviour of enter key press which is to call the onPress callback while the three dot menu is focused. This problem will be dealt by this pr.
  2. After the change on the linked pr We have another problem which is the callback is called twice also on keyup event, resulting in immediate closing of the popover after opening.
2023-12-25.20-56-42.mp4

What changes do you think we should make in order to solve the problem?

  1. As the problem is only on role button we can change it to other role like menu-item and it works perfect but what I recommend is to hold for the linked pr to deal with problem (2)
  2. We should check in the onPress callback that the event type is not keyup so change this
    onPress={() => {
    if (isPopupMenuVisible) {

    to
onPress={(e) => {
                            if (e.type === 'keyup') return;
                            if (isPopupMenuVisible) {

or take the same prevention logic to Pressable to prevent similar problem in the App
POC:

2023-12-25.21-09-16.mp4

@situchan
Copy link
Contributor

This is accessibility issue and seems like not a fit to any of waves

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Dec 22, 2023

Ah good point @situchan - I'm not sure if we're working on accessibility stuff now. I'll find out, asking the team - https://expensify.slack.com/archives/C02MW39LT9N/p1703268618682249

@Christinadobrzyn
Copy link
Contributor

Talking this over in chat with the team - we should bring this flow up to parity with Tab & Enter on the rest of the app. So that means that you should be able to Tab to the three dots and click Enter to open the "add receipt" window (a similar behaviour to other parts of the app). However, you don't need to start the Add Receipt process by clicking Enter.

So I think this should be worked on. I think it can be external.

@mollfpr feel free to review any proposals.

@bernhardoj
Copy link
Contributor

The issue here is that the ENTER key listener is consumed by ENTER keyboard shortcut (we call preventDefault on the shortcut code) in BaseOptionsSelector. It only happens on a <button> tag (a Pressable with the role of "button"). This PR should fix it.

@melvin-bot melvin-bot bot added the Overdue label Dec 25, 2023
@FitseTLT
Copy link
Contributor

Updated Proposal

Copy link

melvin-bot bot commented Dec 26, 2023

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

Copy link

melvin-bot bot commented Dec 28, 2023

@mollfpr, @Christinadobrzyn Eep! 4 days overdue now. Issues have feelings too...

Copy link

melvin-bot bot commented Dec 29, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@kbecciv kbecciv changed the title [$500] Request Money - Three dot menu is not opened via Enter key in Request Money to Add Receipt [$500] Web - Three dot menu is not opened via Enter key in Request Money to Add Receipt Dec 29, 2023
Copy link

melvin-bot bot commented Jan 1, 2024

@mollfpr, @Christinadobrzyn Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

1 similar comment
Copy link

melvin-bot bot commented Jan 1, 2024

@mollfpr, @Christinadobrzyn Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

@mollfpr
Copy link
Contributor

mollfpr commented Jan 2, 2024

Taking a review on the proposal now!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 2, 2024
@Christinadobrzyn
Copy link
Contributor

Hi @mollfpr how are the proposals looking?

@melvin-bot melvin-bot bot removed the Overdue label Jan 4, 2024
Copy link

melvin-bot bot commented Jan 5, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 25, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @mollfpr @roryabraham

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented May 3, 2024

hi @mollfpr @bernhardoj just checking in on this - can you provide an update? TY!

monitoring PR - #40960

@bernhardoj
Copy link
Contributor

Hi, the update is in this comment. We are currently blocked by an upstream issue.

@Christinadobrzyn
Copy link
Contributor

watching - #26990 (comment)

@Christinadobrzyn
Copy link
Contributor

monitoring - #26990 (comment)

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented May 28, 2024

It looks like necolas/react-native-web#2601 was closed @bernhardoj & @mollfpr do you think we can start working on this again?

@bernhardoj
Copy link
Contributor

@Christinadobrzyn @mollfpr already approved the PR, waiting for @neil-marcellini review

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 4, 2024
@melvin-bot melvin-bot bot changed the title [$1000] Web - Three dot menu is not opened via Enter key in Request Money to Add Receipt [HOLD for payment 2024-06-11] [$1000] Web - Three dot menu is not opened via Enter key in Request Money to Add Receipt Jun 4, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 4, 2024
Copy link

melvin-bot bot commented Jun 4, 2024

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

Copy link

melvin-bot bot commented Jun 4, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.78-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-06-11. 🎊

For reference, here are some details about the assignees on this issue:

  • @mollfpr requires payment through NewDot Manual Requests
  • @bernhardoj requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Jun 4, 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:

  • [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
  • [@mollfpr] 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:
  • [@mollfpr] 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:
  • [@mollfpr] Determine if we should create a regression test for this bug.
  • [@mollfpr] 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.
  • [@Christinadobrzyn] 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 Overdue and removed Weekly KSv2 labels Jun 10, 2024
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Jun 11, 2024

Payouts due:

Upwork job is here.

Even though this is Internal - do we want a regression test?

@melvin-bot melvin-bot bot removed the Overdue label Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

Payment Summary

Upwork Job

BugZero Checklist (@Christinadobrzyn)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1738244084031193088/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@mollfpr
Copy link
Contributor

mollfpr commented Jun 11, 2024

[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] 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:

No offending PR. The fix is upstream.

[@mollfpr] 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:

The regression step should be enough.

[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] 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.

  1. Open the money request page
  2. Enter any amount
  3. Select any participant
  4. In the confirmation page, keep press TAB until the three-dot menu is highlighted
  5. Press ENTER
  6. Verify the menu is shown
  7. 👍 or 👎

@JmillsExpensify
Copy link

$1,000 approved for @mollfpr

@Christinadobrzyn
Copy link
Contributor

Regression test- https://github.com/Expensify/Expensify/issues/404150

Paid out based on Payment Summary

Closing!

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 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
No open projects
Development

No branches or pull requests