Skip to content

[C+ Checklist Needs Completion] [$250] IOS - Avatar doesn't get back to its original center position after zooming in and out #53471

Closed

Description

@lanitochka17

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: 9.0.70-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5291133
Email or phone of affected tester (no customers): nathanmulugetatesting+2272@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open hybrid app
  2. Upload a custom avatar for your profile
  3. Open your self DM
  4. Open the avatar to show in full screen
  5. Pinch out to zoom and without releasing our finger pinch in to zoom out and position your fingers to the corner while zooming out and release your fingers

Expected Result:

The position of the avatar gets back to its original center position

Actual Result:

The avatar stays at the position it was released on and doesn't get back to the center

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6683084_1733231204767.ScreenRecording_12-03-2024_15-58-36_1.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021863989062279850488
  • Upwork Job ID: 1863989062279850488
  • Last Price Increase: 2025-02-03
  • Automatic offers:
    • dominictb | Contributor | 106011607

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 3, 2024
  2. melvin-bot commented on Dec 3, 2024

    @melvin-bot

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

  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Dec 3, 2024
  4. changed the title [-]IOS - Avatar doesn't get back to its original center position after zooming in and out[/-] [+][$250] IOS - Avatar doesn't get back to its original center position after zooming in and out[/+] on Dec 3, 2024
  5. melvin-bot commented on Dec 3, 2024

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 3, 2024
  7. melvin-bot commented on Dec 3, 2024

    @melvin-bot

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

  8. changed the title [-][$250] IOS - Avatar doesn't get back to its original center position after zooming in and out[/-] [+][$125] IOS - Avatar doesn't get back to its original center position after zooming in and out[/+] on Dec 3, 2024
  9. melvin-bot commented on Dec 3, 2024

    @melvin-bot

    Upwork job price has been updated to $125

  10. ahmedkhan28 commented on Dec 4, 2024

    @ahmedkhan28

    Hi! I came across your job posting on Upwork regarding the avatar centering issue in your iOS app. After analyzing the problem where the avatar doesn't return to center after zoom gestures, I believe this can be fixed effectively through iterative solutions. I am a full time full stack iOS developer, designer and game developer at MagicHabits. This can be fixed in max 1-2 days.

    Based on my experience with iOS gesture handling and UI animations, I've identified 5 potential approaches that could solve this:

    Spring Animation Reset

    swiftCopyUIView.animate(withSpringDamping: 0.8) {
    avatarImageView.center = view.center
    }

    Velocity-Based Repositioning

    swiftCopylet velocity = gesture.velocity(in: view)
    let newCenter = calculatePosition(from: velocity)
    animateToPosition(newCenter)

    Smart Edge Detection

    swiftCopyif !safeBounds.contains(avatar.frame) {
    returnToCenter(animated: true)
    }

    Progressive Center Force

    swiftCopylet centerForce = 1 - currentScale
    let newCenter = interpolate(current: position,
    target: center,
    force: centerForce)

    Physics-Based Boundaries

    swiftCopylet behavior = UIAttachmentBehavior(item: avatarImageView)
    animator.addBehavior(behavior)
    Most natural but complex implementation
    Recommended Approach:

    I suggest implementing Solution #1 (Spring Animation Reset) first, then enhancing it with elements of Solution #4 (Progressive Center Force). This combination would:

    Provide immediate improvement in UX
    Feel natural and iOS-native
    Be quick to implement and test
    Allow for easy tuning of behavior

    Let me know if you like it so I can submit a proposal on upwork!

  11. melvin-bot commented on Dec 4, 2024

    @melvin-bot

    📣 @ahmedkhan28! 📣
    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. Make sure you've read and understood the contributing guidelines.
    2. 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.
    3. 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.
    4. 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>
    
  12. ahmedkhan28 commented on Dec 4, 2024

    @ahmedkhan28

    Contributor details
    Your Expensify account email: ahmedkhan850@gmail.com
    Upwork Profile Link: www.upwork.com/agencies/1838604427293852717

  13. 119 remaining items

  14. changed the title [-][$250] IOS - Avatar doesn't get back to its original center position after zooming in and out[/-] [+][HOLD for Payment 2025-02-24] [$250] IOS - Avatar doesn't get back to its original center position after zooming in and out[/+] on Feb 20, 2025
  15. changed the title [-][HOLD for Payment 2025-02-24] [$250] IOS - Avatar doesn't get back to its original center position after zooming in and out[/-] [+][HOLD for payment 2025-02-24] [$250] IOS - Avatar doesn't get back to its original center position after zooming in and out[/+] on Feb 20, 2025
  16. greg-schroeder commented on Feb 24, 2025

    @greg-schroeder
    Contributor

    Will process today

  17. greg-schroeder commented on Feb 24, 2025

    @greg-schroeder
    Contributor

    Payment summary:

    Contributor: @bernhardoj - $250 - ND
    C+: @dominictb - $250 - Upwork

  18. greg-schroeder commented on Feb 24, 2025

    @greg-schroeder
    Contributor

    Can you take care of the C+ checklist @dominictb? Thanks

  19. changed the title [-][HOLD for payment 2025-02-24] [$250] IOS - Avatar doesn't get back to its original center position after zooming in and out[/-] [+][C+ Checklist Needs Completion] [$250] IOS - Avatar doesn't get back to its original center position after zooming in and out[/+] on Feb 24, 2025
  20. dominictb commented on Feb 24, 2025

    @dominictb
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production
    • 2b. Reported on staging (deploy blocker)
    • 2c. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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/33756/files#r1967696226

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes

    Regression Test Proposal

    Test:

    • Prerequisite: have a custom profile avatar
    1. Open a chat where you can see your own avatar (e.g., self dm, workspace chat)
    2. Open the avatar in an attachment modal
    3. Zoom in the avatar
    4. Drag left/right
    5. Zoom out until the avatar image is fully visible
    6. Verify the avatar goes back to the center

    Do we agree 👍 or 👎

  21. dominictb commented on Feb 24, 2025

    @dominictb
    Contributor
  22. bernhardoj commented on Feb 25, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  23. greg-schroeder commented on Feb 27, 2025

    @greg-schroeder
    Contributor

    filed

  24. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Feb 27, 2025
  25. JmillsExpensify commented on Mar 3, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions