Skip to content

List block: Apply ordered/unordered conversion to nested lists#71206

Open
Sukhendu2002 wants to merge 1 commit intoWordPress:trunkfrom
Sukhendu2002:enhancement/list-propagate-ordered-to-nested
Open

List block: Apply ordered/unordered conversion to nested lists#71206
Sukhendu2002 wants to merge 1 commit intoWordPress:trunkfrom
Sukhendu2002:enhancement/list-propagate-ordered-to-nested

Conversation

@Sukhendu2002
Copy link
Contributor

@Sukhendu2002 Sukhendu2002 commented Aug 14, 2025

What?

Part of: #41769

When converting a List block between unordered and ordered, nested lists didn’t follow and required manual selection. This PR propagates the conversion to all nested core/list descendants.

Testing Instructions

  1. Insert a List block with nested lists (multiple levels).
  2. Click “Ordered” in the List block toolbar; all nested lists should become ordered.
  3. Click “Unordered”; all nested lists should become unordered.
  4. Verify a single Undo reverts the entire conversion.

@mtias mtias added [Block] List Affects the List Block [Type] Enhancement A suggestion for improvement. labels Aug 14, 2025
@Sukhendu2002 Sukhendu2002 marked this pull request as ready for review August 15, 2025 12:44
@github-actions
Copy link

github-actions bot commented Aug 15, 2025

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Sukhendu2002 <sukhendu2002@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

When converting a List block between unordered and ordered, nested lists didn’t follow and required manual selection.

Personally, I think this is the correct behavior. I imagine that many users would like to control the list type by hierarchy.

For example, Google Docs converts list types by level:

Image

Let's hear what others think: @aaronrobertshaw @carolinan

@t-hamano t-hamano added the Needs Decision Needs a decision to be actionable or relevant label Aug 16, 2025
@carolinan
Copy link
Contributor

I am not sure what the users expects here.

Some users might find it logical that a nested block inherits the setting from the parent block, UNTIL the nested block is changed manually.
But I am not sure that makes sense for the list, where the symbol and indentation is used to identify the hierarchy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] List Affects the List Block Needs Decision Needs a decision to be actionable or relevant [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants