You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-12-15] [$500] Workspace - the blue focus is not prioritized over the application highlight #31635
Version Number: 1.4.1-7 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:
Go to settings > Workspace > Members
Click on existing workspace
Members > Invite
Click on 'Tab' key to bring the blue focus from accessibility
Notice that the lists are focused(Blue focused)
Move the blue Focus using the 'Tab' key to focus on the users
Click Enter
Notice that clicking enter selects the user that the app highlight is on. It does not select the User focused with the blue marker
Expected Result:
the blue focus is prioritized when clicking enter rather than the application highlight
Actual Result:
The blue focus is not prioritized over the application highlight
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Workspace - the blue focus is not prioritized over the application highlight[/-][+][$500] Workspace - the blue focus is not prioritized over the application highlight[/+]on Nov 21, 2023
I don't disagree with a quick patch for this particular case, but up/down handling and tab key handling are totally separate right now, and that's a major flaw. Both appearance and controls of tab key and arrow key navigation should be identical. This is not limited to this view, it's a general issue.
If we try to fix this one small bug at a time the end result is unlikely to be cohesive or forward moving.
Please re-state the problem that we are trying to solve in this issue.
Workspace - the blue focus is not prioritized over the application highlight
What is the root cause of that problem?
Currently, we have the logic that allows the user to choose an option by using the ARROW key and ENTER key: ARROW key is used to change the focused option, and ENTER is used to select this option.
When we change the focused component to option A by using tab key, and using ARROW key to change the focused component to option B, then pressing ENTER, it will call the selectRow with option B rather than option A
What changes do you think we should make in order to solve the problem?
In BaseSelectionList, we can create the state [isFocusedIndexByTab, setIsFocusedIndexByTab] to keep track whether we are focusing on any row by using tab key or not
Your proposal looks great. I think we can use item.keyForList instead of normalized index. This value is unique across the SelectionList and always exist. We can find the focused option with
Activity
melvin-bot commentedon Nov 21, 2023
Triggered auto assignment to @laurenreidexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.[-]Workspace - the blue focus is not prioritized over the application highlight[/-][+][$500] Workspace - the blue focus is not prioritized over the application highlight[/+]melvin-bot commentedon Nov 21, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01b92503dafd950d76
melvin-bot commentedon Nov 21, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Nov 21, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)tienifr commentedon Nov 21, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
We're selecting the row based on highlighted item, and we don't consider the blue focus one
App/src/components/SelectionList/BaseSelectionList.js
Line 239 in 6507621
What changes do you think we should make in order to solve the problem?
normalizedIndexAdd
normalizedIndexto BaseListItemBaseListItem, addtestID={item_${index}}toPressableWithFeedbackResult
Screen.Recording.2023-11-21.at.23.51.54.mov
erquhart commentedon Nov 21, 2023
I don't disagree with a quick patch for this particular case, but up/down handling and tab key handling are totally separate right now, and that's a major flaw. Both appearance and controls of tab key and arrow key navigation should be identical. This is not limited to this view, it's a general issue.
If we try to fix this one small bug at a time the end result is unlikely to be cohesive or forward moving.
DylanDylann commentedon Nov 21, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
[isFocusedIndexByTab, setIsFocusedIndexByTab]to keep track whether we are focusing on any row by using tab key or notApp/src/components/SelectionList/BaseSelectionList.js
Line 300 in 51781a7
to:
App/src/components/SelectionList/BaseSelectionList.js
Lines 358 to 363 in 51781a7
to:
useKeyboardShortcut(CONST.KEYBOARD_SHORTCUTS.ENTER, selectFocusedOption, { captureOnInputs: true, shouldBubble: () => !flattenedSections.allOptions[focusedIndex], shouldStopPropagation, + isActive: !disableKeyboardShortcuts && !disableEnterShortcut && isFocused && isFocusedIndexByTab, });What alternative solutions did you explore? (Optional)
dummy-1111 commentedon Nov 21, 2023
@tienifr
Your proposal looks great. I think we can use
item.keyForListinstead of normalized index. This value is unique across theSelectionListand always exist. We can find the focused option withThis way, we don't need extra props(normalizedIndex).
27 remaining items
laurenreidexpensify commentedon Dec 18, 2023
Payment Summary:
laurenreidexpensify commentedon Dec 18, 2023
@thesahindia pls update checklist thanks
laurenreidexpensify commentedon Dec 20, 2023
Waiting for checklist to be completed
thesahindia commentedon Dec 22, 2023
We can skip the checklist on this one. This is how it was from the starting.
If we want we can add a test case. Steps:-
melvin-bot commentedon Dec 26, 2023
@mountiny, @laurenreidexpensify, @thesahindia, @tienifr Huh... This is 4 days overdue. Who can take care of this?
mountiny commentedon Dec 26, 2023
I think we do not need the new regression test for this
melvin-bot commentedon Dec 28, 2023
@mountiny, @laurenreidexpensify, @thesahindia, @tienifr Still overdue 6 days?! Let's take care of this!
JmillsExpensify commentedon Jan 14, 2024
$500 payment approved for @thesahindia based on this comment.