-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 2023-10-02] [$1000] Web- Action menu - Unable to navigate options in Action menu using Arrow keys #23280
Comments
Triggered auto assignment to @maddylewis ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.The report action context menu cannot be navigated through the arrow keys, while the FAB can. What is the root cause of that problem?The FAB relies on the App/src/components/PopoverMenu/index.js Line 44 in be2c81f
However, the context menu of report actions does not implement such functionality. What changes do you think we should make in order to solve the problem?Similar to the FAB, the arrow keys should be registered and used to determine the focused menu item. This involves the following changes:
const shouldEnableArrowNavigation = !props.isMini && (props.isVisible || shouldKeepOpen);
const filteredContextMenuActions = _.filter(ContextMenuActions, shouldShowFilter);
// Context menu actions that are not rendered as menu items are excluded from arrow navigation
const nonMenuItemActionIndexes = _.map(filteredContextMenuActions, (contextAction, index) => _.isFunction(contextAction.renderContent) ? index : undefined);
const disabledIndexes = _.filter(nonMenuItemActionIndexes, (index) => !_.isUndefined(index));
const [focusedIndex, setFocusedIndex] = useArrowKeyFocusManager({
initialFocusedIndex: -1,
disabledIndexes,
maxIndex: filteredContextMenuActions.length - 1,
isActive: shouldEnableArrowNavigation,
});
const selectItem = (contextAction) => {
interceptAnonymousUser(() => contextAction.onPress(closePopup, payload), contextAction.isAnonymousAction);
};
useKeyboardShortcut(
CONST.KEYBOARD_SHORTCUTS.ENTER,
() => {
if (focusedIndex === -1) {
return;
}
selectItem(filteredContextMenuActions[focusedIndex]);
setFocusedIndex(-1);
},
{isActive: shouldEnableArrowNavigation},
); What alternative solutions did you explore? (Optional)N/A |
Job added to Upwork: https://www.upwork.com/jobs/~01eeba1242aba22472 |
Current assignee @maddylewis is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav ( |
@samh-nl can you please provide implementation detail? i.e. where to put useArrowKeyFocusManager in which component? |
import React, { useRef, useEffect } from 'react'; const ChatComponent = () => { useEffect(() => {
}, []); // Your chat component code with TouchableOpacity for each menu item |
📣 @IftikharNadeem12! 📣
|
import React, { useRef, useEffect } from 'react'; const ChatComponent = () => { useEffect(() => {
}, []); // Your chat component code with TouchableOpacity for each menu item **My Upwork Profile is; Iftikhar Nadeem** |
Contributor Details; My Expensify account email: ijweaver2004@gmail.com |
ProposalProblem:Implement Keyboard Navigation for Context Menu The current implementation of the Root Cause:The root cause of the problem is the absence of event listeners and handling for keyboard events in the Solution:To solve the problem and enable keyboard navigation, we propose the following changes to the
Implementation Details:Working Solution:Screen.Recording.2023-07-21.at.4.40.40.PM.mov |
Hi @0xmiroslav, let me know what do you think about the above Proposal. Thanks! |
@0xmiroslav I think it makes more sense to hold till The migration has not been assigned to anyone yet and it's a small component, so it could be combined with this issue perhaps? I was planning on making it a functional component anyway for this proposal, but there's already an issue for that so please advise. |
waiting for an update on @samh-nl's question here - #16259 (comment) |
Agreed. I asked confirmation here - #16259 (comment) |
yes, I would recommend we HOLD this issue on #16259 |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
Reposting @situchan's message regarding the bonus from the PR here:
@maddylewis do you know if we have any precedent in a situation like this? |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.73-1 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 2023-10-02. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue: As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
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:
|
@situchan will you review this checklist when you have a chance? #23280 (comment) |
This is kind of feature request than bug |
Regression Test Proposal (web/desktop only)
|
offers sent 👍 |
@maddylewis Accepted, thanks. Can you also please check bonus eligibility? |
included bonus |
@situchan - i think i paid you twice. i'll request a refund for the $1k payment. |
@maddylewis can we use that 1k for #24610 which is due payment for more than a month? |
Much appreciated, thanks. |
haha, yes for sure! |
confirmed here that the double payment can be used for the outstanding issue here - #24610 |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Like in FAB, user must be able to navigate using both arrow keys and TAB button.
Actual Result:
On pressing FAB, user can navigate through options using both arrow keys and TAB button. In Action Menu, user can navigate only using TAB . He cannot use arrow keys and navigate through options in Action menu,
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.43-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
Notes/Photos/Videos: Any additional supporting documentation
Bug6135278_tab.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: