Skip to content

feat: Threads sidebar #1454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 174 commits into from
Mar 19, 2025
Merged

feat: Threads sidebar #1454

merged 174 commits into from
Mar 19, 2025

Conversation

matthewlipski
Copy link
Collaborator

@matthewlipski matthewlipski commented Feb 21, 2025

This PR adds an optional sidebar for threads that can be used instead of having the threads float next to their respective marks. The ThreadsSidebar component can be imported from BlockNote to add the sidebar to any editor - see the docs for more.

Screen.Recording.2025-03-19.at.10.53.32-1.mov

BlockNoteView changes

The ThreadsSidebar component sits outside the editor but needs to have access to the editor context, including Mantine and theme variables. To do this, I modified what BlockNoteView and BlockNoteViewEditor render when renderEditor is false - here's an explanation for what's changed:

Previously:
BlockNoteView: Only provides context, doesn't render any elements.
BlockNoteViewEditor: Renders both bn-container and bn-editor elements.

Now:
BlockNoteView: Renders bn-container element.
BlockNoteViewEditor: Renders bn-editor element.

Since Mantine and theme variables are set on the bn-container element, this ensures that anything within BlockNoteView is styled properly. It's also worth noting that theme variables are used by the react package, and so we can't really make a similar change to e.g. the Mantine-specific BlockNoteView instead.

This change should not change anything when renderEditor is true or undefined.

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