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-09] [$500] Web - Money request tab glitches when trying to select text in the scan receipt tab #27551

Closed
1 of 6 tasks
kbecciv opened this issue Sep 15, 2023 · 30 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 15, 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. Click on request money.
  2. Go to the scan tab.
  3. Try to select any text in the body

Expected Result:

We should be able to select the text

Actual Result:

We are not able to select the text and the page glitches to the right

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

Screen.Recording.2023-09-14.at.11.39.22.PM.mov
Recording.4510.mp4

Expensify/Expensify Issue URL:
Issue reported by: @esh-g
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694715075087069

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01edfae28ba0808400
  • Upwork Job ID: 1702746615305179136
  • Last Price Increase: 2023-09-22
  • Automatic offers:
    • akinwale | Contributor | 26855518
    • esh-g | Reporter | 26855520
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

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

@melvin-bot
Copy link

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

@kbecciv kbecciv added the External Added to denote the issue can be worked on by a contributor label Sep 15, 2023
@melvin-bot melvin-bot bot changed the title Web - Money request tab glitches when trying to select text in the scan receipt tab [$500] Web - Money request tab glitches when trying to select text in the scan receipt tab Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01edfae28ba0808400

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

melvin-bot bot commented Sep 15, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

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

@akinwale
Copy link
Contributor

akinwale commented Sep 15, 2023

Proposal

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

Money request tab glitches when trying to select text in the scan receipt tab.

What is the root cause of that problem?

Trying to select text triggers the swipe action on the Scan tab, causing either the Manual or Distance tab to show while dragging the mouse.

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

Solution 1
Add a PanResponder to the root view of the Scan tab in ReceiptSelector to handle swipes and prevent the tab from swiping when trying to select text.

  1. Create the PanResponder ref.
const panResponder = useRef(
    PanResponder.create({
        onMoveShouldSetPanResponder: () => true,
    })
).current;
  1. Add the pan handlers to the root view.
<View
    style={[styles.uploadReceiptView(isSmallScreenWidth)]}
    {...panResponder.panHandlers}
>

Solution 2
In some cases, the user may attempt to select text without placing the cursor on the text area. The limitation with Solution 1 is that dragging in any area to the left or right of the text will cause the tab to be swiped. There is a 20px horizontal margin for the root view, so dragging in the margin area would still cause the tab to swipe.

This can be handled with the following steps.

  1. Create the PanResponder ref.
const panResponder = useRef(
    PanResponder.create({
        onMoveShouldSetPanResponder: () => true,
        onPanResponderTerminationRequest: () => false,
    })
).current;
  1. Wrap the text controls with a View, and add the pan handlers to this wrapper view.
+<View
+    style={styles.w100}
+    {...panResponder.panHandlers}>
    <Text style={[styles.textReceiptUpload]}>{translate('receipt.upload')}</Text>
    <Text style={[styles.subTextReceiptUpload]}>
        {isSmallScreenWidth ? translate('receipt.chooseReceipt') : translate('receipt.dragReceiptBeforeEmail')}
        <CopyTextToClipboard
            text={CONST.EMAIL.RECEIPTS}
            textStyles={[styles.textBlue]}
        />
        {isSmallScreenWidth ? null : translate('receipt.dragReceiptAfterEmail')}
    </Text>
+</View>

What alternative solutions did you explore? (Optional)

None.

27551-demo.mp4

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

@eVoloshchak thoughts on the proposal?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 18, 2023
@eVoloshchak
Copy link
Contributor

@akinwale's proposal (Solution 2) looks good to me

I think we should extend this wrapper View so it takes up the full with of the parent container (red box below)
Screenshot 2023-09-21 at 15 46 53

Since there's still glitching if you select text close to the borders os the parent

Screen.Recording.2023-09-21.at.15.47.55.mov

🎀👀🎀 C+ reviewed!

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

melvin-bot bot commented Sep 21, 2023

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

@dylanexpensify
Copy link
Contributor

taking over for Puneet as it's part of wave4!

@puneetlath
Copy link
Contributor

Thanks @dylanexpensify. You'll want to have one of the engineers on the wave4 team take a look at the proposal that @eVoloshchak is recommending above.

@dylanexpensify
Copy link
Contributor

Definitely! Will be doing! Thanks @puneetlath!

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

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

melvin-bot bot commented Sep 25, 2023

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

@dylanexpensify
Copy link
Contributor

@luacmartins @cristipaval @Gonals @MariaHCD @Beamanator can one of you please review @akinwale's proposal?

@melvin-bot melvin-bot bot removed the Overdue label Sep 25, 2023
@akinwale
Copy link
Contributor

@eVoloshchak My PR is ready for review. Thanks.

@dylanexpensify
Copy link
Contributor

Wooot! Nice one!

@melvin-bot
Copy link

melvin-bot bot commented Sep 27, 2023

🎯 ⚡️ Woah @eVoloshchak / @akinwale, 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 @akinwale got assigned: 2023-09-25 12:30:51 Z
  • when the PR got merged: 2023-09-27 03:18:33 UTC

On to the next one 🚀

@dylanexpensify
Copy link
Contributor

Amazing work! Waiting on regression period

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 2, 2023
@melvin-bot melvin-bot bot changed the title [$500] Web - Money request tab glitches when trying to select text in the scan receipt tab [HOLD for payment 2023-10-09] [$500] Web - Money request tab glitches when trying to select text in the scan receipt tab Oct 2, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.75-12 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-09. 🎊

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 Oct 2, 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:

  • [@eVoloshchak] The PR that introduced the bug has been identified. Link to the PR:
  • [@eVoloshchak] 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:
  • [@eVoloshchak] 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:
  • [@eVoloshchak] Determine if we should create a regression test for this bug.
  • [@eVoloshchak] 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.
  • [@dylanexpensify] 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 Daily KSv2 Overdue labels Oct 9, 2023
@dylanexpensify
Copy link
Contributor

Payment summary:

@dylanexpensify
Copy link
Contributor

Payments sent! @eVoloshchak mind completing checklist? Thank you!

@eVoloshchak
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: Add ability to Take/Upload Receipts #23046
  • 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/23046/files#r1355375054
  • 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: I don't think an additional discussion is needed here, this is an isolated occurrence and kind of an edge case
  • Determine if we should create a regression test for this bug
    Again, since this is an edge case a few users would have ever encountered (and is limited to web/Desktop), I don't think a regression test is required here

@JmillsExpensify
Copy link

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

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
No open projects
Development

No branches or pull requests

7 participants