Interface CommentThread

Represents a list of comments one after the other. Usually this threads are conversations the users have in Penpot.

interface CommentThread {
    seqNumber: number;
    board?: Board;
    owner?: User;
    position: Point;
    resolved: boolean;
    findComments(): Promise<Comment[]>;
    reply(content: string): Promise<Comment>;
    remove(): void;
}

Properties

seqNumber: number

This is the number that is displayed on the workspace. Is an increasing sequence for each comment.

board?: Board

If the thread is attached to a board this will have that board reference.

owner?: User

Owner of the comment thread

position: Point

The position in absolute coordinates in the canvas.

resolved: boolean

Whether the thread has been marked as resolved or not.

Methods

  • List of comments ordered by creation date. Requires the comment:read o comment:write permission.

    Returns Promise<Comment[]>

  • Creates a new comment after the last one in the thread. The current user will be used as the creation user. Requires the comment:write permission.

    Parameters

    • content: string

    Returns Promise<Comment>

  • Removes the current comment thread. Only the user that created the thread can remove it. Requires the comment:write permission.

    Returns void