Skip to content
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-07] [$500] Address - Blue border appears around the row and the field is not focused when using Tab key #31203

Closed
2 of 6 tasks
lanitochka17 opened this issue Nov 10, 2023 · 33 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Nov 10, 2023

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.3.98-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:
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:

  1. Navigate to staging.new.expensify.com
  2. Go to Settings > Profile > Personal details > Address
  3. Click on any field
  4. Navigate to the next field with tab key

Expected Result:

The next field will be focused with just one click

Actual Result:

A blue border appears around the field and the next field is not focused. It is only focused after pressing Tab key for the second time
This issue also happens in other area of the app that involve entering value

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

Bug6271705_1699645153642.20231111_002549.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e6211747d5d8420e
  • Upwork Job ID: 1723065952129036288
  • Last Price Increase: 2023-11-17
  • Automatic offers:
    • Ollyws | Reviewer | 27794733
    • tienifr | Contributor | 27794734
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 10, 2023
@melvin-bot melvin-bot bot changed the title Address - Blue border appears around the row and the field is not focused when using Tab key [$500] Address - Blue border appears around the row and the field is not focused when using Tab key Nov 10, 2023
Copy link

melvin-bot bot commented Nov 10, 2023

Triggered auto assignment to @isabelastisser (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Copy link

melvin-bot bot commented Nov 10, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01e6211747d5d8420e

Copy link

melvin-bot bot commented Nov 10, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 10, 2023
Copy link

melvin-bot bot commented Nov 10, 2023

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

@tienifr
Copy link
Contributor

tienifr commented Nov 10, 2023

Proposal

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

Blue border appears around the row and the field is not focused when using Tab key. This issue happens to all TextInput components.

What is the root cause of that problem?

The container wrapping text input is intentionally set with tabIndex=-1 to avoid navigating by tab to focus on itself.

However inside WebGenericPressable, we do not pass tabIndex properly:

tabIndex={!accessible || !focusable ? -1 : 0}

Previously we used focusable to determine tabIndex. However, now focusable is replaced with tabIndex due to RNW upgrade. Therefore, if tabIndex is used, we should prioritize it and should not depend merely on focusable (deprecated) and accessible.

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

Pass tabIndex like this:

tabIndex={props.tabIndex ?? (!accessible || !focusable ? -1 : 0)}

What alternative solutions did you explore? (Optional)

NA

@s-alves10
Copy link
Contributor

Proposal

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

Blue border appears on the row when pressing tab key in the address page

What is the root cause of that problem?

To prevent focusing by tab, we set tabIndex=-1 below

but tabIndex is changed here

tabIndex={!accessible || !focusable ? -1 : 0}

This is the root cause

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

I think we need to use props.tabIndex if exists
Update

tabIndex={!accessible || !focusable ? -1 : 0}

to

            tabIndex={props.tabIndex ?? (!accessible || !focusable) ? -1 : 0}

This works as expected

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Nov 13, 2023
@isabelastisser
Copy link
Contributor

Hey @Ollyws, can you please review the proposals above? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Nov 13, 2023
@isabelastisser
Copy link
Contributor

@Ollyws please provide an update. Thanks!

@erquhart
Copy link
Contributor

erquhart commented Nov 17, 2023

This is a regression caused by #31118, the fix for #31098.

Copy link

melvin-bot bot commented Nov 17, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@jeet-dhandha
Copy link
Contributor

Proposal

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

  • Issue is that we are not able to focus on next textinput.

What is the root cause of that problem?

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

  • We should check if tabIndex is undefined or not and then forward it. We are checking if it is undefined or not as we might want to focus it by passing 0 as tabIndex. And thus we can't use short hand operator || like this tabIndex={props.tabIndex || (!accessible || !focusable ? -1 : 0)} as it will not forward 0 as tabIndex.
const tabIndex = props.tabIndex !== undefined ? props.tabIndex : !accessible || !focusable ? -1 : 0;

tabIndex={tabIndex}

What alternative solutions did you explore? (Optional)

  • If we are sure we don't want Pressable in BaseTextInput/index.js then we pass accessible={false} like we did in CheckboxWithLabel.

This also resolves our issue but i wasn't sure if this could affect other parts of the code or not.

@melvin-bot melvin-bot bot added the Overdue label Nov 20, 2023
Copy link

melvin-bot bot commented Nov 20, 2023

@Ollyws, @isabelastisser Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Nov 22, 2023

@Ollyws, @isabelastisser Huh... This is 4 days overdue. Who can take care of this?

@Ollyws
Copy link
Contributor

Ollyws commented Nov 22, 2023

@tienifr's proposal looks good to me.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Nov 22, 2023

Triggered auto assignment to @deetergp, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 24, 2023
@tienifr
Copy link
Contributor

tienifr commented Nov 24, 2023

PR ready for review #31810.

@isabelastisser
Copy link
Contributor

@Ollyws any updates here?

@Ollyws
Copy link
Contributor

Ollyws commented Nov 28, 2023

PR is merged.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 30, 2023
@melvin-bot melvin-bot bot changed the title [$500] Address - Blue border appears around the row and the field is not focused when using Tab key [HOLD for payment 2023-12-07] [$500] Address - Blue border appears around the row and the field is not focused when using Tab key Nov 30, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 30, 2023
Copy link

melvin-bot bot commented Nov 30, 2023

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

Copy link

melvin-bot bot commented Nov 30, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.5-7 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-07. 🎊

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.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

Copy link

melvin-bot bot commented Nov 30, 2023

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:

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 7, 2023
@isabelastisser
Copy link
Contributor

@Ollyws can you please complete the list above? Thanks!

@isabelastisser
Copy link
Contributor

@Ollyws and @tienifr please accept the offers in Upwork and I will process the payments. Thanks!

@Ollyws requires payment offer (Reviewer)
@tienifr requires payment offer (Contributor)

@tienifr
Copy link
Contributor

tienifr commented Dec 8, 2023

@isabelastisser I accepted, thanks!

@isabelastisser
Copy link
Contributor

Bump @Ollyws to complete the checklist above. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Dec 11, 2023
@isabelastisser
Copy link
Contributor

Hey @Ollyws, can you please complete the checklist above? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Dec 11, 2023
@Ollyws
Copy link
Contributor

Ollyws commented Dec 11, 2023

BugZero Checklist:

  • The PR that introduced the bug has been identified. Link to the PR:

This started occuring due to the RNW upgrade but we can't really call it a regression as it's out of our hands.

  • 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.

This is a minor visual issue that doesn't really affect the flow in any significant way so I don't think a regression test is necessary here.

@isabelastisser
Copy link
Contributor

Thanks! @Ollyws, please accept the offer in Upwork.

@Ollyws
Copy link
Contributor

Ollyws commented Dec 11, 2023

Accepted, thanks!

@Ollyws
Copy link
Contributor

Ollyws commented Dec 14, 2023

@isabelastisser The job is still open and unpaid on upwork for me if you could take a look, thanks!

@isabelastisser
Copy link
Contributor

All set!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants