-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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-12-15] [$500] Web - Workspace - Selecting Cancel and pressing Enter key via keyboard updates default currency to USD #32294
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01a44752663555a980 |
Triggered auto assignment to @anmurali ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ArekChr ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.=Pressing enter while focus on the Cancel button will update the currency to USD and close the modal. What is the root cause of that problem?In the workspace currency update modal, the Update to USD button has a App/src/components/ConfirmContent.js Lines 123 to 128 in 56a368b
So, even when we focus on the cancel button, the confirm button press is still triggered. What changes do you think we should make in order to solve the problem?Disable the
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Pressing enter while focusing on the "Cancel" button triggers the "Confirm" button action What is the root cause of that problem?We use App/src/components/ConfirmContent.js Lines 123 to 131 in 56a368b
This triggers the button press when the "Enter" is pressed no matter what element was focused. What changes do you think we should make in order to solve the problem?While applying the App/src/components/Button/index.tsx Lines 163 to 171 in 7d5f796
We should alter the logic that determines whether the above-mentioned App/src/components/Button/validateSubmitShortcut/index.ts Lines 13 to 21 in ec3f466
We are already checking if the focused element during pressing const eventTarget = event?.target as HTMLElement;
- if (!isFocused || isDisabled || isLoading || eventTarget.nodeName === 'TEXTAREA') {
+ if (!isFocused || isDisabled || isLoading || eventTarget.nodeName === 'TEXTAREA' || eventTarget.dataset.tag === 'pressable') {
return false;
} Result:Screen.Recording.2023-11-30.at.20.24.36-compressed.mp4What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Selecting Cancel and pressing Enter key via keyboard updates default currency to USD What is the root cause of that problem?We pass
App/src/components/Button/index.tsx Line 164 in 6301426
What changes do you think we should make in order to solve the problem?We should check if the active element has
App/src/components/Button/index.tsx Line 173 in 6301426
OPTION: We can also update this condition in
What alternative solutions did you explore? (Optional)We can check |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
App/src/components/ConfirmContent.js Lines 123 to 131 in dad6391
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
ResultScreencast.from.01-12-2023.17.54.51.webm |
ProposalPlease re-state the problem that we are trying to solve in this issue.In the What is the root cause of that problem?Here, we use Now, since we use What changes do you think we should make in order to solve the problem?Since
We also need to add What alternative solutions did you explore? (Optional) |
@paultsimura understands the root cause, and the proposal delivered a working solution first. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @mountiny, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Did we start fixing keyboard accessibility issues? |
@ArekChr Check data-tag isn't enough because for |
@ArekChr what do you think of the concerns shared here before I pick the solution? I think we can fix this specific issue |
@dukenv0307 Could you elaborate? To what component does |
@ArekChr We can fix this globally to avoid any issue like this. For example, in Screen.Recording.2023-12-05.at.16.46.01.mov |
@dukenv0307 Thanks for the clarification! We should avoid further issues if the confirm modal has different elements rather than just checking the pressable tag. After rethinking, I've decided to approve @dukenv0307 proposal. This new approach will solve the problem in a better way. As you mentioned, it also helps us with other app parts, like the link button and elements like the radio button or checkbox, which do not exist yet. |
Current assignee @mountiny is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
I had a quick look at the approved proposal and have a query. |
@rojiphil we will not subscribe to the enter key event of the button if the active element (focused element) has a role link, button, ... not do not subscribe to the key events for elements with the mentioned accessibility roles (e.g. link, button). |
📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@ArekChr The PR is ready for review. |
Merged! thanks! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.9-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 2023-12-15. 🎊 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:
|
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:
|
@anmurali, @ArekChr, @mountiny, @dukenv0307 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@ArekChr @dukenv0307 could you please handle the checklist before payment? |
Regression test proposal
Do we agree 👍 or 👎 |
@anmurali, @ArekChr, @mountiny, @dukenv0307 Huh... This is 4 days overdue. Who can take care of this? |
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.6-1
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:
Prerequisite: Default currency is not set as USD for the workspace
Expected Result:
Workspace currency popup is closed without any change to default currency
Actual Result:
Although user selects Cancel and presses Enter key via keyboard, default currency is updated to USD instead of closing the popup
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6296333_1701367620093.2023-11-30_20-04-19.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @anmuraliThe text was updated successfully, but these errors were encountered: