-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 2024-09-03][$250] iOS - Attachment - I can to switch to another attachment in PDF zoomed state #47805
Comments
Triggered auto assignment to @johncschuster ( |
We think that this bug might be related to #vip-vsb |
@johncschuster FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
ProposalPlease re-state the problem that we are trying to solve in this issue.We can swipe between attachment even though the PDF or image is zoomed in. What is the root cause of that problem?When the attachment scale is changed, we call the carousel pager App/src/components/Attachments/AttachmentView/AttachmentViewPdf/BaseAttachmentViewPdf.tsx Lines 43 to 45 in 12037ee
App/src/components/Attachments/AttachmentCarousel/useCarouselContextEvents.ts Lines 29 to 46 in 12037ee
App/src/components/Attachments/AttachmentCarousel/Pager/index.tsx Lines 105 to 107 in 12037ee
But it doesn't work for both PDF and image. For the PDF, we only call the scale change callback if App/src/components/Attachments/AttachmentView/AttachmentViewPdf/BaseAttachmentViewPdf.tsx Lines 43 to 45 in 12037ee
For both image and PDF, even though the scale change callback is called, the scroll is never disabled because the App/src/components/Attachments/AttachmentCarousel/Pager/index.tsx Lines 105 to 107 in 12037ee
is coming from the local shared value.
But the scale change callback changes the App/src/components/Attachments/AttachmentCarousel/useCarouselContextEvents.ts Lines 5 to 7 in 12037ee
This happens after #43620. What changes do you think we should make in order to solve the problem?In pdf attachment component, we can check for pagerRef context, just like we did with image. App/src/components/Attachments/AttachmentView/AttachmentViewPdf/BaseAttachmentViewPdf.tsx Lines 42 to 45 in 12037ee
App/src/components/Lightbox/index.tsx Line 84 in 12037ee
To fix the double
then use it from
|
Job added to Upwork: https://www.upwork.com/jobs/~010723f9a2c0dc6d78 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
Not reproducible Screen.Recording.2024-08-24.at.8.34.49.PM.mov |
Hmm, your video shows that it's reproducible.
|
@bernhardoj Oh I misunderstood the issue, you are right! Your RCA makes sense but regarding the solution:
Shouldn't we just pass the prop instead of checking against (Using |
We already have the information from attachmentCarouselPagerContext.pagerRef (which we already use in image component, Lightbox), so relying on another source (isUsedInCarousel) won't make it DRY I guess. |
@bernhardoj For this case the prop is always passed as |
We can always remove |
@bernhardoj Removing 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
PR is ready cc: @s77rt |
Payment Summary:Contributor: @bernhardoj owed $250 via NewDot @bernhardoj / @s77rt do you feel this requires regression test steps? If so, can you please provide them? Thank you! |
@johncschuster This already has a regression test. |
Awesome. Thanks, @s77rt! In that case, we're all done here. Please make your manual requests! |
Requested in ND. |
$250 approved for @s77rt |
$250 approved for @bernhardoj |
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.23-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: https://expensify.testrail.io/index.php?/tests/view/4879183&group_by=cases:section_id&group_id=292107&group_order=asc
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
I shouldn't be able to to switch to another attachment in PDF zoomed state.
Actual Result:
I can to switch to another attachment in PDF zoomed state after swiping to an image and back to the PDF.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6578108_1724244156588.JCEQ1898.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @s77rtThe text was updated successfully, but these errors were encountered: