Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.52k stars 2.88k forks source link

[HOLD for payment 2023-12-28] [$500] Settings - Focus lost from message on visiting shortcut and back #33173

Closed kbecciv closed 10 months ago

kbecciv commented 10 months ago

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: v1.4.13-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. Open the app
  2. Open settings->profile->status
  3. Use any keyboard shortcut like CTRL+J to open any shortcut page in RHN
  4. Click on back and observe that app does not focus back on Message field

Expected Result:

App should focus back on Message field on back from any keyboard shortcut on status page

Actual Result:

App does not focus back on Message field on back from any keyboard shortcut on status page

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/93399543/37f49140-124c-4460-9aec-7a84798831d0

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010e6a18e5a303c446
  • Upwork Job ID: 1735697081490046976
  • Last Price Increase: 2023-12-15
  • Automatic offers:
    • Ollyws | Reviewer | 28063848
    • bernhardoj | Contributor | 28063849
melvin-bot[bot] commented 10 months ago

Job added to Upwork: https://www.upwork.com/jobs/~010e6a18e5a303c446

melvin-bot[bot] commented 10 months ago

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

melvin-bot[bot] commented 10 months ago

Bug0 Triage Checklist (Main S/O)

melvin-bot[bot] commented 10 months ago

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

bernhardoj commented 10 months ago

Proposal

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

Status message page doesn't refocus after coming back from another page.

What is the root cause of that problem?

We only set the autoFocus props, but we don't have a logic to refocus it. https://github.com/Expensify/App/blob/6fc070b5538607a5078ecff15d399d913ffb6093/src/pages/settings/Profile/CustomStatus/StatusPage.js#L160-L170

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

Refocus the input every time the status page is refocused.

(we will use the useAutoFocusInput hook and remove the autoFocus & shouldDelayFocus props)

PiyushChandra17 commented 10 months ago

Proposal

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

App does not focus back on Message field on back from any keyboard shortcut

What is the root cause of that problem?

We are missing the ref prop which we set the value to inputCallbackRef which we have to destructure from useAutoFocusInput() hook, here:

https://github.com/Expensify/App/blob/668af1c97b095f87237c12534e7bb4c5412f4f6e/src/pages/settings/Profile/CustomStatus/StatusPage.js#L160-L170

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

We need to apply the following changes:

Note:

What alternative solutions did you explore? (Optional)

NA

Result:

https://github.com/Expensify/App/assets/47579287/dfbd8005-bfaa-4f25-aa02-c3a721b6e4c8

mkhutornyi commented 10 months ago

This is not worth adding to wave project we prioritize

Ollyws commented 10 months ago

@bernhardoj's proposal LGTM. πŸŽ€πŸ‘€πŸŽ€ C+ reviewed

melvin-bot[bot] commented 10 months ago

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

melvin-bot[bot] commented 10 months ago

πŸ“£ @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[bot] commented 10 months ago

πŸ“£ @bernhardoj πŸŽ‰ 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 πŸ“–

bernhardoj commented 10 months ago

PR is ready

cc: @Ollyws

melvin-bot[bot] commented 10 months ago

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

johncschuster commented 10 months ago

@sophiepintoraetz I'm OOO starting Monday, December 18 (today) through Tuesday, January 2.

Current status: PR is ready for review!

If this issue is open when I'm back from OOO, I'll take it back over. Thank you!

sophiepintoraetz commented 10 months ago

@Ollyws @bernhardoj Just to clarify - it looks like the PR has merged so I think we're subject to the 7 day regression period, correct? This would place us at ~26th Dec.~ 28th Dec

If that's correct, unfortuantely, this places us in the middle of my OOO (I'm back 3 Jan) and there will be a lot of OOO at that time, so the payment will be processed once @johncschuster is back in office on 2 Jan. To help facilitate a quick payment, please make sure that you have accepted the offers and that the BZ checklist has been completed prior to 2 Jan!

melvin-bot[bot] commented 10 months ago

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

melvin-bot[bot] commented 10 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.14-6 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-12-28. :confetti_ball:

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:

melvin-bot[bot] commented 10 months ago

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:

Answers here

sophiepintoraetz commented 10 months ago

@johncschuster - as noted here, neither of us will be in office to facilitate payment and to no overload the people who are working over the holidays, I said payment will be processed once you are back in office.

For next time, ideally, you would be keeping this issues to assigned to you or at least please don't unassign yourself from an issue - keep yourself assigned and if the co-assignee ends up completing the chore where they will unassign you. That's all captured in this SO here.

melvin-bot[bot] commented 10 months ago

Issue is ready for payment but no BZ is assigned. @strepanier03 you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

strepanier03 commented 10 months ago

@Ollyws - Please complete the checklist and feel free to ping me when you do so I can finish up here.

@bernhardoj - I've paid you out and closed the contract, thanks for you work!

melvin-bot[bot] commented 10 months ago

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

melvin-bot[bot] commented 10 months ago

@nkuoch, @johncschuster, @strepanier03, @Ollyws, @bernhardoj Whoops! This issue is 2 days overdue. Let's get this updated quick!

Ollyws commented 10 months ago

BugZero Checklist:

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

This has been the behaviour since the creation of the status page.

  • [x] 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

  • [x] 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

  • [x] Determine if we should create a regression test for this bug.

Yes.

  • [x] 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

1. Open Settings > Profile > Status page
2. Verify the message field is auto focused
3. Open another page by using a keyboard shortcut or the Clear After page
4. Go back
5. Verify the message field is auto focused

Do we agree πŸ‘ or πŸ‘Ž

Ollyws commented 10 months ago

@strepanier03 Checklist complete.

strepanier03 commented 10 months ago

Thank you @Ollyws - I'm just getting back into the office today and working on this now. Update soon!

strepanier03 commented 10 months ago

@Ollyws - All set, I've paid out this contract and finished up my steps. Going to close this out now, thanks again everyone!