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-10-02] [$500] mWeb - Opening smaller profile pic from request money details causes zoom in zoom out glitch #26882

Closed
1 of 6 tasks
kbecciv opened this issue Sep 6, 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

@kbecciv
Copy link

kbecciv commented Sep 6, 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:

Precondition: User should have another user in recent chats that has profile pic which does not cover full width on opening

  1. Open the app in android chrome
  2. Click on plus and click on request money
  3. Enter any amount and click next
  4. Select the user with smaller profile pic
  5. Click on user profile to open user details
  6. Click on profile pic and observe that it zooms in and zooms out in few seconds

Expected Result:

App should not glitch when opening smaller profile pic from user details page

Actual Result:

App glitches when opening smaller profile pic from user details visited from details page of request money

Workaround:

Unknown

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

glitch.on.opening.profile.pic.mp4
Screen_Recording_20230906_105609_Chrome.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01845037b08588f72c
  • Upwork Job ID: 1702059344831913984
  • Last Price Increase: 2023-09-13
  • Automatic offers:
    • dukenv0307 | Contributor | 26743899
    • dhanashree-sawant | Reporter | 26743903
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 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

@kevinksullivan
Copy link
Contributor

@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

@kevinksullivan Whoops! This issue is 2 days overdue. Let's get this updated quick!

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

melvin-bot bot commented Sep 11, 2023

@kevinksullivan Whoops! This issue is 2 days overdue. Let's get this updated quick!

@kevinksullivan
Copy link
Contributor

Bumping slack

@melvin-bot melvin-bot bot removed the Overdue label Sep 13, 2023
@kevinksullivan kevinksullivan added the External Added to denote the issue can be worked on by a contributor label Sep 13, 2023
@melvin-bot melvin-bot bot changed the title mWeb - Opening smaller profile pic from request money details causes zoom in zoom out glitch [$500] mWeb - Opening smaller profile pic from request money details causes zoom in zoom out glitch Sep 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01845037b08588f72c

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

melvin-bot bot commented Sep 13, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

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

@kevinksullivan
Copy link
Contributor

confirmed reproducible and moving forward.

@dukenv0307
Copy link
Contributor

dukenv0307 commented Sep 14, 2023

Proposal

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

App glitches when opening smaller profile pic from user details visited from details page of request money

What is the root cause of that problem?

Here, we'll show the image as soon as isLoading becomes false, however the zoomScale is set after isLoading, so there's a brief time isLoading is false but zoomScale is still 0, causing the resizeMode to be contain here. So the small image initially fills the screen, until resizeMode becomes center right after that (after the zoomScale state is set), then it moves to the correct size and position.

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

We can update this line to

style={(isLoading || zoomScale === 0) ? undefined : [styles.w100, styles.h100]}

so we'll make sure to only show the image after the zoomScale is set.

This line can be updated similarly as well so we still show the loading indicator when zoomScale is not set yet.

What alternative solutions did you explore? (Optional)

We can make sure zoomScale state is always set already before we set isLoading to false. We can do that by setting isLoading to false only in useEffect after the zoomScale becomes set

useEffect(() => {
    if (zoomScale > 0) {
        setIsLoading(false);
    }
}, [zoomScale])

Another alternative, we can probably remove the isLoading state and derive it from the zoomScale instead, since they are always updated along side each other, and if zoomScale = 0 / > 0, it pretty much means that isLoading is true / false

const isLoading = zoomScale === 0;

@kevinksullivan
Copy link
Contributor

Hey @sobitneupane what do you think about the proposal above?

@melvin-bot melvin-bot bot added the Overdue label Sep 18, 2023
@sobitneupane
Copy link
Contributor

sobitneupane commented Sep 18, 2023

Thanks for the proposal @dukenv0307
Proposal from @dukenv0307 looks good to me.

🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Sep 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

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

@Li357
Copy link
Contributor

Li357 commented Sep 19, 2023

@dukenv0307 Proposal looks good, thanks!

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

melvin-bot bot commented Sep 19, 2023

📣 @sobitneupane Please request via NewDot manual requests for the Reviewer role ($500)

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Sep 19, 2023
@dukenv0307
Copy link
Contributor

@sobitneupane The PR is ready for review

@melvin-bot
Copy link

melvin-bot bot commented Sep 21, 2023

🎯 ⚡️ Woah @sobitneupane / @dukenv0307, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @dukenv0307 got assigned: 2023-09-19 01:54:39 Z
  • when the PR got merged: 2023-09-21 07:38:39 UTC

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 25, 2023
@melvin-bot melvin-bot bot changed the title [$500] mWeb - Opening smaller profile pic from request money details causes zoom in zoom out glitch [HOLD for payment 2023-10-02] [$500] mWeb - Opening smaller profile pic from request money details causes zoom in zoom out glitch Sep 25, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.73-1 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-10-02. 🎊

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:

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 Sep 25, 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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
  • [@sobitneupane] 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:
  • [@sobitneupane] 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:
  • [@sobitneupane] Determine if we should create a regression test for this bug.
  • [@sobitneupane] 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.
  • [@kevinksullivan] 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 Overdue and removed Weekly KSv2 labels Oct 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

@Li357, @kevinksullivan, @sobitneupane, @dukenv0307 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot
Copy link

melvin-bot bot commented Oct 6, 2023

@Li357, @kevinksullivan, @sobitneupane, @dukenv0307 Eep! 4 days overdue now. Issues have feelings too...

@sobitneupane
Copy link
Contributor

sobitneupane commented Oct 9, 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:

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

#9279

  • [@sobitneupane] 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/9279/files#r1349952938

  • [@sobitneupane] 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:

This is an edge case missed while introducing new feature.

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

Yes.

  • [@sobitneupane] 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.

#26882 (comment)

@melvin-bot melvin-bot bot removed the Overdue label Oct 9, 2023
@sobitneupane
Copy link
Contributor

Regression Test Proposal

  1. Open the app in android chrome
  2. Use very small image as the profile picture of the user.
  3. Send message
  4. Click on users profile to open user details.
  5. Open the profile picture by clicking on it.
  6. Verify that there is no glitch while opening the picture.

Do we agree 👍 or 👎

@sobitneupane
Copy link
Contributor

sobitneupane commented Oct 9, 2023

#26882 (comment)

As it qualifies for an urgency bonus, I am requesting a payment of $750 in newDot.

@kevinksullivan
Copy link
Contributor

Payment summary

Reporter: @dhanashree-sawant $50
Contributor: @dukenv0307 $750
C+: @sobitneupane $750 (in NewDot)

@kevinksullivan
Copy link
Contributor

Paid out @dhairyasenjaliya and @dukenv0307

@JmillsExpensify
Copy link

$750 payment approved for @sobitneupane based on BZ summary.

@JmillsExpensify
Copy link

Also did the regression test get added? Re-opening to confirm.

@kevinksullivan
Copy link
Contributor

Ah good catch, adding.

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

6 participants