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-05-03] [$2000] Sliding using fingers on android from pdf to image gets stuck and doesn't work the way how sliding from image to pdf works #15988

Closed
1 of 6 tasks
kavimuru opened this issue Mar 15, 2023 · 98 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

@kavimuru
Copy link

kavimuru commented Mar 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. Open android > Go to any chat > Send Image 1, Image 2, and finally a pdf file
  2. Preview image 1, slide right using fingers (not the right arrow slider), and see that image 2 displays. Next, right-slide it again and see the pdf also displays.
  3. Next, slide left from pdf and see that it gets stuck while swiping and sometimes it doesn't swipe too from pdf to the image. It works totally fine when we try to slide using fingers from any images to pdf.

Expected Result:

Sliding using fingers from pdf to image gets stuck and sometimes doesn't swipe too and doesn't work the way how sliding from image to pdf works

Actual Result:

Sliding using fingers from pdf to image gets stuck and doesn't work

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.2.85-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:

slide.mp4
az_recorder_20230314_120243.1.mp4

Expensify/Expensify Issue URL:
Issue reported by: @avi-shek-jha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1678863680773659?thread_ts=1678796475.385589&cid=C049HHMV9SM

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0181fbb67dfdeb58e8
  • Upwork Job ID: 1638186266529497088
  • Last Price Increase: 2023-04-11
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 15, 2023
@melvin-bot melvin-bot bot locked and limited conversation to collaborators Mar 15, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

@alexpensify
Copy link
Contributor

Catching up from being OOO and urgent bank GHs, I'll try to get to this one by EOW.

@alexpensify
Copy link
Contributor

Ops GHs have been a higher priority, I haven't had time to test yet.

@alexpensify
Copy link
Contributor

Focused on another urgent task, I'll try to get to this one tomorrow.

@luacmartins
Copy link
Contributor

Just adding to the OP, swiping doesn't work at all when viewing PDF attachments -- it doesn't matter what the next attachment type is.

@alexpensify
Copy link
Contributor

@luacmartins - looks like we see this as a problem. Do you think I should mark it as external? Thanks!

@luacmartins
Copy link
Contributor

@alexpensify yes, it is a problem indeed and we can mark it external.

@luacmartins
Copy link
Contributor

I'll assign myself as well to manage the engineering side since I was involved in the PR that implemented the carousel feature.

@luacmartins luacmartins self-assigned this Mar 21, 2023
@luacmartins luacmartins added the External Added to denote the issue can be worked on by a contributor label Mar 21, 2023
@melvin-bot melvin-bot bot unlocked this conversation Mar 21, 2023
@melvin-bot melvin-bot bot changed the title Sliding using fingers on android from pdf to image gets stuck and doesn't work the way how sliding from image to pdf works [$1000] Sliding using fingers on android from pdf to image gets stuck and doesn't work the way how sliding from image to pdf works Mar 21, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~0181fbb67dfdeb58e8

@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

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

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

@Ollyws
Copy link
Contributor

Ollyws commented Mar 21, 2023

Proposal

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

The carousel swipe navigation doesn't work when viewing a PDF.

What is the root cause of that problem?

This is caused by the PDFView Touchable taking precedent over the Carousel PanResponder.

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

Given that the carousel navigation only requires right/left swipes, and the PDFView requires vertical swipes we can use onMoveShouldSetPanResponder in the Carousel PanResponder to detect wether the swipe is vertical or horizontal using the gestureState X/Y values and return false when we want the PDFView to scroll, or true when we want the Carousel to swipe.

@MelvinBot
Copy link

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@melvin-bot melvin-bot bot added the Overdue label Mar 23, 2023
@luacmartins
Copy link
Contributor

@Ollyws's proposal looks good to me. What do you think @0xmiroslav ?

@melvin-bot melvin-bot bot removed the Overdue label Mar 23, 2023
@0xmiros
Copy link
Contributor

0xmiros commented Mar 23, 2023

@luacmartins thanks for reviewing proposal in advance but sorry I am yet to accept that solution.

Given that the carousel navigation only requires right/left swipes, and the PDFView requires vertical swipes

This is actually wrong. PDFView requires horizontal swipes when zoomed in.

bug.mp4

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 26, 2023
@MelvinBot
Copy link

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.5-6 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-05-03. 🎊

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

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

@MelvinBot
Copy link

MelvinBot commented Apr 26, 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:

  • [@0xmiroslav] The PR that introduced the bug has been identified. Link to the PR:
  • [@0xmiroslav] 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:
  • [@0xmiroslav] 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:
  • [@0xmiroslav] Determine if we should create a regression test for this bug.
  • [@0xmiroslav] 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.
  • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@JmillsExpensify
Copy link

JmillsExpensify commented Apr 28, 2023

Alright, let's get this issue kicked off. Looking at the linked PR, it appears that this PR does qualify for the 50% bonus based on this PR being merged three business days later. @0xmiroslav @luacmartins can you confirm?

If that's the case, then we have the following payouts:

@JmillsExpensify
Copy link

Then as for Upwork, the previous link has expired. @avi-shek-jha and @alexxxwork can both of you please apply ahead of the regression period ending?

@JmillsExpensify
Copy link

Finally, @0xmiroslav let's get the BugZero checklist kick off above. Thanks all!

@avi-shek-jha
Copy link

@JmillsExpensify I tried applying but it says 'This job is no longer available'. Would you mind sending me an invitation on Upwork or a new link instead? Thanks

@JmillsExpensify
Copy link

JmillsExpensify commented Apr 28, 2023

Ah yeah for sure. I neglected to post the new link: https://www.upwork.com/jobs/~01534ddafa2e696d30

@avi-shek-jha
Copy link

avi-shek-jha commented Apr 28, 2023

Seems like I can't access the slack link that you mentioned above (May be the link is just for the internal members). Here's my upwork profile link
https://www.upwork.com/freelancers/~01a90e548bf808418c

It would be great if you could send me an invitation since I wasn't able to access both the upwork link and the slack link.

Sorry for the inconvenience.

@JmillsExpensify
Copy link

Done! Sorry for the trouble.

@luacmartins
Copy link
Contributor

@JmillsExpensify I assigned @alexxxwork to the PR on Apr 18 and we merged it on Apr 24, so I don't think this qualifies for the bonus based on our guidelines.

@avi-shek-jha
Copy link

@JmillsExpensify, Received and submitted the work. Thanks

@JmillsExpensify
Copy link

@avi-shek-jha Great! We'll circle back on payments when the regression period passes.

@luacmartins Great catch! I updated my comment above with the payouts.

@alexxxwork
Copy link
Contributor

@JmillsExpensify Applied, thank you!

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 Daily KSv2 labels May 2, 2023
@JmillsExpensify
Copy link

Tomorrow we'll close this one out.

@JmillsExpensify
Copy link

Ah though @0xmiroslav before we do, please don't forget about the BugZero checklist, thank you!

@luacmartins
Copy link
Contributor

@JmillsExpensify @0xmiroslav raised a good point that issue took 6 days from assignment to PR being merged because another PR completely changed the structure of the component the original proposal was based on. In light of that, I think that this issue qualifies for the bonus! Sorry about the back and forth!

@0xmiros
Copy link
Contributor

0xmiros commented May 3, 2023

No PR caused regression which means that "worked before but after PR, the issue started to happen".
I'd say the issue existed along with carousel implementation in #7862.
So first 3 items can be skipped.
I think it's good to create a regression test for this bug as this can easily cause regression while modifying carousel components.

Regression Test Proposal

  1. Go to any chat
  2. Send image, and then pdf file
  3. Preview image, slide to right using fingers
  4. Verify that pdf displays.
  5. Slide to left to see image and then to right to see pdf again
  6. Verify that attachments change smoothly
  7. Pinch-zoom or double-tap to zoom pdf
  8. Verify that you can move the document with a finger touch and drag
  9. Verify that you're not able to switch to other attachment in pdf zoomed state

@0xmiros
Copy link
Contributor

0xmiros commented May 3, 2023

@0xmiroslav raised a good point that issue took 6 days from assignment to PR being merged because another PR completely changed the structure of the component the original proposal was based on. In light of that, I think that this issue qualifies for the bonus! Sorry about the back and forth!

That was DM chat so sharing that convo here:

Screenshot

@JmillsExpensify
Copy link

All good! I updated the original comment above with the correct amounts. I'm also issuing payments now.

@JmillsExpensify
Copy link

Payments issued to reporter and C+. Sent offer to contributor via Upwork! I'll pay the bonus when the contract is accepted and a final payment is made.

@JmillsExpensify
Copy link

@alexxxwork When you have a moment, please accept the Upwork offer/contract and we can make sure you are paid. Thank you!

@alexxxwork
Copy link
Contributor

@JmillsExpensify Accepted, thank you!

@JmillsExpensify
Copy link

Thank you! Everyone is paid out and the regression test is linked above.

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