Rebar UI

1.0

opinion

CommentThread

A discussion where replies nest under their parent. Try replying or liking.

Task discussionReply, like, collapse a branch
  • MC
    Maya Chen1d ago

    Homepage hero is in. The harbour photo crops badly on narrow screens, can someone check?

    • JW
      Jonas Weber1d ago

      On it. I'll switch it to the portrait crop under 600px.

  • PN
    Priya Nair1d ago

    The launch checklist now lists the crew sign-off as its own step.

Empty
No comments yet. Be the first.
Liked by you
  • PN
    Priya Nair1d ago

    The launch checklist now lists the crew sign-off as its own step.

In context

Task panelThe thread under a task's details
Harbour homepage
In progressDesign

Assigned to Maya Chen

  • PN
    Priya Nair1d ago

    The launch checklist now lists the crew sign-off as its own step.

Props

PropTypeRequiredDefault
commentsCommentThreadComment[]Yes—
onReply((parentId: string, body: string) => void) | undefinedNo—
onToggleLike((id: string) => void) | undefinedNo—
emptyLabelstring | undefinedNoNo comments yet
replyLabelstring | undefinedNoReply
classNamestring | undefinedNo—

Presentational, like ChatThread and FileUpload

Does no networking of its own — the caller owns appending a new reply to comments inside onReply, the same convention ChatThread's own messages prop and FileUpload (no upload) already use.

data-rebar-* attributes

data-rebar-component="comment-thread" on the root; parts: comment (carrying data-rebar-depth), text, timestamp, like, reply-toggle, collapse-toggle, replies.

Migrating to Ant Design

AntD's Comment component (deprecated in v5, moved to @ant-design/compatible) is the closest analog but has no built-in nesting/collapse of its own — not a 1:1 codemod target.