Skip to content

feat: comments#875

Closed
usman-khalid wants to merge 1 commit into
adobe:mainfrom
usman-khalid:comments
Closed

feat: comments#875
usman-khalid wants to merge 1 commit into
adobe:mainfrom
usman-khalid:comments

Conversation

@usman-khalid
Copy link
Copy Markdown
Contributor

@usman-khalid usman-khalid commented Apr 13, 2026

Summary

Adds support for comments with live collaboration.

Should be merged with adobe/da-collab#132 which adds support for read-only users to write data to the Yjs comments map without touching the document content.

Description

  • Users can annotate text, images or entire tables (blocks)
  • Comment threads (with replies & reactions)
  • We store the text (src for image) + surrounding context as a snapshot
  • Orphan comments if the annotated piece of content gets removed or if we can't reliably find a match based on the fingerprint
  • Annotated pieces of content can be updated (insert text in between, line breaks, paragraph breaks, etc) which will update the comment fingerprint. Useful for addressing feedback on something and leaving the comment intact without orphaning it.
  • Comment data is persisted to .da/comments/<doc-id>.json for external uses cases (sidekick extension on .page|reviews - future enhancement)
  • Comments survive document moves through said .json
  • Resolve/Re-open comment threads
  • Share links to comments (editor loads with the active comment thread)

Keyboard Shortcuts:

  • CMD+Option+M (opens comments panel if no selection is active, and if there is one, starts composing a comment on that selection)
  • Esc to cancel composing a new comment or replying.
  • CMD+Option+Enter to submit comment/reply once composing.

Related Issue

Fixes #472

Motivation and Context

Bridge the gap between doc-based (google docs, sharepoint) and DA :)

How Has This Been Tested?

Tested on localhost and:

Demo

Screen.Recording.2026-04-13.at.17.20.13.mov

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Other Changes

  • Added shared da-toast component that da-list, da-sites and da-comments can use
  • Moved generateColor to a shared util as two places needed it now (avatar for comments, & Yjs live cursor)
  • Added shared util getCurrentUser for reusability

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@usman-khalid
Copy link
Copy Markdown
Contributor Author

Closing in favour of a follow-up cleaner PR.

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.

[edit] Enable document comments

1 participant