Repository navigation
[HOLD for payment 2024-01-05] [$500] iOS - Attachment - User able to switch to another attachment in PDF zoomed state #33635
Description
Activity
- addedExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributorDailyKSv2KSv2BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.
on Dec 26, 2023 - changed the title
[-]iOS - Attachment - User able to switch to another attachment in PDF zoomed state[/-][+][$500] iOS - Attachment - User able to switch to another attachment in PDF zoomed state[/+]on Dec 26, 2023 Job added to Upwork: https://www.upwork.com/jobs/~017d96c87f2683da02
Triggered auto assignment to @bfitzexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.- addedHelp WantedApply this label when an issue is open to proposals by contributorsApply this label when an issue is open to proposals by contributors
on Dec 26, 2023 Bug0 Triage Checklist (Main S/O)
- This "bug" occurs on a supported platform (ensure
Platformsin 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
- This "bug" occurs on a supported platform (ensure
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (
External)Proposal
Please re-state the problem that we are trying to solve in this issue.
User is able to click on previous or next attachement in zoomed state in IOS
What is the root cause of that problem?
while rendering the attachement item we dont disable the previous/next attachements arrows on zooming in here:
App/src/components/Attachments/AttachmentCarousel/index.native.js
Lines 98 to 106 in 9208c95
({item, isActive}) => ( <CarouselItem item={item} isFocused={isActive && activeSource === item.source} onPress={() => setShouldShowArrows(!shouldShowArrows)} /> ), [activeSource, setShouldShowArrows, shouldShowArrows], ); What changes do you think we should make in order to solve the problem?
introduce a new state
onScaleChangedin the component above and then we can check if the zoom is 1 then we can show the buttons else we need to hide them.
Also inside theCarouselItemwe need to add the newonScaleChangedprop and it will be used here: asonScaleChanged={onScaleChanged}the onScaleChanged prop that we added will be triggered on changing the scale of the attachement.
Reacted by Cong Pham@abzokhattab Wasn't the issue that the user could slide to the prev/next attachment while on Zoom? It does not slide to the/next attachment while zooming in on the picture attachment.
@mollfpr this proposal fixes the root cause, would you mind taking a look, thank!
Proposal
Please re-state the problem that we are trying to solve in this issue.
User able to switch to another attachment in PDF zoomed state
What is the root cause of that problem?
We're not passing
isUsedInCarouselintoAttachmentViewPdfhere. So the logic to reset the pinch gesture here does not run, leading to the arrows still show although we don't want it to show if there's a pinch gesture (zoom) as per this logic.What changes do you think we should make in order to solve the problem?
Pass
isUsedInCarouselintoAttachmentViewPdfhere (we already do that forAttachmentViewImagehere)isUsedInCarousel={isUsedInCarousel}What alternative solutions did you explore? (Optional)
Out of scope of this issue but I notice currently it look like for mWeb we're not allowing users to zoom the attachment, if it' s not expected we might want to create another GH to fix it.
14 remaining items
Reviewinglabel has been removed, please complete the "BugZero Checklist".The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.19-2 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 2024-01-05. 🎊
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:
- @mollfpr requires payment automatic offer (Reviewer)
- @tienifr requires payment automatic offer (Contributor)
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:
- [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
- [@mollfpr] 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:
- [@mollfpr] 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:
- [@mollfpr] Determine if we should create a regression test for this bug.
- [@mollfpr] 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.
- [@bfitzexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Bump on contract acceptance in Upwork & BZ checklist @mollfpr
[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] 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/31308/files#r1436916636
[@mollfpr] 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:
The regression step should be good.
[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] 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.- Open the app
- Open any existing conversation
- Send an image and PDF attachment in the conversation
- Open the uploaded PDF attachment
- Open the image attachment and tap on the left or right arrow to navigate to the PDF view
- Zoom in the PDF page
- Tap on the PDF page
- Try to slide left/right while the PDF is zoomed in
- Verify that the user is not able to switch to another attachment in the PDF zoomed state
@bfitzexpensify Could you give the payment summary for the manual request? Thanks!
Added regression tests to https://github.com/Expensify/Expensify/issues/358238, closing this out.
$500 payment approved for @mollfpr based on comment above.
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: 1.4.17.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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
According step 10 in the TR, user should not be able to switch to another attachment in PDF zoomed state
Actual Result:
User able to switch to another attachment in PDF zoomed state
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6326452_1703628723874.Rpreplay_Final1703628654.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit