-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Replace WPImageViewController with LightboxViewController #23922
Conversation
Generated by 🚫 Danger |
@@ -145,6 +147,14 @@ final class AsyncImageView: UIView { | |||
self.errorView = errorView | |||
return errorView | |||
} | |||
|
|||
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { | |||
if configuration.passTouchesToSuperview && self.bounds.contains(point) { |
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.
This was needed to make it work in WPRichTextImage
(UIControl
, needed to pass gestures to the superview)
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.
Would disabling user interaction on AsyncImageView
achieve the same thing?
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.
That was my initial attempt, but for some reason it didn't work. It's probably because of UIControl
or gesture recognizers in a text view (it's an attachment here) or something else. I'm planning to remove WPRichTextImage
as part of the upcoming project of the Reader Comments rework, so I dropped a note to remove passTouchesToSuperview
when it's no longer used.
@@ -43,26 +35,8 @@ open class WPRichTextImage: UIControl, WPRichTextMediaAttachment { | |||
addSubview(imageView) | |||
} | |||
|
|||
required public init?(coder aDecoder: NSCoder) { |
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.
The encoding was not used anywhere.
|
App Name | ![]() |
|
Configuration | Release-Alpha | |
Build Number | pr23922-9e82544 | |
Version | 25.6 | |
Bundle ID | org.wordpress.alpha | |
Commit | 9e82544 | |
App Center Build | WPiOS - One-Offs #11225 |
|
App Name | ![]() |
|
Configuration | Release-Alpha | |
Build Number | pr23922-9e82544 | |
Version | 25.6 | |
Bundle ID | com.jetpack.alpha | |
Commit | 9e82544 | |
App Center Build | jetpack-installable-builds #10263 |
This PR introduces a new
LightboxViewController
to replaceWPImageViewController
(Objective-C). The new screen usesImageDownloader
and also supports the zoom transitions introduced in iOS 18.media-after.mov
Here's how it used to look: before.
Changes
LightboxViewController
(currently only supports one item at a time like the previous ViewController did)WPRichTextImage
to useAsyncImageView
(tested manually)PostFeaturedImageCell
from Objective-C to Swift and removeImageLoader
usagesFeaturedImageViewController
(Objective-C) and use natively provided toolbar insteadWPImageViewController
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.Testing checklist: