-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
wip: feat: comments #1376
base: feature/liveblocks-v2
Are you sure you want to change the base?
wip: feat: comments #1376
Conversation
* fix: Code block language parsing * Small change to code clarity --------- Co-authored-by: matthewlipski <[email protected]>
* Enhance translation in french in fr.ts * Small fixes --------- Co-authored-by: matthewlipski <[email protected]>
* WIP * Fixed multi-editor drag and drop * WIP: Added side menu detection area flag * Small changes * Source blocks are now deleted correctly & fixed error sometimes being thrown after drag & drop * Removed logs * Implemented PR feedback * Updated test snapshot * Moved/refactored tests
#1363) * fix: Cache & reuse Shiki highlighter & parser for improved performance * Updated multi editor example and reverted all blocks example due to unwanted changes in merged PR --------- Co-authored-by: matthewlipski <[email protected]>
* Fixed rollup config for xl and server-util packages * Small fix
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@dmonad I'm working on a POC for comments here. You can see:
Two questions about this:
|
* feat: Support for code blocks in PDF exporter * feat: Support for code blocks in DOCX exporter * fix: Use Geist Mono for inline code tags in DOCX export * fix: Background color, example formatting, style definition * Removed TODO --------- Co-authored-by: matthewlipski <[email protected]>
* Improved collaboration cursor UX * - Made label show on selection changes too - Cleaned up code - Added visibility dot to cursors - Added animations * Implemented PR feedback & revised animations/hide delays * Added editor option flag and sorted CSS
Even that is edgy… There are several parts of Yjs that could be exploited to sneak-in changes, even if you check
That is actually a more realistic approach. You could check each struct / delete whether it applies changes to only the children of a certain other type. This approach is also more memory efficient (no need to fork a document). However, you need to understand the Yjs internals to pull this off. Ideally, comments are stored in a separate Yjs document with different permissions. If that is not possible, I recommend that read-only users are only able to add comments through an HTTP request (no manipulations on the Yjs document). |
I agree, read-only users should probably always use an HTTP request. However, for other users (with write access), I think we should also be able to validate changes. For example, a user should only be able to edit comments they created themselves. So I'm interested if / how we can validate this. Can also discuss this over a call, might be easier :) |
* feat: Page break block * feat: Add page break support to PDF & DOCX exporters * feat: Add CSS to support Page break when printing * Small UX changes * Removed page break from default schema * Fixed unit tests * Fixed lint * Implemented PR feedback --------- Co-authored-by: matthewlipski <[email protected]>
* Small collaboration cursor fixes * Slight edit to dot and label height offsets * Small fix * - Updated collaboration docs with `showCursorLabels` option - Changed `all-blocks` example to `default-blocks`
|
||
renderHTML({ HTMLAttributes }: { HTMLAttributes: Record<string, any> }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on if you want to support copy-paste of comments, maybe parseHTML?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
I think copy paste will need to be tested extensively :) for example, you could paste a comment that's not in the store, etc
* Updated sponsors section * Renaming
# Conflicts: # packages/core/src/editor/BlockNoteEditor.ts
First POC of native comments in BlockNote.
Providers
YjsThreadStore
We store thread / comment information directly in yjs so it can be easily integrate with existing sync / storage mechanisms. The downside of this is that comments require a more advanced permission model than text documents; so we need to provide a workaround for this and clearly explain the pros / cons. Of course, users can always implement their own (e.g.: REST-based) ThreadStore with more advanced permissions built-in.
TODO:
LiveBlocks
The UI Components are roughly based on the LiveBlocks open source components. LiveBlocks users will have two different ways to use LiveBlocks:
TODO:
TipTap
We can probably integrate directly with the TiptapCollabProvider
TODO:
UX TODOs
Misc
TODO: