Skip to content

Block list indentation#19833

Merged
mmotyczynska merged 72 commits intomasterfrom
ck/feat/list-indentation
Feb 24, 2026
Merged

Block list indentation#19833
mmotyczynska merged 72 commits intomasterfrom
ck/feat/list-indentation

Conversation

@mmotyczynska
Copy link
Copy Markdown
Contributor

@mmotyczynska mmotyczynska commented Feb 23, 2026

🚀 Summary

Added list indentation integration to the IndentBlock feature (enabled by default).

New commands support block-level indentation for whole lists (indentBlockList/outdentBlockList) and for individual list items (indentBlockListItem/outdentBlockListItem). Indentation can be rendered using either margin-left/margin-right styles (offset-based) or CSS classes (class-based).


📌 Related issues


💡 Additional information

Optional: Notes on decisions, edge cases, or anything helpful for reviewers.


🧾 Checklists

Use the following checklists to ensure important areas were not overlooked.
This does not apply to feature-branch merges.
If an item is not relevant to this type of change, simply leave it unchecked.

Author checklist

  • Is the changelog entry intentionally omitted?
  • Is the change backward-compatible?
  • Have you considered the impact on different editor setups and core interactions? (e.g., classic/inline/multi-root/many editors, typing, selection, paste, tables, lists, images, collaboration, pagination)
  • Has the change been manually verified in the relevant setups?
  • Does this change affect any of the above?
  • Is performance impacted?
  • Is accessibility affected?
  • Have tests been added that fail without this change (against regression)?
  • Have the API documentation, guides, feature digest, and related feature sections been updated where needed?
  • Have metadata files (ckeditor5-metadata.json) been updated if needed?
  • Are there any changes the team should be informed about (e.g. architectural, difficult to revert in future versions or having impact on other features)?
  • Were these changes documented (in Logbook)?

Reviewer checklist

  • PR description explains the changes and the chosen approach (especially when performance, API, or UX is affected).
  • The changelog entry is clear, user‑ or integrator-facing, and it describes any breaking changes.
  • All new external dependencies have been approved and mentioned in LICENSE.md (if any).
  • All human-readable, translateable strings in this PR been introduced using t() (if any).
  • I manually verified the change (e.g., in manual tests or documentation).
  • The target branch is correct.

mmotyczynska and others added 30 commits January 29, 2026 23:33
…command' into ck/19679-indent-block-list-item-command
…verters

Add converters for list items indentation.
@mmotyczynska mmotyczynska requested a review from a team as a code owner February 23, 2026 13:57
Comment thread packages/ckeditor5-list/src/list/listediting.ts Outdated
"_comment": "By default, the plugin uses inline styles for indentation."
},
{
"elements": "li",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe we can group this together with ol ul?

Comment thread packages/ckeditor5-indent/src/integrations/indentblocklistintegration.ts Outdated
Comment thread packages/ckeditor5-indent/src/integrations/indentblocklistintegration.ts Outdated
Comment thread packages/ckeditor5-indent/src/integrations/indentblocklistintegration.ts Outdated
Comment thread packages/ckeditor5-indent/src/integrations/indentblocklistitemcommand.ts Outdated
}
}
} else {
listItems.push( listItem );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This would set/remove the attribute only on the first block; the rest of the blocks and items would propagate by post-fixer. Commands should not depend on the post-fixers.

Comment thread packages/ckeditor5-indent/src/integrations/indentblocklistitemcommand.ts Outdated
} );
} );

it( 'no command should be executed when all selected items cannot be indented (start of a list)', () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please update the test description.

Copy link
Copy Markdown
Member

@pomek pomek left a comment

Choose a reason for hiding this comment

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

I am speaking only about the lockfile – LGTM.

Copy link
Copy Markdown
Contributor

@niegowski niegowski left a comment

Choose a reason for hiding this comment

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

Please extract leftovers to follow-ups.

@mmotyczynska mmotyczynska merged commit 9f5b0ca into master Feb 24, 2026
10 checks passed
@mmotyczynska mmotyczynska deleted the ck/feat/list-indentation branch February 24, 2026 17:30
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.

List indentation

4 participants