Skip to main content
Runtime behavior of every prop on the three sidebar entry points. Props gives each prop’s name, type, and default; this file gives what each prop does at runtime, its default behavior when omitted, and how it interacts with related props. See the behaviors index for the dialog/composer state machine and the cross-component prop matrix. Three components are covered:
  • VeltCommentsSidebar (V1): the original sidebar. Filtering is driven by a filterConfig (which system filter dimensions appear) plus a filters object (active selections) plus a fixed “minimal filter” quick-filter dropdown. Layout: overlay (default), embedMode, or floatingMode.
  • VeltCommentsSidebarV2: the newer, filter-capable sidebar. Filtering is descriptor-driven: you declare filters / miniFilters / minimalFilters as FilterField[] arrays and the sidebar builds the filter UI from them. Adds virtual-scroll tuning (measuredSize/minBufferPx/maxBufferPx), filterOperator, and onFullscreenClick. See V1-vs-V2 differences.
  • VeltSidebarButton: the launcher button. It renders a comment-count badge and toggles a sidebar; in floatingMode it owns the opened sidebar and the click-outside-to-close behavior. Most of its non-button props are pass-throughs forwarded to the sidebar it opens.
All three resolve darkMode through the shared theme system, render their default markup unless a matching wireframe variant is registered, and (for V1/V2) restore their last filter/sort state from per-browser-session storage, which overrides defaultMinimalFilter.

Per-prop behavior (exhaustive)

The exhaustive per-prop behavior for the three sidebar entry points is organized per component below: each ## Velt… subsection carries that component’s full prop table (default + runtime behavior + interactions) plus its own no-prop baseline (the Default behaviors (… no prop needed) block); the V1-vs-V2 behavioral differences table at the end captures where the two sidebars diverge. Every prop in Props for these components is covered; see Coverage.

VeltCommentsSidebar (V1)

Default behaviors (V1, no prop needed):
  • Layout: with no embedMode/floatingMode, the sidebar is a Velt-positioned overlay anchored right and is force-closed (forceClose: true) until opened.
  • Filter restored from saved state: on open the sidebar reads its last-used filters and group-by from per-browser-session storage and re-applies them. This overrides both the filters prop and defaultMinimalFilter. There is a one-time legacy reset of page filters. To make defaultMinimalFilter deterministic, no saved filter must exist (first session).
  • Default filter panel: filterConfig ships with Pages, Author, Assigned, Tagged, Involved, Priority, Category, Comment Type, and Versions on; Documents and Status off.
  • Default sort: newest-first by last-updated (sortData unset, no sortBy/sortOrder).
  • Default minimal filter: 'all' (everything except resolved).
  • Selection: dialogs are selectable (dialogSelection: true) and expand on selection (expandOnSelection: true).
  • Read-only: off locally; falls back to global read-only if not explicitly set.
  • filterCount on; filterOptionLayout 'checkbox'; filterPanelLayout 'bottomSheet'; systemFiltersOperator 'and'.

VeltCommentsSidebarV2

V2 is the newer, filter-capable sidebar. Filtering is descriptor-driven (FilterField[] arrays) rather than the V1 filterConfig enable-map. Many feature toggles forward to the same comment-service flags as V1, so cross-component effects match. Default behaviors (V2, no prop needed):
  • Filtering is descriptor-driven: with no filters/miniFilters/minimalFilters, the header shows a single default mini-filter (Status). Declaring minimalFilters replaces that default with your header dropdowns; declaring filters as an array builds the main filter panel.
  • Filter/sort restored from session: like V1, V2 persists filter+sort state to per-browser-session storage and restores it over defaultMinimalFilter (precedence input > sessionStorage > default).
  • filterOptionLayout defaults to 'dropdown' (V1 defaults to 'checkbox').
  • shadowDom defaults false (V1 unset ≈ inherit-on).
  • Default sort: last-updated descending (effective) when sortBy/sortOrder unset.
  • Virtual scroll: measuredSize 220, minBufferPx 1000, maxBufferPx 2000.
  • defaultCondition true: the sidebar respects its normal visibility gate; selectable + expand-on-selection on.

VeltSidebarButton

The launcher button. It renders a comment-count badge and toggles a sidebar. In floatingMode it owns the opened (floating) sidebar and the click-outside-to-close behavior; otherwise it toggles the page’s sidebar. The *Variant / filter* / position / pageMode props are pass-throughs forwarded to the sidebar it opens. Default behaviors (VeltSidebarButton, no prop needed):
  • Always visible: the button root always renders (shouldShow is true); it shows a default button unless a custom button child or wireframe variant is supplied.
  • Toggles the page sidebar: with floatingMode off, clicking toggles the page-level sidebar; with it on, the button owns a floating sidebar and closes it on outside-click.
  • Count: commentCountType 'total' (all comments with content; terminal/resolved excluded unless resolved-on-DOM); sidebarButtonCountType from service default (total). 'unread' recomputes from the unread map.
  • Shadow DOM: the opened sidebar is shadow-isolated by default (sidebarShadowDom: true).
  • Shared context: the button uses the shared 'default' context so standalone velt-sidebar-button-* count/icon primitives on the page read its fetched data; it does not clear that context on destroy.

Default behaviors (no prop needed)

Each component’s zero-prop baseline is documented in its Default behaviors (… no prop needed) block above. In brief:
  • V1: a Velt-positioned overlay anchored right, force-closed until opened, restoring its last filters/group-by from session storage (which overrides filters and defaultMinimalFilter); default minimal filter 'all'; newest-first-by-last-updated sort; filterOptionLayout: 'checkbox'.
  • V2: the same overlay/embed/floating model but descriptor-driven (a single Status mini-filter with no filters/miniFilters/minimalFilters); filterOptionLayout: 'dropdown'; shadowDom false; virtual-scroll defaults measuredSize 220 / minBufferPx 1000 / maxBufferPx 2000.
  • VeltSidebarButton: always renders, toggles the page sidebar (or owns a floating one with click-outside-to-close); badge commentCountType: 'total'; opened sidebar shadow-isolated.

Prop-interaction matrix

The pairwise prop interactions are documented in each prop’s Interactions & gotchas column above; the cross-version differences are tabulated in V1-vs-V2 behavioral differences below. The interactions worth restating:
  • Session-restored filter/sort state overrides both the filters prop and defaultMinimalFilter.
  • Sort precedence: sortData first, then sortBy + sortOrder re-sort on top. Setting either sortData or sortOrder disables the in-sidebar sort dropdown.
  • embedMode dominates floatingMode/position/forceClose when both are set.
  • readOnly is localReadOnly OR globalReadOnly; expandOnSelection pairs with dialogSelection.
  • Deprecated aliases fire/write alongside their replacements: enableUrlNavigationurlNavigation, openSidebaronSidebarOpen, onSidebarCommentClickonCommentClick.

Positioning & composition

All three are statically placed: the sidebar is not anchored to a pin: it docks to the viewport left/right as an overlay by default, renders inline in your layout under embedMode, or floats over content under floatingMode; VeltSidebarButton renders where you mount it and owns the floating sidebar in floatingMode. This is the statically-placed column of the anchored-vs-static axis: see Component definitions and Behaviors → Positioning ownership.

V1-vs-V2 behavioral differences


Coverage

  • VeltCommentsSidebar (V1): 51 / 51 props covered.
  • VeltCommentsSidebarV2: 58 / 58 props covered.
  • VeltSidebarButton: 25 / 25 props covered.
Every behavior above is covered in this reference.