-
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
Stories: 16.8 Bug Fixes #15996
Stories: 16.8 Bug Fixes #15996
Conversation
This can be done by the Kanvas Metal renderer but we need to work out a few bugs first. For now, we'll rotate these on import.
You can trigger an installable build for these changes by visiting CircleCI here. |
# Conflicts: # WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
Gave this a try, things seem to work as expected 🎉 Found one possible issue.
The issue I found is that the story block still shows up in the Gutenberg block picker list on an iPad. We should probably hide it from there as well. However the message that iPad is not supported shows up correctly when attempting to populate the block, so nothing breaks, and we found this to be rarely used on Android - so if it's for some reason difficult/dangerous to implement it's probably fine to leave it in. |
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.
Hola @bjtitus 👋
Looking good! Tested on an iPhone device and iPad simulator. I had some very nitpicky comments code wise but nothing that's a blocker (tho getting rid of the optional would be delightful). from me, and if you decide to make any other changes let me know and I'll quickly re-review. :)
let controller = try StoryEditor.editor(blog: blog, context: ContextManager.shared.mainContext, updated: {_ in }, uploaded: { [weak self] result in | ||
switch result { | ||
case .success: | ||
() |
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.
I know this was an existing expression, but what would you think about changing the ()
to a break
since that's the more expected syntax for a switch/case skip. (Maybe this predates break being added to Swift 🤔)
switch error { | ||
case StoryEditor.EditorCreationError.unsupportedDevice: | ||
let title = NSLocalizedString("Unsupported Device", comment: "Title for stories unsupported device error.") | ||
let message = NSLocalizedString("We are still working on the Stories editor for iPad. In the meantime, please try Stories on your iPhone.", comment: "Message for stories unsupported device error.") |
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.
I might be a little overly cautious about the wording here, but I'm wondering if it could run afoul of Apple's "no betas" rule if we get a reviewer that's particularly fussy. Instead of "We are still working on the Stories editor for iPad" would it be safer to say something like "The Stories editor for is not currently available for your iPad"?
/// Applies the `preferredTransform` of the video track. | ||
/// - Returns: Returns both an AVMutableComposition containing video + audio and an AVVideoComposition of the rotate video. | ||
private func rotate() -> (AVMutableComposition, AVVideoComposition) { | ||
let videoTrack = tracks(withMediaType: .video).first! |
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.
Maybe this could be tweaked to avoid the implicitly unwrapped optional?
Related Kanvas PR: tumblr/kanvas-ios#93
Rotation.mp4
Testing
iPad
PR submission checklist:
RELEASE-NOTES.txt
if necessary.