textMode
a Comment Tool button will appear. Clicking the button will add a comment on the highlighted text.
If you want to trigger the comment using an API method call instead of clicking the button, you can do the following:
addCommentOnElement()
method and pass in an object with the schema shows in the example:
deleteSelectedComment()
method.
setDocuments
method.CommentAnnotations
with at least 1 unread Comment by Location Id.documents
and locations
.CommentAnnotation[]
.documentId
.documentId
, it will return the comment annotation for the given documentId
.Comments
on the current Document
by using the useUnreadCommentCountOnCurrentDocument()
hook:Comments
by Location Id
by using the useUnreadCommentCountByLocationId()
hook:Comments
by annotation id by using the useUnreadCommentCountByAnnotationId()
hook:AutocompleteSearchEvent
Enable the feature
Set initial list
Handle search event
Default: true
updateContactList
API.isOrganizationContact
, isDocumentContact
and documentAccessType
.{merge:true}
.all
: Show all the contactsorganization
: Show organization contacts.organizationUserGroup
: Show organization user groups.document
: Show document contacts.event.addContext()
method when a comment is added. This method accepts an object with key-value pairs.
updateContext
method.commentElement.updateContext()
method accepts three parameters:
updateContextConfig
object. Specify how the new metadata should be applied:
{ merge: true }
: Merges the new metadata with the existing metadata{ merge: false }
or omitted: Replaces the existing metadata entirely (default behavior)hotkeys
are pressed.
When you press a hotkey inside the Comment Dialog composer, it will open a dropdown list of items that you can select.
#
or /
hotkey
is pressed. Eg: When the user presses #
, the list of files or links from other parts of your app is shown.AutocompleteSearchEvent
Enable the feature
Set initial list
Handle search event
Category | Event Type | Description | Event Object |
---|---|---|---|
Threads | addCommentAnnotation | Add a new comment annotation | AddCommentAnnotationEvent |
Threads | deleteCommentAnnotation | Delete a comment annotation | DeleteCommentAnnotationEvent |
Messages | addComment | Add a new comment | AddCommentEvent |
Messages | updateComment | Update an existing comment | UpdateCommentEvent |
Messages | deleteComment | Delete a comment | DeleteCommentEvent |
@Mentions | assignUser | Assign a user to a comment | AssignUserEvent |
@Mentions | subscribeCommentAnnotation | Subscribe to a comment annotation | SubscribeCommentAnnotationEvent |
@Mentions | unsubscribeCommentAnnotation | Unsubscribe from a comment annotation | UnsubscribeCommentAnnotationEvent |
@Mentions | autocompleteSearch | When user starts searching for a contact in the @mentions dropdown or for a list item in the custom list dropdown | AutocompleteSearchEvent |
Attachments | addAttachment | Add an attachment to a comment | AddAttachmentEvent |
Attachments | deleteAttachment | Delete an attachment from a comment | DeleteAttachmentEvent |
Reactions | addReaction | Add a reaction to a comment | AddReactionEvent |
Reactions | deleteReaction | Delete a reaction from a comment | DeleteReactionEvent |
Reactions | toggleReaction | Toggle a reaction on a comment | ToggleReactionEvent |
Status & Priority | updateStatus | Update the status of a comment | UpdateStatusEvent |
Status & Priority | resolveComment | Resolve a comment | ResolveCommentEvent |
Status & Priority | updatePriority | Update the priority of a comment | UpdatePriorityEvent |
Status & Priority | approveCommentAnnotation | Approve a comment annotation | ApproveCommentAnnotationEvent |
Status & Priority | acceptCommentAnnotation | Accept a comment annotation | AcceptCommentAnnotationEvent |
Status & Priority | rejectCommentAnnotation | Reject a comment annotation | RejectCommentAnnotationEvent |
Recordings | deleteRecording | Delete a recording from a comment | DeleteRecordingEvent |
Deep Links | copyLink | Copy a deep link to a comment | CopyLinkEvent |
Access | updateAccess | Update access settings for a comment | UpdateAccessEvent |
Comment Sidebar | commentSidebarDataInit | Triggered when comment sidebar data is first loaded | CommentSidebarDataInitEvent |
Comment Sidebar | commentSidebarDataUpdate | Triggered when comment sidebar data is updated | CommentSidebarDataUpdateEvent |
UI | composerClicked | Triggered when comment composer is clicked | ComposerClickedEvent |
Recorder | transcriptionDone | Triggered when a transcription is generated and ready | TranscriptionDoneEvent |
true
When this is on, users can attach image files to their comments. Users can download or delete an attachment. Users can attach multiple files at once.
Currently we support .png
, .jpg
, .gif
(static & animated), .svg
file types up to 15MB per file.
true
url
or emoji
field to represent the reaction icon you want to use.Default: true
When this is on, users can assign a status to each comment & filter comment by status in the sidebar. You can customize the list of status options as shown below on this page.
default
: This will be the default status assigned to each comment.ongoing
: This is treated as an intermediary status, you can add as many statuses with type ongoing as you want.terminal
: This represents a status that is completed. Comments with this status type are no longer shown in the DOM.Default: true
This adds a tick mark button on the top right corner of the comment dialog. Clicking on this button will mark the comment as resolved.
Default: false
When this is on, users can assign a priority to each comment & filter comment by priority in the sidebar. You can customize the list of priority options as shown later on this page in the Set Custom Priorities section.
customPriority
prop.Default priorities: P0, P1, P2
With custom priorities, you can replace the default priorities with your own values. These priorities are also used in the comment sidebar to filter comments by priority.This will work if you have enabled the priority feature.The color
property is used to set the priority pill background color.The lightColor
property sets the background color of the filter.audio
, screen
, video
, all
).
audio
: enables audio recordingscreen
: enables screen recordingvideo
: enables video recordingall
: enables all recording optionsnone
: disables all recording options"audio"
true
enabled
useCommentSelectionChangeHandler
hook can be used to subscribe to Comment selection changes.Comment
when it is clicked.
Default: true
By default, users will be redirected to a Comment
if the comment id is provided in the url. But sometimes this experience is annoying, so we have provided a way to disable the option to automatically scroll users to the location of the Comment
.
scrollToComment
to false
.Popover
mode.
data-velt-comment-disabled
attribute to elements where you want to disable commenting.
sourceId
attribute to control which element displays the comment dialog when adding a new comment.sourceId
. It just needs to be unique for each element in the current session.Default: false
We use AI to analyze your comment content and auto-categorize it so users can filter comments easily. You can provide a list of custom categories that we should use to categorize the comments (shown below).
customCategory
prop.Default categories: Question, Feedback, Bug, Other.
With custom categories, you can replace the default categories with your own values.These categories are used in the Comments Sidebar
to filter comments by category. The AI autoCategorize
feature uses the list of categories to determine the closest category to choose from.The input format to the customCategory
prop should be an array of objects with an id
, name
, and color
.The color
property is used to set the category pill background color.Composer
in the Comments Dialog
only shows the text input box and does not show the actions bar until the Composer
is clicked on or the user starts typing.
You can modify this behavior by setting the Composer Mode
prop to "expanded"
. This will make the actions bar always visible.
To keep the default behavior you can set the property to "default"
.
Default: "default"
false
true
true
Default: false
Default: false
true
Default: false
This allows anonymous or signed out users to still read the comments but encourages them to sign in if they want to respond to the comments.
Default: true
By Default, each Comment Dialog has a button at the bottom that will open the Comments Sidebar when clicked.
To disable it, you can set it to false:
Default: false
Default: true
Default: true
Default: true
Default: false
onSignIn
event that you can handle with your own sign in method.
No data is passed with the event.
replyAvatars
: Whether the reply avatar component is enabled.maxReplyAvatars
: The maximum number of reply avatars to show. It will show the count of remaining unque users as the next avatar.Default: false
Default: true
By default, all the comments will be visible on DOM whenever we are able to detect to elements for that. But users can hide it from DOM if required.
There are 2 ways to show/hide comments on DOM:
Configuring attributes on the React Component:
Default: false
Default: false
This appears in the comment sidebar and on the comment pins. When this is on, we show a small icon indicating the comment index in the order of creation date. This enables users to find and navigate to the desired comment quickly.
Default: false
When this is on, we show additional information in the Comment Thread
indicating which device the comment was created on. This is useful especially for design tools, where additional context is needed for debugging issues.
Comment Pins
is enabled.
Default: false
When this is on, we show a small device type icon on the Comment Pin
indicating which device the comment was created on. This is useful especially for design tools, where additional context is needed for debugging issues.
Default: false
Ghost comments are comments that were once linked to certain content on the DOM but that content is no longer available. If this is on, we display ghost comments in gray, close to where they were originally positioned on the DOM.
Default: true
Ghost comments are always shown in the comments sidebar so that users can see the history of all comments. If this is on, we show a label on the comment in the sidebar indicating that the original content on which this comment was added is no longer available. This sets better expectations with the users.
data-velt-iframe-container="true"
to the iframe’s container element.data-velt-pdf-viewer="true"
attribute in the container element of the pdf viewer.
false
c
to enable comment mode
.
Default: false
enter
will add a new line and pressing shift
+ enter
will submit a comment.enter
will submit a comment by setting the enterKeyToSubmit
property to true
.enabled
Default: false
By default, when a user adds a comment it is visible to all authenticated users on the same document
. Moderator mode makes visibility of all comments private to only admin
users and the comment author. Admin users will see an approve button on the comment dialog. Once approved the comment will be visible to all users who can access the document
.
You can set some users as admin
by setting the isAdmin
property in the User object, during the identify()
call.
Default: false
suggestionMode
attribute to true
.false
privateCommentMode
attribute to true
:false
true
verbose
mode is enabled for unread Comments
.
Default: 'minimal'
Unread Comments
can be in minimal
mode or verbose
mode.
In minimal
mode, a small red dot indicator appears for unread Comments
.
In verbose
mode, a larger badge with the text “UNREAD” will appear for unread Comments
.
true
false
false
true
false
multiThread
prop to true
.false
context
to the Velt Comment Tool
component to associate custom metadata with comments created using that tool.Velt Comment Tool
in each cell.context
prop accepts an object with key-value pairs.useCommentModeState()
hook can be used to get the Comment mode without having to subscribe to changes. When the Comment mode changes, the hook return value will update.The subscription is automatically unsubscribed when the component dismounts.Default: true
When the Comment Tool is disabled, it can not be used to leave comments. Other ways to leave comments, such as highlighting text, will also be disabled.
Default: false
false
left
or right
. By default, it’s positioned on the right side of the screen.sortBy
: The field to sort by. Currently supports createdAt
and lastUpdated
. Default: lastUpdated
for multithread and createdAt
for single thread.sortOrder
: The order to sort by. It can be asc
or desc
. Default: desc
for multithread and asc
for single thread.multiThread
prop to false
.true
top
or bottom
.bottom
Default: true
Default: true
annotationId
in the current document.context
object to filter which comment annotations to show the comment bubble for.context
in the current document.popover
mode comments.partialMatch: true
for flexible matching).{ day: "01", week: "01", month: "jan", product: "cheese", location: "zurich" }
{ day: "01", product: "cheese" }
→ ✅ matches (both fields exist in comment){ day: "01", category: "dairy" }
→ ❌ no match (category doesn’t exist in comment){ day: "01", week: "01", month: "jan", product: "cheese" }
{ day: "01", week: "01", month: "jan", product: "cheese" }
→ matches (full){ week: "01", month: "jan", product: "cheese" }
→ matches (partial){ day: "01", week: "01", month: "jan", product: "cheese", location: "zurich" }
→ no matchtotal
: Shows the total number of replies. (default)unread
: Shows the number of unread replies.context
or targetElementId
.
Default: false
0
Default: 'false'
Default: 'true'
Field Name | Type | Description |
---|---|---|
addContext | Function | Use this to set custom data on the comment |
annotation | CommentAnnotation | The annotation that is associated with the comment that was updated |
documentId | string | The document ID where the comment was added |
location | Object | The location where the comment was added |
targetAnnotationId | string | The id of the target annotation |
Field Name | Type | Description |
---|---|---|
annotation | CommentAnnotation | The annotation that is associated with the comment that was updated |
type | string | The type of comment that was updated |
targetAnnotationId | string | The ID of the target annotation that contains the comment that was updated |
targetCommentId | number | The ID of the target comment that was updated |
updateContext | Function | Use this to update the custom metadata on the comment annotation. |
documentId
and location
.documentId
: string; it will return all comments in the given documentId
.location
: Object; it will return all comments in the given location
.