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

[$500] Pronouns loses focus on coming back from new group page or search page #26350

Closed
1 of 6 tasks
kavimuru opened this issue Aug 30, 2023 · 26 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Aug 30, 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!


Action Performed:

  1. Open the app
  2. Open settings->profile->pronouns
  3. Open new group page or search page using keyboard shortcut
  4. Go back

Expected Result:

App should not lose focus on coming back to pronouns page

Actual Result:

App loses focus on coming back to pronouns page from new group page or search page

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.59-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
Notes/Photos/Videos: Any additional supporting documentation

app.loses.focus.from.pronouns.on.coming.back.to.that.page.mp4
Recording.1543.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692636606892199

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014c665e819f5153b8
  • Upwork Job ID: 1698565526817005568
  • Last Price Increase: 2023-09-04
  • Automatic offers:
    • Ollyws | Reviewer | 26511522
    • hoangzinh | Contributor | 26511523
    • dhanashree-sawant | Reporter | 26511526
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 30, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 30, 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

@hoangzinh
Copy link
Contributor

hoangzinh commented Aug 31, 2023

Proposal

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

Pronouns loses focus on coming back from new group page or search page

What is the root cause of that problem?

In the PronounsPage component, we're using SelectionList component to render selection, and in SelectionList component, it only focuses on the search input when component is mounted

/** Focuses the text input when the component mounts. If `props.shouldDelayFocus` is true, we wait for the animation to finish */
useEffect(() => {
if (shouldShowTextInput) {
if (shouldDelayFocus) {
focusTimeoutRef.current = setTimeout(() => textInputRef.current.focus(), CONST.ANIMATED_TRANSITION);
} else {
textInputRef.current.focus();
}
}
return () => {
if (!focusTimeoutRef.current) {
return;
}
clearTimeout(focusTimeoutRef.current);
};
}, [shouldDelayFocus, shouldShowTextInput]);

We don't have any logic to refocus on the search input when the component/page refocus

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

In BaseSelectionList, we need to hook into Navigation focus (by using either useIsFocused hook or withNavigationFocus HOC), then we will add it into dependency list of above useEffect (and checking if it's true in the above useEffect as well). It will help to trigger refocus on the search input when the component is focus/refocus.

@melvin-bot melvin-bot bot added the Overdue label Sep 4, 2023
@sophiepintoraetz sophiepintoraetz added the External Added to denote the issue can be worked on by a contributor label Sep 4, 2023
@sophiepintoraetz
Copy link
Contributor

2023-09-04_17-15-22 (1)

@melvin-bot melvin-bot bot changed the title Pronouns loses focus on coming back from new group page or search page [$500] Pronouns loses focus on coming back from new group page or search page Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

Job added to Upwork: https://www.upwork.com/jobs/~014c665e819f5153b8

@melvin-bot melvin-bot bot added Help Wanted Apply this label when an issue is open to proposals by contributors and removed Overdue labels Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

Current assignee @sophiepintoraetz is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@Ollyws
Copy link
Contributor

Ollyws commented Sep 5, 2023

@hoangzinh's proposal looks good to me.
🎀👀🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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

@tgolen
Copy link
Contributor

tgolen commented Sep 5, 2023

🟢 for that proposal.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

📣 @Ollyws 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

📣 @hoangzinh 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

📣 @dhanashree-sawant 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

@tgolen, @hoangzinh, @Ollyws, @sophiepintoraetz Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Sep 11, 2023
@Ollyws
Copy link
Contributor

Ollyws commented Sep 11, 2023

Not overdue, waiting for the PR.

@melvin-bot melvin-bot bot removed the Overdue label Sep 11, 2023
@hoangzinh
Copy link
Contributor

sorry, I missed the notification. I will make the PR within today

@hoangzinh
Copy link
Contributor

@Ollyws @tgolen Thanks for accepting my proposal. The PR is ready here #27147. Please help me review it. Thanks

@Ollyws
Copy link
Contributor

Ollyws commented Sep 15, 2023

@sophiepintoraetz We closed the PR as the issue was fixed by #26415 while we were working on it.

@sophiepintoraetz
Copy link
Contributor

Got it - and it was reported earlier here - I think this issue is essentially a dupe. Apologies for not catching this earlier and thanks for the efforts involved so far!

@Ollyws
Copy link
Contributor

Ollyws commented Sep 17, 2023

@sophiepintoraetz I think according to section 19 of the process doc, in this situation payment is due for the C+ and contributor. Thanks.

@hoangzinh
Copy link
Contributor

@sophiepintoraetz the issue #25893 has been paid and closed.

@sophiepintoraetz
Copy link
Contributor

Cool - olly is paid - reclosing!

@hoangzinh
Copy link
Contributor

@sophiepintoraetz I think according to section 19 of the process doc, in this situation payment is due for the C+ and contributor. Thanks.

@sophiepintoraetz I haven't received the payment as a Contributor yet. Could you help to check? Thanks

@hoangzinh
Copy link
Contributor

@sophiepintoraetz Could you check my comment above? Thanks

@sophiepintoraetz
Copy link
Contributor

You're all set, @hoangzinh.

@hoangzinh
Copy link
Contributor

Thanks @sophiepintoraetz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants