fix: Disable default UI when no components context is found#2611
fix: Disable default UI when no components context is found#2611matthewlipski wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughBlockNoteViewComponent now reads the components context and conditionally defaults UI feature props (toolbars, menus, panels) based on context availability. When no context exists, these props are explicitly set to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
Summary
When using
BlockNoteViewRawto create a minimal editor, errors are thrown when the editor attempts to render default UI elements as there is no components context to create them from. This PR makes it so that if no component context is found when rendering the editor, all default UI elements are disabled.Note however that this is not a supported use case and we do not expect
BlockNoteViewRawto be used on its own.Closes #889
Rationale
While this use case is not officially supported,
BlockNoteViewRawis exported and may be useful to some.Changes
See above.
Impact
N/A
Testing
Because this is not something we officially support, no tests have been added.
Screenshots/Video
N/A
Checklist
Additional Notes
Summary by CodeRabbit