Skip to main content

Overview

  • Key improvements in this series:
    • 115+ primitive components for building custom comment dialogs
    • Each subcomponent can now be used independently without requiring the full dialog structure
    • Two usage patterns: ID-Based (Standalone) and Context Wrapper
    • Full control over comment dialog layout and styling

Breaking Changes

v5.0.0-beta.15

  • [Comments API] submitComment() method signature changed from accepting a plain string to a SubmitCommentRequest object.
    • Before: commentElement.submitComment('my-composer-id')
    • After: commentElement.submitComment({ targetComposerElementId: 'my-composer-id' })
  • [Comments API] target-element-id attribute on <velt-comment-dialog-composer> renamed to target-composer-element-id. React prop targetElementId renamed to targetComposerElementId.
    • This only affects standalone composer components (VeltCommentDialogComposer and VeltCommentComposer). Other components are not affected.
  • [Comments API] composerTextChange event payload expanded with new fields (annotation and targetComposerElementId). Existing handlers that destructure the event should still work, but type checks against the event shape should be updated.

v5.0.0-beta.1

  • [CSS Element Names] If you applied CSS to comment dialog element selectors, you need to update them to target the new element names.
    • Replace snippyly-comment-dialog with velt-comment-dialog-internal
    • Replace app-comment-dialog-* pattern with velt-comment-dialog-*-internal
    • For example: app-comment-dialog-composer becomes velt-comment-dialog-composer-internal
    • Important: Only element names need to be updated. Class names remain unchanged.

How to Upgrade

From v5.0.0-beta.14 to v5.0.0-beta.15

  1. Update all submitComment() calls to use the new object signature:
BeforeAfter
commentElement.submitComment('id')commentElement.submitComment({ targetComposerElementId: 'id' })
  1. Rename target-element-id to target-composer-element-id on all standalone composer instances:
FrameworkBeforeAfter
React<VeltCommentDialogComposer targetElementId="id" /><VeltCommentDialogComposer targetComposerElementId="id" />
HTML<velt-comment-dialog-composer target-element-id="id"><velt-comment-dialog-composer target-composer-element-id="id">
  1. Update any type checks against the ComposerTextChangeEvent shape to include the new fields:
FieldTypeDescription
textstringPlain text content (existing)
annotationCommentAnnotationFull draft annotation object (new)
targetComposerElementIdstringThe composer’s ID (new)
metadataVeltEventMetadataOptional metadata (existing)
  1. Deploy the latest version of the Velt SDK to your product.

From v4.x to v5.0.0-beta.1

  1. Search your CSS files for any element selectors using snippyly-comment-dialog or app-comment-dialog-* patterns.
  2. Update the element selectors using the following replacements:
Old Element NameNew Element Name
snippyly-comment-dialogvelt-comment-dialog-internal
app-comment-dialog-composervelt-comment-dialog-composer-internal
app-comment-dialog-headervelt-comment-dialog-header-internal
app-comment-dialog-bodyvelt-comment-dialog-body-internal
  1. Deploy the latest version of the Velt SDK to your product.
If you are only using class selectors (e.g., .comment-dialog-composer), no changes are required.