Skip to content

Conversation

@kaeizen
Copy link
Contributor

@kaeizen kaeizen commented Dec 16, 2025

fixes #3657

Note: Vertical 2 Layout doesn't include the featured image in the sort content options

Summary by CodeRabbit

  • Refactor
    • Improved internal property naming consistency for better code maintainability. No changes to functionality or user experience.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 16, 2025

Walkthrough

A prop name in the Posts block's edit component was corrected from DefaultContentOrder to defaultContentOrder when passed to InspectorControls, aligning with the component's internal naming conventions without altering functional behavior.

Changes

Cohort / File(s) Summary
Posts block prop naming fix
src/block/posts/edit.js
Changed prop name from DefaultContentOrder to defaultContentOrder passed to InspectorControls component

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A tiny tweak, from capital to small,
The prop name flows, now matching it all,
defaultContentOrder finds its rightful place,
Featured images dance with newfound grace! ✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: fixing the display of default content order when resetting sort in the posts block.
Linked Issues check ✅ Passed The PR changes a prop name from DefaultContentOrder to defaultContentOrder in the posts block edit component. This prop name correction directly addresses the root cause of issue #3657 where the featured image position was not being properly controlled.
Out of Scope Changes check ✅ Passed The change is narrowly focused on correcting a prop name in src/block/posts/edit.js to fix the content order handling, which is directly within scope of the linked issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/posts-block-sort-content

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3aabbe5 and ad1ed03.

📒 Files selected for processing (1)
  • src/block/posts/edit.js (1 hunks)
⏰ 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 8.2 and WP 6.6.2
  • GitHub Check: PHP 8.2 and WP 6.5.5
  • GitHub Check: PHP 8.2 and WP latest
  • GitHub Check: PHP 7.3 and WP 6.5.5
  • GitHub Check: PHP 7.3 and WP latest
  • GitHub Check: build
  • GitHub Check: PHP 8.2 and WP 6.7.2
🔇 Additional comments (1)
src/block/posts/edit.js (1)

185-185: Critical prop name fix resolves content arrangement reset bug.

The prop name correction from DefaultContentOrder to defaultContentOrder fixes a case mismatch that prevented the content arrangement reset functionality from working correctly. Before this fix, props.defaultContentOrder inside InspectorControls would be undefined, causing:

  1. Line 256: The allowReset check to incorrectly compare against undefined
  2. Line 261: The reset action to set contentOrder to undefined instead of the variation-specific default

This directly addresses the PR objective of fixing the Posts block content arrangement behavior for different layouts, including Vertical 2.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

🤖 Pull request artifacts

file commit
pr3668-stackable-3668-merge.zip ad1ed03

github-actions bot added a commit that referenced this pull request Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Posts block - featured image does not move according to content arrangement when using Vertical 2 layout

2 participants