-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Replace WPImageViewController with LightboxViewController #23922
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
Generated by 🚫 Danger |
| } | ||
|
|
||
| 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.
| 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 | WordPress Alpha |
|
| 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 | Jetpack Alpha |
|
| 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
LightboxViewControllerto replaceWPImageViewController(Objective-C). The new screen usesImageDownloaderand 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)WPRichTextImageto useAsyncImageView(tested manually)PostFeaturedImageCellfrom Objective-C to Swift and removeImageLoaderusagesFeaturedImageViewController(Objective-C) and use natively provided toolbar insteadWPImageViewControllerRegression 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.txtif necessary.Testing checklist: