Repository navigation
feat(icon-list): add nested sub-list support - #3181
Open
faisalahammad wants to merge 1 commit into
Open
faisalahammad wants to merge 1 commit into
faisalahammad wants to merge 1 commit into
Conversation
Items can now hold a nested Icon List. The sub-list is added from the item toolbar or the button under the item text, and it starts with the parent list defaults for icons, colors and sizes. - New Sub-list Indent control in Dimensions. Nested lists inherit the value live from the parent, and a sub-list can override it for deeper levels. - Lists and items get list/listitem roles. Items without a sub-list keep the exact previous markup, and old content loads through deprecations without warnings. - Divider and vertical layout rules are scoped per list level, in the editor and on the frontend. - Backspace merge moves the sub-list to the previous item instead of dropping it. - BlockAppender accepts seed attributes for the inserted block. Fixes Codeinwp#3132
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3132.
Summary
The Icon List block can now hold nested lists. Any item can contain a full Icon List as a sub-list, added from the item toolbar or the "Add Sub-list" button under the item text. New sub-lists start with the parent list defaults (icons, colors, sizes), and every level keeps its own settings.
role="list"and itemsrole="listitem"so screen readers announce the nesting. Items without a sub-list serialize exactly as before, and pre-nesting content loads through deprecations without invalid block warnings.Test instructions
npm ci && composer install && npm run build) or install the built zip, and open a post in the editor.has-sublist), lists carryrole="list", itemsrole="listitem".Automated coverage: jest (sub-list attribute seeding), PHPUnit (
tests/test-icon-list-css.php, indent CSS including the numeric-string guard), Playwright (src/blocks/test/e2e/blocks/icon-list.spec.js: nesting, inheritance, live indent, serialization roles, old-content validity). Full suites green: jest 372/372, PHPUnit 821 (11 pre-existing skips), phpcs, PHPStan level 6, eslint 0 errors, icon-list e2e 6/6, tabs/accordion e2e 10/10.Checklist before the final review