-
Notifications
You must be signed in to change notification settings - Fork 219
Fix image editor in Featured Product/Category blocks on WP 6.2 #9142
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
assets/js/blocks/featured-items/image-editor.tsx
|
Size Change: +453 B (0%) Total Size: 1.11 MB
ℹ️ View Unchanged
|
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.
It works and no errors/warnings are thrown on 6.2 and neither 6.1 👍
I left one comment with potential improvement, but still pre-approving.
Also, I spotted that the edited (zoomed) image is actually cropped (top image: edited, bottom image: untouched). But I checked and it behaved like that before those changes, so maybe that's expected and definitely, it's not in the scope of this PR.
Thanks for the review, @kmanijak!
Good catch! That's because the block has a separate Image Fit option. Setting it to Cover makes it expand to the entire available space. I agree that's confusing, but I'm not sure how we could improve it. 🤔 |
* Empty commit for release pull request * Add 10.0.3 changelog * Update versions to 10.0.3 * Fix image editor in Featured Product/Category blocks on WP 6.2 (#9142) * Add 10.0.3 testing steps --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Empty commit for release pull request * Empty commit for release pull request * Add 9.8.5 changelog * Update versions to 9.8.5 * Fix image editor in Featured Product/Category blocks on WP 6.2 (#9142) * Add 9.8.5 testing steps --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Empty commit for release pull request * Add 10.0.3 changelog * Update versions to 10.0.3 * Fix image editor in Featured Product/Category blocks on WP 6.2 (#9142) * Add 10.0.3 testing steps * Empty commit for release pull request * Check that the customized fallback template is archive-product before unsetting the source property (#9330) * use 'enqueue_block_assets' is available (#9332) * Remove esc_url() on self generated link to edit the Mini Cart template since it gets escaped in JS (#9348) * Add changelog entries to readme.txt * Update version number in several files * Add testing notes for the release * Add #9332 to testing notes * Add testing on frontend for #9332 --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com> Co-authored-by: Luigi Teschio <gigitux@gmail.com> Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Fixes #9100.
The issue was caused because we were using a Gutenberg component which is no longer available in WP 6.2 (
ImageEditingProvider
), this PR refactors the code so it works without that component.Testing
User Facing Testing
wp-admin
> Products > Categories and edit a category to add an image):WooCommerce Visibility
Changelog