Update: Round position attributes on cover focal point save#19183
Merged
jorgefilipecosta merged 1 commit intomasterfrom Dec 18, 2019
Merged
Update: Round position attributes on cover focal point save#19183jorgefilipecosta merged 1 commit intomasterfrom
jorgefilipecosta merged 1 commit intomasterfrom
Conversation
Contributor
|
Tested this locally and can verify that it works as advertised for both existing saved block content with unrounded %s, and with new blocks. |
mmtr
approved these changes
Dec 18, 2019
Contributor
mmtr
left a comment
There was a problem hiding this comment.
Thanks for the fix @jorgefilipecosta! This works great on my tests, with both new and existing cover blocks.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As @mmtr noted in #18665 (comment), the rounding problem on the cover block was not totally fixed. During the save we should also round the value.
This PR fixes the problem and introduces the deprecation logic to keep current blocks valid.
How has this been tested?
On the master branch, I inserted a cover block with an image background.
I set the focal point coordinates to seven.
I checked on the code view that the background-position was "7.000000000000001%".
I saved the post.
I switched to this branch and reloaded the post.
I verified the block was still valid and in the code editor, I verified the background-position was now 7%.
I inserted another block with 7 as the focal point position and verified in the code editor that the position was 7%.