-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
QuickLook swipe down and less message motion when coming back from GiveBackMyFirstResponder #2482
base: main
Are you sure you want to change the base?
Conversation
hm, i am not sure i got the gist of this PR completely.
however, always good to have options, so thanks for diving into that. and as said, sorry, if i missed sth. |
TODO: on iOS 18 the keyboard is hidden after viewing a photo, can be fixed by a GiveBackMyFirstResponder extension for |
Scratch that, that opened a massive can of worms. On iOS 18 the keyboard is just hidden when you click on an image in chat and it does not come back automatically, this is a fine UX I think (and not changed by this PR). |
Can take another look at iOS 18 having hidden keyboard after QLQuickLook if we want to merge #2536 because swizzling will probably have no negative impacts when pushing either. |
this needs a rebase - is this PR still needed or conflicting with #2536 ? |
I will take another look at this after merge of the other PR |
it was late when i wrote this, idk why it had opacity = 0 on the view that would animate but it slipped through because it worked fine on iOS 16
Rebased and checked again for iOS 18 but couldn't get the "return keyboard after preview dismiss" to work with |
swipe-to-close is now indeed smooth again on iOS 18 (it was also smooth before), however, opening is worse: for a ~second, a weird title bar is shown, with whitespace atop: videoScreenRecording_01-29-2025.15-41-56_1.movit is not super-bad, but it looks as if something is wrong. and, without this PR, the opening does not have the weird effect. the effect is also there for landscape images, and the recording is done without debugger attached, so already "fast" did not test iOS 15 yet |
EDIT: i was on the wrong branch, so the issue from #2482 (comment) is reproducible, sorry for condusion |
This PR makes the image preview (quicklook) able to be dismissed by swiping down, instead of the default popGestureRecognizer. This is an improvement because A; the popGesture is only enabled when the navigation bars are shown, B; it interferes with swiping to previous image, and C; the animation feels good.
For this to look good I had to reduce the motion on messages when presenting/dismissing view controllers some more. Now after a view is dismissed the scroll updating is delayed by 0.5s which means that first; the ChatViewController can become firstResponder (bringing up the accessory) and then; the text field can become firstResponder (bringing up the keyboard) without the chat scrolling.
Quick Look Dismiss (This change is only pre-iOS 18)
RPReplay_Final1736090240.mp4
RPReplay_Final1736090333.mp4
Reduced motion (This change is everywhere)
RPReplay_Final1736090019.mp4
RPReplay_Final1736089664.mp4