Skip to main content
VeltCommentDialog, VeltMultiThreadCommentDialog, VeltCommentText, VeltInlineCommentsSection, and VeltInlineReactionsSection are the comment-thread rendering surfaces: they render an annotation’s thread (and its composer) in a specific context. This file owns the layer above Props for these five: what every prop does at runtime, its default, and how it combines with the others, plus the default behaviors you get with no prop at all.
  • Anchored vs static (the key axis):
    • VeltCommentDialog is the anchored, Velt-positioned floating pin dialog: it renders one comment thread (one annotation) and Velt anchors it to its pin/overlay. It does not place itself: it only emits a reposition request on resize. See Behaviors → Positioning ownership.
    • VeltMultiThreadCommentDialog is the same anchored surface, but it hosts many comment threads (annotations) at one pin location: a list with per-thread filter/sort, mark-all-read/resolved bulk actions, a “new thread” button, and an empty placeholder. Single dialog = one thread; multi-thread dialog = a container of selectable threads at one anchor.
    • VeltInlineCommentsSection is statically placed / in-flow: it renders a thread list inside your own layout (a plain role="region" container), scoped to a targetElementId/folder/context: not a floating overlay. It actively suppresses the floating pin avatars on its target element (comments live in the section list instead).
    • VeltInlineReactionsSection is the reactions analogue: a statically-placed emoji/reaction bar bound to a target element.
    • VeltCommentText turns a piece of your own content into a clickable, comment-anchored hotspot: it projects your content and opens the bound annotation’s dialog (single or multi-thread) as a floating overlay on hover/selection.
  • Anchored-vs-static classification: see Component definitions.
  • Shared deep behaviors: the dialog’s collapse structure (collapsedComments × collapsedRepliesPreview), composer open/collapsed lifecycle, variant → context scoping, the dialog state machine, placeholder priority, and fullExpanded vs default all live in Behaviors. The per-prop rows below give what each prop does and link there for the full interaction/state-machine detail: they do not repeat the long explanations.

Per-prop behavior (exhaustive)

The exhaustive per-prop behavior for these five surfaces is organized per component below: each ## Velt… subsection carries that component’s full prop table (default + runtime behavior + interactions) and its own ### Default behaviors (no prop needed) block, the nested shape the template sanctions. Every prop in Props for these components is covered; see Provable coverage.

VeltCommentDialog

The single-thread, anchored pin dialog. It renders one annotation’s thread plus its composer, and selects one of three internal layout modes from mutually-exclusive predicates: dialog/inbox mode (the default floating-pin branch), sidebar mode (sidebarMode), and inline-section mode (inlineCommentSectionMode). The top-level render gate is the visibility condition AND the show-default condition.

Default behaviors (no prop needed)

  • Collapsed preview until selected: the dialog shows the first comment only until its pin is selected; selecting reveals all comments and (with default expandOnSelection) the composer. The composer is hidden until selection when the thread already has comments. Full collapse/preview structure (first + “N more replies” + last) lives in Behaviors → collapsedComments × collapsedRepliesPreview.
  • Composer opens collapsed: the composer renders collapsed (single line) and expands to full actions on focus/click, then collapses on submit: see Behaviors → Composer lifecycle / state machine.
  • Velt owns positioning: the dialog never places itself; it emits a reposition request when its size changes (composer expands, recording starts) and the host re-anchors. See Behaviors → Positioning ownership.
  • Selection / composer state is per dialog instance: the sidebar list, a focused thread, and a floating pin dialog for the same annotation do not leak selection/composer state into each other.

VeltMultiThreadCommentDialog

The many-threads-at-one-anchor dialog. It subscribes to all child comment-annotations under one multiThreadAnnotationId and renders them as a list with a comment-count, filter + sort dropdowns, mark-all-read / mark-all-resolved bulk actions, a “new thread” button, and an empty placeholder. Drilling into one child thread hides the top-level composer. State lives in a per-instance context config.

Default behaviors (no prop needed)

  • Many threads, one anchor: unlike VeltCommentDialog (one thread), this dialog holds an array of annotations under one pin and renders list-only affordances (count, filter, sort, bulk mark-all, new-thread, empty placeholder).
  • Composer hides on drill-in: selecting one child thread hides the top-level “new thread” composer.
  • Standalone state from the factory: mounted as a standalone primitive without a root, its state comes from the default multi-thread config factory (e.g. shadow-DOM on, dialogVariant: 'dialog', minimal-filter 'all'), not from these inputs.

VeltCommentText

A content hotspot, not a text renderer. It projects your own content (ng-content) and, on hover/selection, opens the bound annotation’s dialog as a floating overlay anchored to the element. Both inputs are mutually-exclusive alternatives: supply one. Almost all of its runtime state (hover, selection, mode flags) is internal, populated from services/pointer events, not author-settable props.

Default behaviors (no prop needed)

  • Renders projected content + overlay, not a comment string: the component shows whatever you wrap inside it plus a connected-overlay dialog: it does not itself render “the latest comment text.” If you need the raw comment body as text, that is a Data-layer read (see Data models), not this component.
  • Pointer-driven open: pointerover / pointerout toggle hover; pointerup toggles pin selection, which surfaces the dialog overlay.

VeltInlineCommentsSection

A statically-placed, in-flow thread list scoped to a target element / folder / context. It renders a plain role="region" container (no portal, no pin anchor) and suppresses the floating pin avatars on its target (it sets data-velt-comment-disabled on the target and hides any pin portals the global system creates, restoring them on destroy). The section renders only when one of its gating values (targetElementId / folderId / context) is present.

Default behaviors (no prop needed)

  • In-flow, not anchored: the section renders inside your layout where you place it; it does not float and does not place itself.
  • Pin suppression on the target: to avoid double UI, it disables and hides the global floating pin avatars on its target element (restoring them when unmounted): comments appear in the section list instead.
  • Multi-thread by default: unlike the dialog, the section defaults to showing multiple threads (multiThread default true).

VeltInlineReactionsSection

A statically-placed reactions/emoji bar bound to a target element. On init it fetches existing reaction annotations for the target’s section id and renders them; users add via the emoji picker or by clicking an existing reaction pill, all scoped to the target. It renders only when both targetReactionElementId and a logged-in user are present.

Default behaviors (no prop needed)

  • Gated on target + user: renders only when both targetReactionElementId and a logged-in user exist.
  • Reads existing reactions: on mount it loads the target section’s existing reaction annotations and shows them as pills; clicking a pill or picking an emoji adds/updates the user’s reaction scoped to the target.
  • Default emoji set: with no customReactions, the picker offers Velt’s default reaction set (service default {} → built-in set).

Default behaviors (no prop needed)

Each surface’s zero-prop baseline is documented in its ### Default behaviors (no prop needed) block above. In brief:
  • VeltCommentDialog: collapsed first-comment preview until the pin is selected; composer hidden until selection (on a thread that already has comments) and opens collapsed; Velt owns positioning; selection/composer state is per instance.
  • VeltMultiThreadCommentDialog: holds many threads at one anchor with list-only affordances (count, filter, sort, bulk mark-all, new-thread, empty placeholder); the top-level composer hides on drill-in; standalone state comes from the multi-thread config factory.
  • VeltCommentText: renders your projected content plus a connected overlay dialog (not a comment string); pointer events drive hover/selection.
  • VeltInlineCommentsSection: in-flow (not anchored); suppresses the floating pin avatars on its target; multi-thread by default.
  • VeltInlineReactionsSection: renders only when both a target id and a logged-in user exist; loads existing reactions; offers Velt’s default emoji set with no customReactions.

Prop-interaction matrix

Pairwise interactions are documented in each prop’s Interactions & gotchas column above. The cross-cutting, multi-prop matrices that span these surfaces: the collapsedComments × collapsedRepliesPreview collapse structure, the composer open/collapsed lifecycle, sortBy × sortOrder, shadowDom vs dialogShadowDom, the placeholder-priority chain, fullExpanded vs default, and variant → context scoping: live in the behaviors index and are linked from the rows above rather than duplicated here.

Positioning & composition

VeltCommentDialog and VeltMultiThreadCommentDialog are anchored / Velt-positioned: they anchor to their pin/overlay and emit a reposition request on resize; they take no coordinate input (targetElementId is an event filter, not a position). VeltInlineCommentsSection, VeltInlineReactionsSection, and VeltCommentText’s host are statically placed: they render in your own layout flow where you mount them (VeltCommentText then opens an anchored overlay on selection). See Behaviors → Positioning ownership and the anchored-vs-static classification in Component definitions.

Provable coverage

Counted against Props ### VeltCommentDialog / ### VeltMultiThreadCommentDialog / ### VeltCommentText / ### VeltInlineCommentsSection / ### VeltInlineReactionsSection:
  • VeltCommentDialog: 44/44: annotationId, multiThreadAnnotationId, defaultCondition, inlineCommentSectionMode, commentPinSelected, fullExpanded, shadowDom, darkMode, readOnly, sidebarMode, isFocusedThreadEnabled, openAnnotationInFocusMode, expandOnSelection, inlineCommentMode, inboxMode, isInsidePdfViewer, multiThread, commentComposerMode, dialogSelection, dialogMode, focusedThreadMode, pageModeComposer, messageTruncation, initialEditCommentIndex, messageTruncationLines, variant, composerPosition, sortBy, sortOrder, commentPinType, containerComponentId, targetElementId, targetComposerElementId, locationVersion, locationDisplayName, context, placeholder, commentPlaceholder, replyPlaceholder, editPlaceholder, editCommentPlaceholder, editReplyPlaceholder, anonymousEmail. (props.md lists 43 rows; “~44” estimate matched: every row covered.)
  • VeltMultiThreadCommentDialog: 14/14: annotationId, multiThreadAnnotationId, annotation, user, commentPinSelected, commentPinType, dialogVariant, variant, inboxMode, containerComponentId, context, readOnly, defaultCondition, onSaveComment. (props.md lists 14 rows; “~15” estimate: every row covered.)
  • VeltCommentText: 2/2: annotationId, multiThreadAnnotationId. (props.md lists 2 rows; the component has exactly two @Inputs in source, so the list is complete: the “~3” estimate counted the prose line.)
  • VeltInlineCommentsSection: 32/32: config, targetInlineCommentElementId, targetCommentElementId, targetElementId, darkMode, variant, dialogVariant, composerVariant, shadowDom, multiThread, sortData, composerPosition, sortBy, sortOrder, fullExpanded, context, contextOptions, locationId, documentId, folderId, commentPlaceholder, replyPlaceholder, composerPlaceholder, editPlaceholder, editCommentPlaceholder, editReplyPlaceholder, readOnly, anonymousEmail, messageTruncation, messageTruncationLines, defaultCondition: plus the two deprecated aliases counted inline. Every row covered.
  • VeltInlineReactionsSection: 5/5: targetReactionElementId, darkMode, variant, shadowDom, customReactions. Every row covered.
Coverage limits documented inline: VeltCommentDialog: dialogMode as a live wire-through, openAnnotationInFocusMode / dialogSelection downstream surfaces, locationDisplayName being read anywhere, the precedence among the three edit placeholders. VeltMultiThreadCommentDialog: commentPinSelected / commentPinType / dialogVariant visual effects, user consumer, onSaveComment as output vs config callback. VeltCommentText: the public toggle name for showing resolved/terminal annotations. VeltInlineCommentsSection: dialogVariant / composerVariant / composerPosition rendering effects, single-vs-multi-thread rendering, commentPlaceholder vs composerPlaceholder precedence, the edit-placeholder precedence, sortData alias intent. VeltInlineReactionsSection: no per-instance customReactions scoping is documented. No prop is skipped.