-
Notifications
You must be signed in to change notification settings - Fork 67
fix (posts block): fix image width in horizontal block styles #3649
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
base: develop
Are you sure you want to change the base?
fix (posts block): fix image width in horizontal block styles #3649
Conversation
WalkthroughFor the Posts block, the Image.saveEnableWidthCallback now disables saving width for horizontal layouts only when the image has a link and the image width unit (desktop or tablet) is '%'. A clarifying comment was added. No public API or signature changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Pull request artifacts
|
bfintal
left a comment
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.
Looks like the original behavior is we disallowed the width option for horizontal layouts. Not sure if this is the right fix for this because we disabled it for a reason.
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/block/posts/style.js(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/block/posts/style.js (2)
src/components/block-css/index.js (1)
getAttribute(112-112)src/components/block-css/util.js (1)
getAttribute(209-230)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: PHP 7.3 and WP 6.5.5
- GitHub Check: PHP 8.2 and WP 6.6.2
- GitHub Check: PHP 8.2 and WP 6.5.5
- GitHub Check: PHP 8.2 and WP 6.7.2
- GitHub Check: PHP 8.2 and WP latest
- GitHub Check: PHP 7.3 and WP latest
- GitHub Check: build
🔇 Additional comments (1)
src/block/posts/style.js (1)
289-296: Logic correctly prevents style rule conflicts.The condition properly disables the default Image width styling when the custom selector (lines 236-258) should handle it. The checks for
imageWidthUnitandimageWidthUnitTabletmatch exactly with the custom rule'senabledCallback, ensuring consistent behavior and preventing both rules from applying simultaneously.
fixes #3554
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.