Skip to content

[WC-2950] (rich-text): allow ordered list to start at different number - #2485

Merged
gjulivan merged 2 commits into
mainfrom
rich-text/ordered-list-start-n
Nov 13, 2026
Merged

gjulivan merged 2 commits into
mainfrom
rich-text/ordered-list-start-n

Conversation

@gjulivan

Copy link
Copy Markdown
Collaborator

Pull request type


Description

@gjulivan
gjulivan requested a review from a team as a code owner October 21, 2026 14:58
@github-actions

This comment has been minimized.

@gjulivan
gjulivan force-pushed the rich-text/ordered-list-start-n branch from 03d6abf to 74b5f07 Compare November 3, 2026 14:21
@github-actions

This comment has been minimized.

@iobuhov
iobuhov force-pushed the rich-text/ordered-list-start-n branch from 74b5f07 to 3af3d16 Compare November 5, 2026 13:24
iobuhov
iobuhov previously approved these changes Nov 5, 2026

@iobuhov iobuhov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

leonardomendix
leonardomendix previously approved these changes Nov 12, 2026
@gjulivan
gjulivan force-pushed the rich-text/ordered-list-start-n branch from 98cb9da to 7a571d8 Compare November 12, 2026 10:53
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

leonardomendix
leonardomendix previously approved these changes Nov 13, 2026
r0b1n
r0b1n previously approved these changes Nov 13, 2026
@gjulivan
gjulivan dismissed stale reviews from r0b1n and leonardomendix via e2efd12 November 13, 2026 10:54
@gjulivan
gjulivan force-pushed the rich-text/ordered-list-start-n branch from 135d888 to e2efd12 Compare November 13, 2026 10:54
@github-actions

Copy link
Copy Markdown
Contributor

AI Code Review

✅ Approved — no issues found


What was reviewed

File Change
rich-text-web/src/components/toolbars/components/ToolbarSplitButton.tsx "Start at" number input in the numbered list dropdown. It commits on Enter, blur or close, and Escape cancels.
rich-text-web/src/components/toolbars/helpers/listHelpers.ts normalizeStartInput for empty, invalid and clamped input
rich-text-web/src/extensions/OrderedListStyled.ts setOrderedListStart command, MAX_ORDERED_LIST_START, and renderHTML that publishes the marker length
rich-text-web/src/utils/markerFormat.ts computeMarkerLength and maxMarkerSizeToAttrs, which widen the marker gutter for long counters in decimal, alpha and roman styles
rich-text-web/src/**/*.scss Gutter and dropdown styles
rich-text-web/src/utils/i18n/locales/*.json New toolbar.orderedListStart string in 5 locales
rich-text-web/**/__tests__/*, e2e/RichText.spec.js Unit and E2E tests for the new behaviour
rich-text-web/CHANGELOG.md User-facing Added and Fixed entries under Unreleased
rich-text-web/openspec/changes/add-ordered-list-start-number/* Per-package OpenSpec change (correct location)

Skipped (out of scope): none

CI: pending: Run code quality check, Plan E2E matrix, sigridci · unrelated failure: security/snyk (aggregate Snyk check; the code and license Snyk checks passed)


Positives

  • The live editor view and the serialized HTML both use the same computeMarkerLength and maxMarkerSizeToAttrs, via ListItemMarkerFormat and OrderedListStyled. The marker gutter therefore stays consistent between the two.
  • The start draft is mirrored in a ref, so a click outside the dropdown still commits it, and the draft is cleared first so it can't apply twice.
  • The changelog entries are written for users, and there are unit tests for the helpers, the extension and the toolbar, plus an E2E test.

@gjulivan
gjulivan enabled auto-merge (rebase) November 13, 2026 11:13
@gjulivan
gjulivan merged commit 7d318e2 into main Nov 13, 2026
13 of 14 checks passed
@gjulivan
gjulivan deleted the rich-text/ordered-list-start-n branch November 13, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants