Skip to content

[HOLD for payment 2024-08-13] [$250] Context menu - Unable to add reaction by Enter key/navigate from first option to last by up key #44095

Closed

Description

@lanitochka17

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.86-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4647677
Issue reported by: Applause - Internal Team

Action Performed:

  1. Log in to New Expensify
  2. Navigate to any chat
  3. Right click on any message
  4. Press Tab key
  5. Press Enter
  6. Press down arrow key
  7. Press up arrow key

Expected Result:

In step 5., The highlighted emoji should be added as reaction to the message (works well for hover menu)
In step 7., User should be able to navigate from first highlighted option to the last one using arrow keys

Actual Result:

Step 5. Nothing happens user is unable to add reaction or open emoji picker using Enter key in context menu.
Step 7. Option does not change, user is unable to navigate from first option to last by up arrow key and from last to first by down arrow key

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

Bug6519480_1718894075855.2024-06-20_16-24-21.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f3361b27929e9c6b
  • Upwork Job ID: 1805668929991815674
  • Last Price Increase: 2024-07-23
  • Automatic offers:
    • dukenv0307 | Contributor | 102900677
    • Krishna2323 | Contributor | 103280879
Issue OwnerCurrent Issue Owner: @abekkala

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 20, 2024
  2. melvin-bot commented on Jun 20, 2024

    @melvin-bot

    Triggered auto assignment to @abekkala (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.

  3. lanitochka17 commented on Jun 20, 2024

    @lanitochka17
    Author

    @abekkala FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  4. Krishna2323 commented on Jun 20, 2024

    @Krishna2323
    Contributor

    Proposal

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

    Context menu - Unable to add reaction by Enter key/navigate from first option to last by up key

    What is the root cause of that problem?

    In BaseReportActionContextMenu, we are using useKeyboardShortcut which prevents default due to which the event is not captured by the pressable.

    useKeyboardShortcut(
    CONST.KEYBOARD_SHORTCUTS.ENTER,
    (event) => {
    if (!menuItemRefs.current[focusedIndex]) {
    return;
    }
    // Ensures the event does not cause side-effects beyond the context menu, e.g. when an outside element is focused
    if (event) {
    event.stopPropagation();
    }
    menuItemRefs.current[focusedIndex]?.triggerPressAndUpdateSuccess?.();
    setFocusedIndex(-1);
    },
    {isActive: shouldEnableArrowNavigation},
    );

    Cyclically traverse is disabled intentionally in this PR

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

    We should add shouldPreventDefault: false in the KeyboardShortcutConfig .

    {isActive: shouldEnableArrowNavigation},

    What alternative solutions did you explore? (Optional)

  5. gijoe0295 commented on Jun 20, 2024

    @gijoe0295
    Contributor

    Proposal

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

    1. Cannot select emoji by Enter key
    2. Cannot cyclically traverse the menu items by arrow key

    What is the root cause of that problem?

    1. We defined custom Enter keyboard handler and it blocks the pressable's default event handler:

    useKeyboardShortcut(
    CONST.KEYBOARD_SHORTCUTS.ENTER,

    1. We toggled disableCyclicTraversal:

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

    1. Add shouldPreventDefault: false to the keyboard handler above
    2. Remove disableCyclicTraversal: true from the arrow key handler above
  6. bernhardoj commented on Jun 21, 2024

    @bernhardoj
    Contributor

    The cyclic traversal is being discussed here

  7. melvin-bot commented on Jun 25, 2024

    @melvin-bot

    @abekkala Huh... This is 4 days overdue. Who can take care of this?

  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 25, 2024
  9. melvin-bot commented on Jun 25, 2024

    @melvin-bot
  10. changed the title [-]Context menu - Unable to add reaction by Enter key/navigate from first option to last by up key[/-] [+][$250] Context menu - Unable to add reaction by Enter key/navigate from first option to last by up key[/+] on Jun 25, 2024
  11. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jun 25, 2024
  12. melvin-bot commented on Jun 25, 2024

    @melvin-bot

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

  13. 44 remaining items

  14. roryabraham commented on Aug 2, 2024

    @roryabraham
    Contributor

    @francoisl assigning to you since you reviewed the PR.

  15. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Aug 6, 2024
  16. changed the title [-][$250] Context menu - Unable to add reaction by Enter key/navigate from first option to last by up key[/-] [+][HOLD for payment 2024-08-13] [$250] Context menu - Unable to add reaction by Enter key/navigate from first option to last by up key[/+] on Aug 6, 2024
  17. melvin-bot commented on Aug 6, 2024

    @melvin-bot

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

  18. melvin-bot commented on Aug 6, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.16-8 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-08-13. 🎊

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

  19. melvin-bot commented on Aug 6, 2024

    @melvin-bot

    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:

    • [@dukenv0307] The PR that introduced the bug has been identified. Link to the PR:
    • [@dukenv0307] 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:
    • [@dukenv0307] 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:
    • [@dukenv0307] Determine if we should create a regression test for this bug.
    • [@dukenv0307] 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.
    • [@abekkala] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  20. abekkala commented on Aug 7, 2024

    @abekkala
    Contributor

    PAYMENT SUMMARY FOR AUG 13, if no regressions

  21. dukenv0307 commented on Aug 8, 2024

    @dukenv0307
    Contributor

    BugZero Checklist:

    • The PR that introduced the bug has been identified. Link to the PR: N/A
    • 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: N/A
    • 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: N/A
    • Determine if we should create a regression test for this bug. Yes
    • 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.

    Regression tests:

    1. Navigate to any chat
    2. Right click on any message
    3. Press Tab key to focus on any emoji
    4. Press Enter
    5. Verify the emoji reaction is added to the comment

    Do we 👍 or 👎

  22. abekkala commented on Aug 13, 2024

    @abekkala
    Contributor

    @Krishna2323 and @dukenv0307 payment sent and contract ended - thank you! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions