Skip to content

fix(list): only assign listStart to ordered list items and resume numbering past unordered siblings#4954

Merged
zbeyens merged 7 commits intoudecode:mainfrom
dylans:fix/normalize-list-start-resume-through-unordered
Apr 25, 2026
Merged

fix(list): only assign listStart to ordered list items and resume numbering past unordered siblings#4954
zbeyens merged 7 commits intoudecode:mainfrom
dylans:fix/normalize-list-start-resume-through-unordered

Conversation

@dylans
Copy link
Copy Markdown
Collaborator

@dylans dylans commented Apr 23, 2026

  • Auto release

normalizeListStart previously assigned and retained a listStart value on unordered list items (disc/circle/square). listStart is only semantically meaningful for ordered list styles, so the normalizer now:

  • Returns early for unordered list styles and strips any pre-existing listStart.
  • For ordered items, walks backward past same-indent siblings with a different listStyleType rather than aborting at them. An ordered list interrupted by bullets now resumes its sequential numbering against the preceding ordered item.

Callers can still restore the prior lookup behavior by passing breakOnEqIndentNeqListStyleType: true or a custom query via options.

Checklist

  • pnpm typecheck
  • pnpm lint:fix
  • bun test
  • pnpm brl
  • pnpm changeset
  • ui changelog

…bering past unordered siblings

normalizeListStart previously assigned and retained a listStart value on unordered
list items (disc/circle/square). listStart is only semantically meaningful for
ordered list styles, so the normalizer now:

- Returns early for unordered list styles and strips any pre-existing listStart.
- For ordered items, walks backward past same-indent siblings with a different
  listStyleType rather than aborting at them. An ordered list interrupted by
  bullets now resumes its sequential numbering against the preceding ordered item.

Callers can still restore the prior lookup behavior by passing
breakOnEqIndentNeqListStyleType: true or a custom query via options.
@codesandbox
Copy link
Copy Markdown

codesandbox Bot commented Apr 23, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plate Ready Ready Preview, Comment Apr 25, 2026 2:51pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 23, 2026

🦋 Changeset detected

Latest commit: 763b326

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@platejs/list Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@zbeyens
Copy link
Copy Markdown
Member

zbeyens commented Apr 23, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dylans dylans marked this pull request as ready for review April 23, 2026 19:47
@dylans dylans requested a review from a team April 23, 2026 19:47
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. patch Bugfix & documentation PR plugin:list labels Apr 23, 2026
…it spec

Under the new listStart semantic (only assigned to ordered list items),
the split output no longer carries listStart on the second disc heading.
The test's stated intent ('does not reset a heading list item') — that
type='h1', listStyleType='disc', and indent are preserved across the
split — remains fully asserted.
Integration tests in apps/www/ covering docx paste and li>ul nesting
had listStart values on disc items as incidental normalizer output.
Under the new listStart semantic (only assigned to ordered list items),
these values are no longer produced. Test intent — preserved list
nesting and attributes across docx/HTML import — is unchanged.
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 25, 2026
@zbeyens zbeyens merged commit 045e348 into udecode:main Apr 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer patch Bugfix & documentation PR plugin:list size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants