Skip to content

feat: Add numberingFormat to orderedList#1527

Closed
johanneswilm wants to merge 8 commits intosuperdoc-dev:mainfrom
johanneswilm:sd-1008-list-definitions-support-for-editing-and-creating-new
Closed

feat: Add numberingFormat to orderedList#1527
johanneswilm wants to merge 8 commits intosuperdoc-dev:mainfrom
johanneswilm:sd-1008-list-definitions-support-for-editing-and-creating-new

Conversation

@johanneswilm
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 15, 2025 15:34
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@johanneswilm johanneswilm requested a review from Copilot December 16, 2025 16:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 19 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@harbournick harbournick force-pushed the main branch 2 times, most recently from 84f8ea5 to 2a443d8 Compare December 23, 2025 02:17
@johanneswilm johanneswilm deleted the sd-1008-list-definitions-support-for-editing-and-creating-new branch January 10, 2026 15:15
@johanneswilm johanneswilm restored the sd-1008-list-definitions-support-for-editing-and-creating-new branch January 23, 2026 09:33
@johanneswilm johanneswilm reopened this Jan 23, 2026
Copy link
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

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

@johanneswilm nice work on the collapsed-cursor path — findAdjacentListItems is clean.

one thing to fix: when the selection spans multiple lists, changeListNumberingType merges them into one by assigning a single numId to all paragraphs. grouping by original numId (like the collapsed path does) would keep them separate.

a couple small cleanup suggestions inline. test-wise, changeListNumberingType has no tests yet and the converter tests copy the namespace logic instead of calling the real export — worth addressing.

left inline comments.

});
}

if (paragraphsInSelection.length === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if the selection spans two different lists, this gives them all the same new numId and merges them into one sequence. the collapsed path already handles this correctly by grouping per numId — the ranged path should do the same.

* @param {string} numberingType - The numbering format key
* @returns {string} The SVG icon for the format
*/
export function getNumberingIcon(numberingType) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this rebuilds a map with the same keys as numberingIcons. could just be numberingIcons[type] || numberingIcons.decimal.

},
});

const setNumberedListIcon = (button, numberingType) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

same logic as superToolbar.updateNumberedListIcon — and superToolbar is already in scope here. one copy is enough.

ListHelpers.generateNewListDefinition({ numId: Number(numId), listType, editor });

// Use the provided numbering format or default settings
if (listType === 'orderedList' && numberingFormat) {
Copy link
Contributor

Choose a reason for hiding this comment

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

the inner else and the outer else do the same thing. compute formatConfig upfront, then branch once.

@superdoc-dev superdoc-dev deleted a comment from github-actions bot Mar 11, 2026
@caio-pizzol
Copy link
Contributor

closing in favor of #2366.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants