Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stories: Scale to fill rendering + post-export overlays bug fixes #106

Merged
merged 3 commits into from
Mar 17, 2021

Conversation

bjtitus
Copy link
Collaborator

@bjtitus bjtitus commented Mar 17, 2021

WordPress PR: wordpress-mobile/WordPress-iOS#16109

馃悶 Text disappears when using OpenGL + scaleToFill

This was an alignment issue with text when using OpenGL + scaleToFill content mode.

Demo Notice the disappearing text after the confirm button is pressed.
Before After
RPReplay_Final1615954257.mp4
RPReplay_Final1615954109.mp4

We now check the player's content mode before adjusting the size of the drawing & movable canvas views. These views are already properly sized to match the full size of the editor so we don't need to change them any further.

if playerView?.contentMode != .scaleToFill {
// When scaling to fill we don't need to update these views as they are already sized correctly.
drawingCanvasConstraints.update(with: rect)
movableViewCanvasConstraints.update(with: rect)
}

馃悶 Overlays disappear after exposing

Overlays were lost after exporting media. Because the Prepublishing sheet can be dismissed in WP-iOS, this causes text to be lost if the user goes back.

Demo Notice how the text label disappears after dismissing the Prepublishing Sheet.
Before After
Vid.mov
RPReplay_Final1615955075.mp4

We are reusing a single instance of MovableViewCanvas and it is not re-added to the current editor after exporting. It probably makes more sense to serialize the instance and create a new one but that change is more than we want to make after a code freeze.

This addition reloads the editor after export is complete to ensure all archived data and views are present:

if let selected = self?.selected {
self?.loadEditor(for: selected)
}

@bjtitus bjtitus added the stories Related to the Stories project label Mar 17, 2021
@bjtitus bjtitus self-assigned this Mar 17, 2021
@bjtitus bjtitus added this to In progress in WordPress iOS Stories via automation Mar 17, 2021
Copy link
Collaborator

@danielebogo danielebogo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@bjtitus bjtitus merged commit f53e7f9 into main Mar 17, 2021
WordPress iOS Stories automation moved this from In progress to Done Mar 17, 2021
@bjtitus bjtitus deleted the stories/scale-to-fill-rendering branch March 17, 2021 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stories Related to the Stories project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants