Skip to content

fix: fix the issue of failed title switching after using the quill-header-list plugin - #475

Open
wuyiping0628 wants to merge 1 commit into
devfrom
wyp/list-0805
Open

fix: fix the issue of failed title switching after using the quill-header-list plugin#475
wuyiping0628 wants to merge 1 commit into
devfrom
wyp/list-0805

Conversation

@wuyiping0628

@wuyiping0628 wuyiping0628 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

解决用了quill-header-list插件后切换标题失败的问题

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Bug Fixes
    • Improved header formatting controls in the editor demos.
    • Header levels are now applied correctly, with formatting reliably removed when the unformatted option is selected.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The Fluent Editor header toolbar handlers now convert header levels to numbers and pass false when users remove header formatting.

Changes

Header toolbar formatting

Layer / File(s) Summary
Apply header toolbar values
packages/docs/fluent-editor/demos/header-list-container.vue, packages/docs/fluent-editor/demos/header-list.vue
Both demos add custom header handlers. The handlers pass numeric header levels to Quill and use false to clear header formatting.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

I’m a rabbit with a toolbar bright,
Headers become numbers, neat and right.
false clears the style away,
Quill formats text without delay.
Hop, hop, clean lists today!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main fix for failed title switching after using the quill-header-list plugin.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wyp/list-0805

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.

@wuyiping0628 wuyiping0628 changed the title feat: fix the issue of failed title switching after using the quill-h… fix: fix the issue of failed title switching after using the quill-header-list plugin Aug 6, 2026
@github-actions github-actions Bot added bug Something isn't working and removed enhancement New feature or request labels Aug 6, 2026
@wuyiping0628 wuyiping0628 added enhancement New feature or request and removed enhancement New feature or request labels Aug 6, 2026

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
packages/docs/fluent-editor/demos/header-list-container.vue (1)

29-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a regression test for header selection and clearing.

The existing specs verify initial headings and header-list visibility, but they do not exercise this handler. Add tests in packages/docs/fluent-editor/demos/header-list.spec.ts and packages/docs/fluent-editor/demos/header-list-container.spec.ts that select a heading level and then select the reset option.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/docs/fluent-editor/demos/header-list-container.vue` around lines 29
- 31, Add regression coverage for the header(value) handler in both
header-list.spec.ts and header-list-container.spec.ts: select a heading level,
assert the editor applies that header, then select the reset option and assert
the header formatting is cleared. Reuse the existing demo test setup and
selectors without changing the handler behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/docs/fluent-editor/demos/header-list-container.vue`:
- Around line 29-31: Add regression coverage for the header(value) handler in
both header-list.spec.ts and header-list-container.spec.ts: select a heading
level, assert the editor applies that header, then select the reset option and
assert the header formatting is cleared. Reuse the existing demo test setup and
selectors without changing the handler behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c03ac424-4fcc-4fd8-b388-41f8cea9be94

📥 Commits

Reviewing files that changed from the base of the PR and between 662006b and c96df9f.

📒 Files selected for processing (2)
  • packages/docs/fluent-editor/demos/header-list-container.vue
  • packages/docs/fluent-editor/demos/header-list.vue

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant