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 2024-09-03] [$250] Chat - Unable to deselect user using The Tab key #47306
What changes do you think we should make in order to solve the problem?
Update the role to role={CONST.ROLE.BUTTON} and accessibilityLabel to accessibilityLabel={item.text ?? ''}.
If needed, we can replace all the use of CONST.ACCESSIBILITY_ROLE in the app with CONST.ROLE.
What alternative solutions did you explore? (Optional)
We can export the KeyboardShortcutComponent from Button/index.tsx and use it inside PressableWithFeedback like we do in Button/index.tsx.
What alternative solutions did you explore? (Optional 2)
We can simply create a handler for onKeyDown prop and prevent default when key is Enter. I think this is the simplest and most straight forward solution. We don't need to include KeyboardShortcutComponent because we don't want a pressable item to capture Enter key events even if it is not focused.
I think this is likely on prod and the automation didn't fire (since two deploys had that happen)... We should confirm and then update the payment date accordingly!
@sakluger I'm like 99% certain this is on prod and we're out of the 7 day window here - do you mind trying to help confirm that, and hopefully be able to issue payment?
changed the title [-][$250] Chat - Unable to deselect user using The Tab key[/-][+][HOLD for Payment 2024-09-03] [$250] Chat - Unable to deselect user using The Tab key[/+]on Sep 10, 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:
[@ZhenjaHorbach] The PR that introduced the bug has been identified. Link to the PR:
Unfortunately, I did not find a suitable PR
Plus this PR is more related to code refactoring and ACCESSIBILITY_ROLE removal
[ @ZhenjaHorbach] 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:
NA
[@ZhenjaHorbach] 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:
NA
[@ZhenjaHorbach] Determine if we should create a regression test for this bug.
[@ZhenjaHorbach] 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 Test Proposal
Go to FAB > Start Chat
Using the tab key and Enter key select add to group multiple results from the contact lists
Use the arrow and tab key and try to deselect the selected users
Activity
melvin-bot commentedon Aug 13, 2024
Triggered auto assignment to @sakluger (
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.Krishna2323 commentedon Aug 13, 2024
Edited by proposal-police: This proposal was edited at 2024-08-13 10:33:23 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Chat - Unable to deselect user using The Tab key
What is the root cause of that problem?
The role is set to
CONST.ACCESSIBILITY_ROLE.CHECKBOX. It should beCONST.ROLE.BUTTONlike here & here.App/src/pages/NewChatPage.tsx
Lines 256 to 262 in 86da342
What changes do you think we should make in order to solve the problem?
Update the
roletorole={CONST.ROLE.BUTTON}andaccessibilityLabeltoaccessibilityLabel={item.text ?? ''}.If needed, we can replace all the use of
CONST.ACCESSIBILITY_ROLEin the app withCONST.ROLE.What alternative solutions did you explore? (Optional)
We can export the
KeyboardShortcutComponentfromButton/index.tsxand use it insidePressableWithFeedbacklike we do inButton/index.tsx.What alternative solutions did you explore? (Optional 2)
We can simply create a handler for
onKeyDownprop and prevent default when key isEnter. I think this is the simplest and most straight forward solution. We don't need to includeKeyboardShortcutComponentbecause we don't want a pressable item to captureEnterkey events even if it is not focused.OR:
We can modify
onPressHandlerto prevent default when the event is an instance ofKeyboardEventand key isEnterWhat alternative solutions did you explore? (Optional 3)
Add
onKeyDown={(e) => e.preventDefault()}.We can also check for the key pressed if needed.
nyomanjyotisa commentedon Aug 13, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Unable to deselect user using Enter when the focus is already changed using Tab key to the selected user icon
What is the root cause of that problem?
We don't handle on enter key press here
App/src/pages/NewChatPage.tsx
Lines 254 to 266 in 86da342
While on "Add to group" we use button component for it, so it already have a on key press handle
What changes do you think we should make in order to solve the problem?
create
KeyboardShortcutComponentto toggle option when it is focused and enter key pressed and use it hereWhat alternative solutions did you explore? (Optional)
Krishna2323 commentedon Aug 13, 2024
Proposal Updated
Note: The proposal above came just few seconds before I update the my proposal the minutes are the same. Just noting it down for C+.
Krishna2323 commentedon Aug 13, 2024
Proposal Updated
Krishna2323 commentedon Aug 13, 2024
Proposal Updated
melvin-bot commentedon Aug 13, 2024
Job added to Upwork: https://www.upwork.com/jobs/~018da70c1cbe5cf980
[-]Chat - Unable to deselect user using The Tab key[/-][+][$250] Chat - Unable to deselect user using The Tab key[/+]19 remaining items
Krishna2323 commentedon Aug 20, 2024
@ZhenjaHorbach, PR ready for review ^
dangrous commentedon Sep 4, 2024
I think this is likely on prod and the automation didn't fire (since two deploys had that happen)... We should confirm and then update the payment date accordingly!
dangrous commentedon Sep 9, 2024
@sakluger I'm like 99% certain this is on prod and we're out of the 7 day window here - do you mind trying to help confirm that, and hopefully be able to issue payment?
sakluger commentedon Sep 10, 2024
I confirmed that this is live on prod! Moving to daily and handling payment.
[-][$250] Chat - Unable to deselect user using The Tab key[/-][+][HOLD for Payment 2024-09-03] [$250] Chat - Unable to deselect user using The Tab key[/+]sakluger commentedon Sep 10, 2024
Summarizing payment on this issue:
Contributor: @ZhenjaHorbach $250, paid via Upwork
Contributor+: @Krishna2323 $250, paid via Upwork
@ZhenjaHorbach do you think we need regression test steps here? If so, could you please leave proposed test steps?
ZhenjaHorbach commentedon Sep 10, 2024
Unfortunately, I did not find a suitable PR
Plus this PR is more related to code refactoring and ACCESSIBILITY_ROLE removal
NA
NA
Regression Test Proposal
Do we agree 👍 or 👎
ZhenjaHorbach commentedon Sep 10, 2024
@sakluger
Done !
sakluger commentedon Sep 11, 2024
Thanks!