Skip to content

[HOLD for payment 2023-12-06] [$1000] Web - Pressing ESC on attachment preview glitches the preview #27237

Closed

Description

@kbecciv

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. Open the app
  2. Click on any chat
  3. Click '+' add attachment
  4. Attach multiple images
  5. Open first uploaded image
  6. Click on ESC multiple times, observe that preview closes, reopens with different image and closes

Expected Result:

App should close preview on ESC click (note you need to press Esc multiple times)

Actual Result:

App glitches on closing preview on ESC click

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.61-1
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

Recording.4284.mp4
preview.glitches.on.ESC.close.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ebd6c095f0ad277c
  • Upwork Job ID: 1701562714140925952
  • Last Price Increase: 2023-10-03

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 12, 2023
  2. melvin-bot commented on Sep 12, 2023

    @melvin-bot

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

  3. changed the title [-]Web - Pressing ESC on attachment preview glitches the preview[/-] [+][$500] Web - Pressing ESC on attachment preview glitches the preview[/+] on Sep 12, 2023
  4. melvin-bot commented on Sep 12, 2023

    @melvin-bot
  5. melvin-bot commented on Sep 12, 2023

    @melvin-bot

    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
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 12, 2023
  7. melvin-bot commented on Sep 12, 2023

    @melvin-bot

    Triggered auto assignment to @adelekennedy (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

  8. melvin-bot commented on Sep 12, 2023

    @melvin-bot

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

  9. ishpaul777 commented on Sep 12, 2023

    @ishpaul777
  10. zukilover commented on Sep 12, 2023

    @zukilover
    Contributor

    Proposal

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

    App glitches on closing preview on ESC click

    What is the root cause of that problem?

    AttachmentModal is using unnecessary useCallback for closeModal function. This causes React to not throw away the cached function.

    const closeModal = useCallback(() => {
    setIsModalOpen(false);
    }, []);

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

    Remove the useCallback wrapper for closeModal, e.g.:

        const closeModal = () => {
            setIsModalOpen(false);
        };
    

    This is the safest and optimal way since the modal visibility is controlled by a local state.

    What alternative solutions did you explore? (Optional)

    N/A

  11. 164 remaining items

  12. melvin-bot commented on Nov 29, 2023

    @melvin-bot

    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:

  13. Christinadobrzyn commented on Dec 6, 2023

    @Christinadobrzyn
    Contributor

    prepping for payment

    Payouts due:

    Issue Reporter: $50 @dhanashree-sawant (PAID in Upwork)
    Contributor: $750 @paultsimura (PAID in Upwork) & $250 @tsa321 (PAID in Upwork)
    Contributor+: $1000 @abdulrahuman5196 (PAID in Upwork)

    Eligible for 50% #urgency bonus? N

    Upwork job is here.

    @abdulrahuman5196 do we need a regression for this?

  14. paultsimura commented on Dec 6, 2023

    @paultsimura
    Contributor

    Thank you @Christinadobrzyn
    Based on this comment: #27237 (comment), could you please split my bounty into $750 for me, and $250 for @tsa321?

  15. added and removed on Dec 6, 2023
  16. abdulrahuman5196 commented on Dec 6, 2023

    @abdulrahuman5196
    Contributor

    The PR that introduced the bug has been identified. Link to the PR:
    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:
    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:

    Not a regression.

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

    Yes.

    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.

    1. Attach multiple images in a chat
    2. Open the first uploaded image
    3. Click on ESC multiple times
    4. Verify that the attachment modal doesn't reopen
    5. Open an attachment again
    6. Click the "Back" button in the browser
    7. Verify that the composer gets focused
    8. Open an attachment again
    9. Click the "X" button on the modal
    10. Verify that the composer gets focused

    @Christinadobrzyn

  17. Christinadobrzyn commented on Dec 8, 2023

    @Christinadobrzyn
    Contributor

    Awesome! Thanks @abdulrahuman5196!

    I paid you and @paultsimura in Upwork based on this payment structure #27237 (comment)

    @tsa321 and @dhanashree-sawant can you accept the Upwork offer and I'll pay you?

  18. dhanashree-sawant commented on Dec 8, 2023

    @dhanashree-sawant

    Hi @Christinadobrzyn, sorry for the delay, the job was actually raised after 30 August but you have sent me 250$ offer, can you rectify it once to 50$?

  19. tsa321 commented on Dec 8, 2023

    @tsa321
    Contributor

    @Christinadobrzyn I have accepted the offers, thank you...

  20. Christinadobrzyn commented on Dec 9, 2023

    @Christinadobrzyn
    Contributor

    Thanks @tsa321! I paid you in Upwork based on this payment summary.

    Thanks for catching that @dhanashree-sawant - I got my dates mixed up - I sent you a modified offer, would you mind accepting so I can pay you?

  21. dhanashree-sawant commented on Dec 9, 2023

    @dhanashree-sawant

    That's fine, I have accepted the offer.

  22. Christinadobrzyn commented on Dec 9, 2023

    @Christinadobrzyn
    Contributor

    Thanks @dhanashree-sawant! I paid you in Upwork based on our payment summary.

    This is good to close - thanks everyone!

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringInternalRequires API changes or must be handled by Expensify staff

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions