-
Notifications
You must be signed in to change notification settings - Fork 812
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
[RNMobile] Fix pixelated Tiled Gallery images #22230
[RNMobile] Fix pixelated Tiled Gallery images #22230
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 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. 🔴 Action required: Please add missing changelog entries for the following projects: Use the Jetpack CLI tool to generate changelog entries by running the following command: Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
|
4f46309
to
a199961
Compare
Summary of failing tests: JS tests
I need to investigate this before submitting for review. Code coverage
I need to investigate this before submitting for review. Changelogger useThis is expected to fail because we're merging to a feature branch and decided not to provide changelogs until we merge to E2E post-connection testsRe-running (might be flaky). |
@SiobhyB sorry for the ping, will re-request a review once I've resolved the test failures. |
Once #22252 is merged, I'll update this PR and it should resolve the above mentioned test failures. |
Removes a hard-coded dimension in the Tiled Gallery save function that was put there while iterating on the development of the block.
f343ec1
to
32bd281
Compare
I've fixed the failing CI checks (except the ones that are known failures) and made an issue for addressing the remaining points that this PR doesn't fix on the linked issue. This is now ready for review, @SiobhyB 🙇 |
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.
LGTM! I confirmed the removal of the hard coded values fixes the pixelation and wasn't able to find any issues.
Fixes wordpress-mobile/gutenberg-mobile#4306
Related:
Changes proposed in this Pull Request:
This PR addresses the pixelated images we see on Tiled Galleries. The cause was a hard-coded image dimension set in the block's
save
function.A workaround is to omit the width and height altogether, which allows images to be rendered at full-resolution on the frontend.
A solution is out of the scope of this PR and this is why: Image blocks, which we used in the Tiled Gallery here, don't expose their width or height via the image's block attributes. I can't find a way to ask an inner image block for its width or height. WordPress/gutenberg#23244 tracks the need to make the image block provide a default width and height, albeit for different reasons. WordPress/gutenberg#35982 explains the issue I'm running into, but I suspect this is a duplicate of the former issue.
For now, the above mentioned workaround seems to bring benefits to the Tiled Gallery and doesn't have any downsides I'm aware of.
Screenshots
Jetpack product discussion
wordpress-mobile/gutenberg-mobile#4306
Does this pull request change what data or activity we track or use?
No, it does not.
Testing instructions:
Setup to test from the main apps
add/tiled-gallery-block
branch:npm run start:reset