You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-09-03][$250] iOS - Attachment - I can to switch to another attachment in PDF zoomed state #47805
@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
But it doesn't work for both PDF and image. For the PDF, we only call the scale change callback if isUsedInCarousel is true, but we never pass the props.
changed the title [-]iOS - Attachment - I can to switch to another attachment in PDF zoomed state[/-][+][$250] iOS - Attachment - I can to switch to another attachment in PDF zoomed state[/+]on Aug 23, 2024
changed the title [-][$250] iOS - Attachment - I can to switch to another attachment in PDF zoomed state[/-][+][HOLD for payment 2024-09-03][$250] iOS - Attachment - I can to switch to another attachment in PDF zoomed state[/+]on Sep 10, 2024
Activity
melvin-bot commentedon Aug 21, 2024
Triggered auto assignment to @johncschuster (
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.IuliiaHerets commentedon Aug 21, 2024
We think that this bug might be related to #vip-vsb
IuliiaHerets commentedon Aug 21, 2024
@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
bernhardoj commentedon Aug 21, 2024
Proposal
Please 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
onScaleChangedwhich will disable the scrolling/swiping (isScrollEnabled.value).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
isUsedInCarouselis true, but we never pass the props.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
isScrollEnabled.valuehereApp/src/components/Attachments/AttachmentCarousel/Pager/index.tsx
Lines 105 to 107 in 12037ee
is coming from the local shared value.
App/src/components/Attachments/AttachmentCarousel/Pager/index.tsx
Line 61 in 12037ee
But the scale change callback changes the
useCarouselContextEventsshared value.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
isScrollEnabled, we can removeisScrollEnabledfromAttachmentCarouselPager/Pager,App/src/components/Attachments/AttachmentCarousel/Pager/index.tsx
Line 61 in 12037ee
then use it from
useCarouselContextEvents.useCarouselContextEventswill return theisScrollEnabled.App/src/components/Attachments/AttachmentCarousel/useCarouselContextEvents.ts
Line 7 in 12037ee
App/src/components/Attachments/AttachmentCarousel/useCarouselContextEvents.ts
Line 61 in 12037ee
melvin-bot commentedon Aug 23, 2024
Job added to Upwork: https://www.upwork.com/jobs/~010723f9a2c0dc6d78
[-]iOS - Attachment - I can to switch to another attachment in PDF zoomed state[/-][+][$250] iOS - Attachment - I can to switch to another attachment in PDF zoomed state[/+]melvin-bot commentedon Aug 23, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (
External)9 remaining items
melvin-bot commentedon Aug 26, 2024
Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
bernhardoj commentedon Aug 26, 2024
PR is ready
cc: @s77rt
[-][$250] iOS - Attachment - I can to switch to another attachment in PDF zoomed state[/-][+][HOLD for payment 2024-09-03][$250] iOS - Attachment - I can to switch to another attachment in PDF zoomed state[/+]johncschuster commentedon Sep 11, 2024
Payment Summary:
Contributor: @bernhardoj owed $250 via NewDot
Contributor+: @s77rt owed $250 via NewDot
@bernhardoj / @s77rt do you feel this requires regression test steps? If so, can you please provide them? Thank you!
s77rt commentedon Sep 11, 2024
@johncschuster This already has a regression test.
johncschuster commentedon Sep 12, 2024
Awesome. Thanks, @s77rt! In that case, we're all done here. Please make your manual requests!
bernhardoj commentedon Sep 12, 2024
Requested in ND.
JmillsExpensify commentedon Sep 12, 2024
$250 approved for @s77rt
JmillsExpensify commentedon Sep 13, 2024
$250 approved for @bernhardoj