Different line style#14920
Conversation
…vider here show multple styles of line
📝 WalkthroughWalkthroughThis PR adds support for configurable divider styles. Divider blocks now accept a ChangesConfigurable divider styles
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
blocksuite/affine/blocks/note/src/configs/slash-menu.ts (1)
75-80: ⚡ Quick winCentralize divider type literals to avoid drift.
The type list at Lines 75–80 duplicates model/renderer values. Please source these from a shared constant/type module so menu options cannot diverge from supported values.
🤖 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 `@blocksuite/affine/blocks/note/src/configs/slash-menu.ts` around lines 75 - 80, Summary: The inline list of divider type literals in slash-menu.ts duplicates model/renderer values and should be sourced from a shared constant to avoid drift. Fix: import the shared divider constant (e.g., DIVIDER_TYPES or DIVIDER_STYLES) from the central constants/type module and replace the hard-coded array in slash-menu.ts with a map over that imported constant (use the same property names like label and type), ensuring the produced menu entries use the canonical type values; update any local label mapping if the shared shape differs and run related tests.
🤖 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 `@blocksuite/affine/blocks/note/src/configs/slash-menu.ts`:
- Around line 75-80: Summary: The inline list of divider type literals in
slash-menu.ts duplicates model/renderer values and should be sourced from a
shared constant to avoid drift. Fix: import the shared divider constant (e.g.,
DIVIDER_TYPES or DIVIDER_STYLES) from the central constants/type module and
replace the hard-coded array in slash-menu.ts with a map over that imported
constant (use the same property names like label and type), ensuring the
produced menu entries use the canonical type values; update any local label
mapping if the shared shape differs and run related tests.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ef51bff4-eaea-412a-b7ee-75b24e453335
📒 Files selected for processing (4)
blocksuite/affine/blocks/divider/src/divider-block.tsblocksuite/affine/blocks/note/src/commands/block-type.tsblocksuite/affine/blocks/note/src/configs/slash-menu.tsblocksuite/affine/model/src/blocks/divider/divider-model.ts
when user click on the backslach button then click on the devider here show multple styles of line. #14900
Summary by CodeRabbit