Skip to content

feat: add ordered list cycle command - #396

Merged
ocavue merged 5 commits into
masterfrom
feat/list-toggle-cycle
Jul 30, 2026
Merged

feat: add ordered list cycle command#396
ocavue merged 5 commits into
masterfrom
feat/list-toggle-cycle

Conversation

@maccman

@maccman maccman commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add cyclePlainList to cycle plain blocks through bullet, ordered, and text
  • normalize task/list attrs when converting task-like content to a plain bullet
  • cover the command state table and closest-nested-list behavior in list extension tests

State table

Current selection state Next state
Not a plain bullet or ordered list Unordered list
Unordered list Ordered list
Ordered list No list

Task items are treated as non-plain-list content on the first press, so they convert to a plain bullet and clear stale task attrs instead of preserving checkbox semantics invisibly. Nested selections follow the existing closest-list convention used by cycleCheckableList.

Verification

  • pnpm test --run packages/core/src/extensions/list.test.ts
  • pnpm typecheck
  • pnpm lint
  • pnpm build

Reflect dependency PR will wire the iOS toolbar button to this command.

Summary by CodeRabbit

  • New Features

    • Added list cycling to switch between bullet, ordered, and plain text formats.
    • Cycling task items converts them to unchecked bullet items.
    • List cycling applies to the nearest nested list without changing surrounding lists.
  • Tests

    • Added coverage for list cycling, task conversion, and nested list behavior.

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
meowdown Ready Ready Preview Jul 30, 2026 3:12am

@pkg-pr-new

pkg-pr-new Bot commented Jul 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@meowdown/core@396
npm i https://pkg.pr.new/@meowdown/markdown@396
npm i https://pkg.pr.new/@meowdown/react@396

commit: c9026b4

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 92.88% 4546 / 4894
🔵 Statements 90.58% 5102 / 5632
🔵 Functions 90.26% 1104 / 1223
🔵 Branches 86.12% 3241 / 3763
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/extensions/list.ts 90.9% 88.88% 93.61% 90.74% 176-178, 221, 226, 231, 236, 258-262, 415, 420
Generated in workflow #1538 for commit c9026b4 by the Vitest Coverage Report Action

@maccman
maccman requested a review from ocavue July 29, 2026 09:39
@ocavue ocavue changed the title feat: add plain list cycle command feat: add ordered list cycle command Jul 30, 2026
@ocavue
ocavue requested a review from Copilot July 30, 2026 02:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 94069fdd-456a-4148-9959-f5a6dec88415

📥 Commits

Reviewing files that changed from the base of the PR and between f342dfe and c9026b4.

📒 Files selected for processing (2)
  • packages/core/src/extensions/list.test.ts
  • packages/core/src/extensions/list.ts

📝 Walkthrough

Walkthrough

Adds cycleOrderedList, consolidates list command registration, and tests cycling plain, task, and nested list content.

Changes

List cycling

Layer / File(s) Summary
Cycle list states
packages/core/src/extensions/list.ts
cycleOrderedList cycles bullet lists to ordered lists, ordered lists to unwrapped content, and other list types to unchecked bullets.
Command registration and coverage
packages/core/src/extensions/list.ts, packages/core/src/extensions/list.test.ts
The consolidated list command provider is wired into defineMeowdownList(), with tests covering plain, task, and nested list cycling.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: ocavue

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a new list cycling command for ordered/plain list behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/list-toggle-cycle

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/core/src/extensions/list.test.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

packages/core/src/extensions/list.ts

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ocavue
ocavue merged commit d5c2f3a into master Jul 30, 2026
17 checks passed
@ocavue
ocavue deleted the feat/list-toggle-cycle branch July 30, 2026 03:27
@ocavuebot ocavuebot mentioned this pull request Jul 30, 2026
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.

3 participants