-
Notifications
You must be signed in to change notification settings - Fork 797
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
Tiled Gallery: Fix block validation errors caused by inconsistent flex-basis style #18971
Conversation
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 If you are an automattician, once your PR is ready for review add the "[Status] Needs Team review" label and ask someone from your team review the code. jetpack plugin:
|
This worked for new blocks added after the patch applied, but the block added prior to applying the patch still throws a validation failure after patch applied:
full block content:
|
I think that particular message is a bit of a read herring. Looking at the other validation errors they show the new deprecation rounding the flex basis value so the style matches. It looks like I had a data attribute in the deprecation's gallery image save function that shouldn't have been there. Now I've removed that the block's migrate successfully again for me. Could have sworn I needed that attribute there in previous tests. Would definitely appreciate it if you could give this one another test. Thanks! 🙂 |
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 tested well for me. Added a tiled added a mosaic and columns tiled gallery in a layout grid and both showed invalid when reloaded. Applied patch and deprecations were applied and resaving and reloading, or adding new tiled galleries didn't result in any more validation errors.
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.
Thanks Aaron for fixing this, I Approve
Change itself looks ok. But it needs a master merge for the "Changelogger use" and "Changelogger validity" checks, and a changelogger change file so the former will pass. |
…sis style Inconsistent flex-basis style values are causing block validation errors in the tiled gallery. This fixes that issue and adds a deprecation to correct any blocks created between the problem commit was merged and this one.
b4a5025
8e2c6cb
to
b4a5025
Compare
Caution: This PR has changes that must be merged to WordPress.com |
Thanks @anomiex, I've rebased the PR and added the changelog. |
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 tests well for me. Nice work!
Great news! One last step: head over to your WordPress.com diff, D58515-code, and commit it. Thank you! |
Needed to rebase diff. Build is failing at present. Will revisit committing the diff Monday. |
Deployed: rWP222709 |
Fixes #16514
Closes #16543
A change made to the Tiled Gallery last year to fix mosaic and column layouts on AMP pages (#15770) introduced a block validation issue. This was a result of applying a decimal percentage width to columns via an inline flex-basis style. In the actual block content those decimal values were rounded to 12 places whereas the save function allowed 15. This inconsistency meant the two didn't match and caused the error.
This PR is essentially a clone of #16543 with fixes applied so the v3 deprecation runs correctly. I ran into issues rebasing the original PR after the recent Jetpack restructure hence this fresh PR.
Changes proposed in this Pull Request:
Does this pull request change what data or activity we track or use?
No change.
Testing instructions:
Screenshot
Proposed changelog entry for your changes: