Skip to content
Compare
Choose a tag to compare
@github-actions github-actions released this 19 Feb 00:43
· 42 commits to main since this release
91f7702

Major Changes

  • #4064 by @felixfeng33 – This is a rewrite of the comments plugin removing UI logic (headless).

    Plugin Options

    • Removed configuration options from plugin options in favor of component-level control:
      • options.comments
      • options.myUserId
      • options.users

    Components

    • Removed legacy components:
      • CommentDeleteButton
      • CommentEditActions
      • CommentEditButton
      • CommentEditCancelButton
      • CommentEditSaveButton
      • CommentEditTextarea
      • CommentNewSubmitButton
      • CommentNewTextarea
      • CommentResolveButton
      • CommentsPositioner
      • CommentUserName

    API

    • Removed functions in favor of new API methods:
      • findCommentNodeapi.comment.node()
      • findCommentNodeByIdapi.comment.node({ id })
      • getCommentNodeEntriesapi.comment.nodes()
      • getCommentNodesByIdapi.comment.nodes({ id })
      • removeCommentMarktf.comment.remove()
      • unsetCommentNodesByIdtf.comment.unsetMark({ id })
    • Removed unused functions:
      • getCommentFragment
      • getCommentUrl
      • getElementAbsolutePosition
      • getCommentPosition
    • Updated getCommentCount to exclude draft comments

    State Management

    • Removed CommentProvider - users should implement their own state management – block-discussion.tsx
    • Moved useHooksComments to UI registry – comments-plugin.tsx
    • Removed hooks no longer needed with new UI:
      • useActiveCommentNode
      • useCommentsResolved
      • useCommentAddButton
      • useCommentItemContent
      • useCommentLeaf
      • useCommentsShowResolvedButton
      • useFloatingCommentsContentState
      • useFloatingCommentsState

    Types

    • Removed CommentUser
    • Moved TComment to UI registry – comment.tsx