-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Transform page list to list #69116
base: trunk
Are you sure you want to change the base?
Transform page list to list #69116
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Hi @carolinan , @t-hamano As discussed in this PR, I have split it into separate PRs—one for navigation and another for the list. This is the PR for transform to list block. Please take a look and share your feedback or suggestions. Thanks in advance! |
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 for the update!
Thanks a lot for the detailed review @t-hamano Applied all the above mentioned points in the recent commit. |
Thanks for the update! After further testing, I found that this transformation is more complicated than we thought. For example, the page list is structured as follows. Note that the
In the Page List block, it is rendered as follows: However, when this is transformed into a List block, the order changes as follows: The reason is that the block transformation is missing logic for processing the page tree. The Page List block has logic for that: pagesByParentId, pagesTree, and blockList. Therefore, we need to implement the same logic to the block transformation. Here's the approach I'm thinking of:
If you have any questions, please ask. |
Thanks for pointing this out, @t-hamano! I also noticed the order change after the transformation. As you mentioned, we need to account for the tree scenario as well. |
What?
Fixes #44458
Why?
Currently Page list block has no transform option for list block.
How?
Added list block transformation to Page list block.
Testing Instructions
Screenshots or screencast
Screenshare.-.2025-02-10.5_03_26.PM.mp4