-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix zoom and slide on native for PDFView #17647
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
Conversation
|
@luacmartins @0xmiroslav One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
luacmartins
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a small comment.
0xmiroslav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good idea to move onPress event from renderCell to renderItem but unfortunately it causes regression of prev/next arrow buttons visibility not changing when tap in these cases:
- while loading pdf
- on password protected pdf
- on image
Co-authored-by: Miroslav Stevanovic <97473779+0xmiroslav@users.noreply.github.com>
|
@alexxxwork let's add one more step: |
Co-authored-by: Miroslav Stevanovic <97473779+0xmiroslav@users.noreply.github.com>
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.mp4Mobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.mp4 |
|
@alexxxwork just one last change requested - #17647 (comment) |
@luacmartins Changes pushed. |
0xmiroslav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexxxwork Please apply my suggested changes. We don't need hand cursor at all on non-touchable devices.
Co-authored-by: Miroslav Stevanovic <97473779+0xmiroslav@users.noreply.github.com>
Co-authored-by: Miroslav Stevanovic <97473779+0xmiroslav@users.noreply.github.com>
0xmiroslav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest version looks good.
Tested all possible cases.
There's dedicated issue #17720 for image zoomed case.
There are some known bugs below but they already happen on main so out of scope. I will report them in slack soon.
- weird behavior on clicking left/right arrow on mChrome, similar to #17723 (comment)
- resizing window on web hides Send button on attachment preview
- scroll bar not fully covers image when zoomed
- app freezes when click android device back button on mChrome
All yours @luacmartins
|
@luacmartins job2 seems running forever. can you please stop and re-trigger it? |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.5-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.5-6 🚀
|
| ); | ||
| return ( | ||
| props.onPress ? ( | ||
| <Pressable onPress={props.onPress} disabled={loadComplete} style={containerStyles}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexxxwork do you mind to explain why do we need Pressable here? In another the words, can we remove the Pressable here? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, completely missed this mention. If I remember this right, there was a specific case when arrows wouldn't hide/show if you press attachment before PDF loaded. So we use Pressable and disable it on PDF load complete.
cc: @0xmiroslav
Details
The carousel component doesn't swipe with single tap when displaying a PDF. User should be able to switch attachments with swipe and to zoom and pan pdf attachments.
This PR adds a callback to get scale from PDFView component to know if we are in a zoomed state.
Fixed Issues
$ #15988
PROPOSAL: #15988 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Rec.2023-04-19.13.56.41.mov
Mobile Web - Chrome
Screen_Recording_20230419_141833_Chrome.mp4
Mobile Web - Safari
Screen.Rec.2023-04-19.mp4
Desktop
Rec.2023-04-19.13.49.51.mov
iOS
Rec.2023-04-19.12.58.44.mov
Android
Screen_Recording_20230419_123557_New.Expensify.mp4