> ## Documentation Index
> Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# July 23 2024

## Versions

* Latest React SDK: [2.0.16](https://www.npmjs.com/package/@veltdev/react)
* Latest Non-React SDK: [2.0.16](https://www.npmjs.com/package/@veltdev/client)
* Latest Types: [2.0.16](https://www.npmjs.com/package/@veltdev/types)

## Added the Option to Add Manual Comment with Context

Within the comment element, we have introduced `addManualComment` method to add manual comment with context.

API Method:

> [tab] React / Next.js
>
> ```jsx theme={null}
> const commentElement = client.getCommentElement();
>
> const config: ManualCommentAnnotationConfig = {
> 	context: {}, // your context here
> };
> commentElement.addManualComment(config);
> ```

> [tab] Other Frameworks
>
> ```jsx theme={null}
> const commentElement = Velt.getCommentElement();
>
> const config: ManualCommentAnnotationConfig = {
> 	context: {}, // your context here
> };
> commentElement.addManualComment(config);
> ```

`ManualCommentAnnotationConfig` Class:

```jsx theme={null}
export class ManualCommentAnnotationConfig {
  context?: any;
}
```

## Added `onCommentClick` Callback

We have added `onCommentClick` callback in `velt-comment-thread` component.

> [tab] React / Next.js
>
> ```jsx theme={null}
> <velt-comment-thread annotation-id="COMMENT_ANNOTATION_ID"></velt-comment-thread>
> <script>
>     const commentThreadTag = document.querySelector("velt-comment-thread");
>     commentThreadTag.addEventListener('onCommentClick', (event) => {
>         console.log('onCommentClick', event.detail);
>     });
> </script>
> ```

> [tab] Other Frameworks
>
> ```jsx theme={null}
> <VeltCommentThread
>     annotationId="COMMENT_ANNOTATION_ID"
>     onCommentClick={(data) => handleOnCommentClick(data)}
> />
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.