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 C+ Payment] [$1000] Slow animation on sign in input #23137

Closed
1 of 6 tasks
kavimuru opened this issue Jul 18, 2023 · 69 comments
Closed
1 of 6 tasks

[HOLD C+ Payment] [$1000] Slow animation on sign in input #23137

kavimuru opened this issue Jul 18, 2023 · 69 comments
Assignees
Labels
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

@kavimuru
Copy link

kavimuru commented Jul 18, 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. Go to staging.new.expensify.com
  2. Focus the the sign-in input
  3. Click somewhere else

Expected Result:

Expected that on Safari, the animation of labels is similar to speed as on Chrome.

Actual Result:

Slow animation on Safari

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 /Safari
  • MacOS / Desktop

Version Number:
Reproducible in staging?: needs reproduction
Reproducible in production?: needs reproduction
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

Screen.Recording.2023-07-17.at.6.51.40.PM.mp4

Expensify/Expensify Issue URL:
Issue reported by: @spacexdragonpie
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689595055183879

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0177b62cd207274e58
  • Upwork Job ID: 1682027803637739520
  • Last Price Increase: 2023-07-20
  • Automatic offers:
    • dantastisk | Contributor | 25888135
    • spacexdragonpie | Reporter | 25888136
@kavimuru kavimuru added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Jul 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 18, 2023

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

@melvin-bot
Copy link

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

@CortneyOfstad
Copy link
Contributor

Was able to recreate this, so getting eyes on it

@CortneyOfstad CortneyOfstad added the External Added to denote the issue can be worked on by a contributor label Jul 20, 2023
@melvin-bot melvin-bot bot changed the title Slow animation on sign in input [$1000] Slow animation on sign in input Jul 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0177b62cd207274e58

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 20, 2023
@CortneyOfstad CortneyOfstad removed Needs Reproduction Reproducible steps needed Help Wanted Apply this label when an issue is open to proposals by contributors labels Jul 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

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

@b4s36t4
Copy link
Contributor

b4s36t4 commented Jul 20, 2023

Proposal

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

Slow animation on sign in input

What is the root cause of that problem?

RCA for this issue is with the background SVG we're rendering and the position of it.

If we observe the svg that is on background it is covered into whole screen whereas it should be covered fully into the scrollview only.

Not sure why having an SVG into background would interrupt animations only in safari :)
Screenshot 2023-07-20 at 8 20 08 PM

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

We would need to add style prop here


and pass styles.signInBackgroundDesktop to style prop here
would solve the issue.

What alternative solutions did you explore? (Optional)

NA, I feel this is the only solution to this issue.
uu.webm

@andreyazevedo
Copy link

andreyazevedo commented Jul 20, 2023

Proposal

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

Slow animation on the input labels of the login page in Safari. There is also laggy in the Lottie animation on the right side mentioned at #22994

What is the root cause of that problem?

The issue is caused by the home-background--desktop.svg. It is not well-optimized, which is causing a widespread performance problem on the page. By fixing it, both issues are resolved: the input label animation and the animation on the right side of the screen, as can be seen in the video below:

Screen.Recording.2023-07-20.at.14.59.18.mov

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

Optimize SVG file.

What alternative solutions did you explore? (Optional)

Not applicable.

@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

📣 @andreyazevedo! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@CortneyOfstad
Copy link
Contributor

@rushatgabhane any thoughts on the proposals above?

@dantastisk
Copy link
Contributor

Proposal

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

Slow/Laggy animations on sign in page in Safari.

What is the root cause of that problem?

home-background--desktop.svg does not have position: absolute causing a ton of unnecessary recalculations.

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

Styles exist for both mobile and desktop in styles.js:

App/src/styles/styles.js

Lines 1136 to 1148 in b7d17e0

signInBackgroundDesktop: {
position: 'absolute',
bottom: 0,
left: 0,
minHeight: 700,
},
signInBackgroundMobile: {
position: 'absolute',
bottom: 0,
left: 0,
minHeight: 700,
},

However they are only passed to the mobile version:

src/pages/signin/SignInPageLayout/index.js:

<BackgroundImage
isSmallScreen={false}
pointerEvents="none"
width={variables.signInHeroBackgroundWidth}
/>

<BackgroundImage
isSmallScreen
pointerEvents="none"
width={variables.signInHeroBackgroundWidthMobile}
style={styles.signInBackgroundMobile}
/>

src/pages/signin/SignInPageLayout/BackgroundImage/index.js:

https://github.com/Expensify/App/blob/b7d17e0fd33b83e9fbd45146b6123b6323ece79e/src/pages/signin/SignInPageLayout/BackgroundImage/index.js#L18C1-L29

Since the styles are the same for both platforms, I suggest merging them into one "signInBackground" in styles.js, getting rid of the style prop passed from SignInPageLayout to BackgroundImage and importing it directly from styles here.

expensify_laggy_animations_fix.mov

@melvin-bot
Copy link

melvin-bot bot commented Jul 22, 2023

📣 @dantastisk! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@dantastisk
Copy link
Contributor

Contributor details
Your Expensify account email: daniel.s.brinkmann@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0156e09e08684e6201

@melvin-bot
Copy link

melvin-bot bot commented Jul 22, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@melvin-bot melvin-bot bot added the Overdue label Jul 24, 2023
@CortneyOfstad
Copy link
Contributor

@rushatgabhane Any thoughts on the proposals?

@melvin-bot melvin-bot bot removed the Overdue label Jul 24, 2023
@rk111
Copy link

rk111 commented Jul 24, 2023

Proposal

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

The problem we are trying to solve is that there are slow and laggy animations on the sign-in page in Safari.

What is the root cause of that problem?

The root cause of this problem is that the "home-background--desktop.svg" does not have a "position: absolute" property, which leads to a large number of unnecessary recalculations during animations.

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

To solve the problem, we should make the following changes:

In the "styles.js" file, merge the styles for both mobile and desktop versions of the "signInBackground" into one style with the "position: absolute" property.

signInBackground: {
  position: 'absolute',
  bottom: 0,
  left: 0,
  minHeight: 700,
},

In the "SignInPageLayout/index.js" file, remove the "style" prop passed to the "BackgroundImage" component and import the "signInBackground" style directly from the "styles.js" file.


<BackgroundImage
  isSmallScreen
  pointerEvents="none"
  width={variables.signInHeroBackgroundWidthMobile}
/>

import styles from '../../styles/styles';

<BackgroundImage
  isSmallScreen
  pointerEvents="none"
  width={variables.signInHeroBackgroundWidthMobile}
  style={styles.signInBackground}
/>

By making these changes, we ensure that the "home-background--desktop.svg" is positioned absolutely, eliminating unnecessary recalculations and improving the performance of animations on the sign-in page in Safari.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Aug 17, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Slow animation on sign in input [HOLD for payment 2023-08-24] [$1000] Slow animation on sign in input Aug 17, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.54-13 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-08-24. 🎊

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 -- paid @spacexdragonpie $250
  • Contributor that fixed the issue -- paid @dantastisk $1000 and the bonus, based on the comment here
  • Contributor+ that helped on the issue and/or PR -- to be paid in eChat

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

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

  • [@rushatgabhane] The PR that introduced the bug has been identified. Link to the PR:
  • [@rushatgabhane] 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:
  • [@rushatgabhane] 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:
  • [@rushatgabhane] Determine if we should create a regression test for this bug.
  • [@rushatgabhane] 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.
  • [@CortneyOfstad / @sophiepintoraetz] 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 Aug 23, 2023
@CortneyOfstad
Copy link
Contributor

@rushatgabhane Any update on the checklist above? TIA!

@rushatgabhane
Copy link
Member

I'm waiting for the existing manual payment requests to be approved. So maybe 2 days??

I'll then complete all pending checklists and request payment on new dot.

@CortneyOfstad
Copy link
Contributor

Sounds good @rushatgabhane — payments have been confirmed and contracts closed for @spacexdragonpie and @dantastisk so they are all set!

@CortneyOfstad CortneyOfstad removed the Awaiting Payment Auto-added when associated PR is deployed to production label Aug 24, 2023
@CortneyOfstad CortneyOfstad changed the title [HOLD for payment 2023-08-24] [$1000] Slow animation on sign in input [HOLD C+ Payment] [$1000] Slow animation on sign in input Aug 24, 2023
@melvin-bot melvin-bot bot added the Overdue label Aug 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

@CortneyOfstad, @joelbettner, @rushatgabhane, @sophiepintoraetz, @dantastisk Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@CortneyOfstad
Copy link
Contributor

@rushatgabhane Just checking to see where we're at — thanks!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 28, 2023
@CortneyOfstad
Copy link
Contributor

Bump @rushatgabhane ^^^

@melvin-bot melvin-bot bot removed the Overdue label Aug 31, 2023
@rushatgabhane
Copy link
Member

still waiting for payment to be made

@CortneyOfstad
Copy link
Contributor

@rushatgabhane Okay, if you need me to make a bump internally, just let me know 👍

@sophiepintoraetz
Copy link
Contributor

sophiepintoraetz commented Sep 4, 2023

@CortneyOfstad - make sure you're leaving a summary to this effect and assigning @JmillsExpensify (there's a TE snippet /b0pay)

Payouts due:

Contributor+: $1500 @rushatgabhane

Eligible for 50% #urgency bonus? Y

@rushatgabhane
Copy link
Member

rushatgabhane commented Sep 5, 2023

  1. The PR that introduced the bug has been identified. Link to the PR: Fix mobile home background SVG opacity #21745

  2. 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: https://github.com/Expensify/App/pull/21745/files#r1315348542

  3. 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. Part of checklist

  4. Determine if we should create a regression test for this bug. No

  5. 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 - N.A.

@rushatgabhane
Copy link
Member

Created a manual request here - https://staging.new.expensify.com/r/7881967223525419

this issue can be closed

@JmillsExpensify
Copy link

$1,500 payment approved for @rushatgabhane based on BZ summary.

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

10 participants