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 2024-07-25] [$250] Incorrect animation when accessing Referral information page #44745

Closed
1 of 6 tasks
m-natarajan opened this issue Jul 2, 2024 · 27 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

@m-natarajan
Copy link

m-natarajan commented Jul 2, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.3-6
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: @shawnborton
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1719906639184049

Action Performed:

  1. Open app
  2. From global menu click on 'Fab' > start chat
  3. From the bottom of the page click on the referral banner

Expected Result:

Animation should correct when RHP page for referral is opened

Actual Result:

The transition from Start a chat to the Referral RHP page is incorrect.

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

CleanShot.2024-07-02.at.09.49.52.mp4
Recording.281.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018c7e0a6ee4ee4a2e
  • Upwork Job ID: 1808294158595817715
  • Last Price Increase: 2024-07-03
  • Automatic offers:
    • nkdengineer | Contributor | 103052448
Issue OwnerCurrent Issue Owner: @lschurr
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 2, 2024
Copy link

melvin-bot bot commented Jul 2, 2024

Triggered auto assignment to @lschurr (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.

@neonbhai
Copy link
Contributor

neonbhai commented Jul 2, 2024

Proposal

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

Incorrect animation when accessing Referral information page

What is the root cause of that problem?

On the Participants screen we autofocus the text input, which interrupts the animation making it janky. To handle the animations correctly we need it to be a part of screens with autofocus here

It occurs as FocusTrap tries to override the autofocus behavior of the page (for the initialFocus behaviour), causing the animations to be interrupted

// We don't want to ovverride autofocus on these screens.
initialFocus: () => {
if (SCREENS_WITH_AUTOFOCUS.includes(activeRouteName)) {
return false;
}

InitialFocus tries to focus on the first element (which is not the textInput for this page):

Screenshot 2024-07-03 at 3 51 34 PM

We solve a similar issue with sign page in #43985

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

We should add SCREENS.MONEY_REQUEST.STEP_PARTICIPANTS to SCREENS_WITH_AUTOFOCUS

const SCREENS_WITH_AUTOFOCUS: string[] = [
...Object.keys(CENTRAL_PANE_WORKSPACE_SCREENS),
SCREENS.REPORT,
SCREENS.REPORT_DESCRIPTION_ROOT,
SCREENS.PRIVATE_NOTES.EDIT,
SCREENS.SETTINGS.PROFILE.STATUS,
SCREENS.SETTINGS.PROFILE.PRONOUNS,
SCREENS.NEW_TASK.DETAILS,
SCREENS.MONEY_REQUEST.CREATE,
];

Result:

This works perfectly:

Screen.Recording.2024-07-03.at.2.21.26.AM.mov

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Jul 3, 2024
@melvin-bot melvin-bot bot changed the title Incorrect animation when accessing Referral information page [$250] Incorrect animation when accessing Referral information page Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

Job added to Upwork: https://www.upwork.com/jobs/~018c7e0a6ee4ee4a2e

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

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

@nkdengineer
Copy link
Contributor

Proposal

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

What is the root cause of that problem?

After we implement the focus trap, the animation can be janky if we navigate to a screen that is not a screen with autofocus in RHP or LHP.

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

We should add the refer page to SCREENS_WITH_AUTOFOCUS

SCREENS.REFERRAL_DETAILS,

https://github.com/nkdengineer/App/blob/3b18d08786c0f8960f2824261350b8ba0244b7bc/src/components/FocusTrap/SCREENS_WITH_AUTOFOCUS.ts#L4

What alternative solutions did you explore? (Optional)

@jnowakow
Copy link
Contributor

jnowakow commented Jul 3, 2024

It also happens on chat details screens:

rhp-bug.mov
rhp-2.mov

And also on Search:

rhp-3.mov

@Ollyws
Copy link
Contributor

Ollyws commented Jul 3, 2024

@neonbhai Could you expand the RCA a little, because in the PR that added the focus-trap (#39520) this issue does not occur.

@neonbhai
Copy link
Contributor

neonbhai commented Jul 3, 2024

@Ollyws hi, I've updated the proposal here

@Ollyws
Copy link
Contributor

Ollyws commented Jul 3, 2024

@neonbhai Thanks for the update but what I'm asking is, if it wasn't the focus-trap PR that caused this issue...what caused it?

@neonbhai
Copy link
Contributor

neonbhai commented Jul 4, 2024

Reading through the code says the animation should be interrupted from the focus trap PR itself, since SCREENS_WITH_AUTOFOCUS was created to fix this problem and at the start didn't include our screen.

It took some time but I caught the behaviour on eb3b5389bb (focus trap PR last commit)

Screen.Recording.2024-07-04.at.6.57.52.AM.mp4

Cannot reproduce this at all on ebc8de8 (parent commit to focus trap PR)

cc: @Ollyws

@Ollyws
Copy link
Contributor

Ollyws commented Jul 4, 2024

Ahh ok thanks @neonbhai, I think what's happened here is that the initial culprit was the focus-trap PR (#39520), but this issue only became visibly apparent after enabling concurrent mode (#42592).

@neonbhai's solution LGTM.
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Jul 4, 2024

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

@Ollyws
Copy link
Contributor

Ollyws commented Jul 4, 2024

Actually @neonbhai, although it's on the right track your solution doesn't seem to be working:

Screen.Recording.2024-07-04.at.10.50.44.mov

@nkdengineer
Copy link
Contributor

@Ollyws Can you please check my proposal, I tested and it works well.

@Ollyws
Copy link
Contributor

Ollyws commented Jul 4, 2024

Ah yes SCREENS.REFERRAL_DETAILS, is the correct screen so let's go with @nkdengineer's proposal.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Jul 4, 2024

Current assignee @chiragsalian is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

Copy link

melvin-bot bot commented Jul 9, 2024

@Ollyws, @chiragsalian, @lschurr Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Jul 9, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 9, 2024
Copy link

melvin-bot bot commented Jul 9, 2024

📣 @nkdengineer 🎉 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 melvin-bot bot removed the Overdue label Jul 9, 2024
@chiragsalian
Copy link
Contributor

Oops not sure how i missed this. @nkdengineer's proposal LGTM. Looks like lauren just assigned the issue to you. Feel free to create a PR 🙂

@nkdengineer
Copy link
Contributor

@Ollyws The PR is here.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 18, 2024
@melvin-bot melvin-bot bot changed the title [$250] Incorrect animation when accessing Referral information page [HOLD for payment 2024-07-25] [$250] Incorrect animation when accessing Referral information page Jul 18, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 18, 2024
Copy link

melvin-bot bot commented Jul 18, 2024

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

Copy link

melvin-bot bot commented Jul 18, 2024

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

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

Copy link

melvin-bot bot commented Jul 18, 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:

  • [@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.
  • [@lschurr] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@Ollyws
Copy link
Contributor

Ollyws commented Jul 20, 2024

We're closing the PR because #44932 already fixed the issue while we were working on it. According to the C+ doc section 17 the contributor and C+ are due compensation in this situation, thanks!

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 24, 2024
@lschurr
Copy link
Contributor

lschurr commented Jul 26, 2024

Payment summary:

@lschurr lschurr closed this as completed Jul 26, 2024
@Ollyws
Copy link
Contributor

Ollyws commented Jul 26, 2024

Requested on ND.

@JmillsExpensify
Copy link

$250 approved for @Ollyws

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