Draft: Comments
This implements comments functionality. The UI and behavior is similar to the comments features in Google Docs.
I have opened this pull request in response to a request by @dylans.
⚠️ No Changeset found
Latest commit: 20a556a78f61e5a6ccf0c3e3437e1aa17d871ddc
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| plate | ✅ Ready (Inspect) | Visit Preview | Apr 23, 2022 at 10:12AM (UTC) |
Thank you for that big PR, I'll take time to deeply review it
Overall very smart and complete work.
My first request is to use a thread leaf instead of an inline element:
- it will enable us to overlap threads
- use
thread_<id>prop to store the thread- slate can split an element into multiple leaves so we'll need to set/unset nodes to all siblings with the same thread id so all the thread leaves are in sync
- later we can extend the feature to inline elements and blocks with the same structure, queries and transforms
- to see an example, Slite is using that strategy
I already did a plugin with the same structure so I'll share a gist we can reuse:
https://gist.github.com/zbeyens/dfcf97a8cb2af991d91ca506d500b74a
My second request is to use a zustood store (as we do for core and combobox plugin) to store the active thread, hover thread, all the threads, etc.
What do you think?
Thanks. Sounds reasonable.
@SanjoSolutions any plans to revisit this based on the previous feedback? It would be great to land this in the near future!
The latest version can be found on the branch https://github.com/xolvio/plate/tree/comments-xspecs. There are currently no plans on my side to develop this any further.
I guess #1822 is the follow-up of that PR, so we can close this one. Thanks again @SanjoSolutions for this huge amount of work.