Skip to main content

decorationStore

MS Code Extension API


MS Code Extension API / features/explorer/store/decorationStore

features/explorer/store/decorationStore

Interfaces

FileDecoration

Defined in: features/explorer/store/decorationStore.ts:12

Metadata configuration schema representing visual decorations applied onto Tree Nodes.

  • Used extensively by File Trees and Explorer Custom Views to append status metrics (e.g., Git Modifications 'M', New Untracked files 'U', Linting/Syntax Errors '!', or warnings).

Properties

badge

badge: string

Defined in: features/explorer/store/decorationStore.ts:16

Short text badge displayed trailing or adjacent to the node label.

Example
'M' for Modified, 'U' for Untracked, '!' for Compilation Errors.
color

color: string

Defined in: features/explorer/store/decorationStore.ts:22

CSS-compliant color declaration token or design system CSS variable. Applied dynamically onto the node item's string label and badge foreground.

Example
'var(--ms-git-modified-color)' or '#f1c40f'
propagate?

optional propagate?: boolean

Defined in: features/explorer/store/decorationStore.ts:31

Hierarchical propagation control toggle. If flagged true, parent directories/containers wrapping this target node will bubble up and inherit ambient dot markers or partial tint overlays inside the Tree layout.

tooltip?

optional tooltip?: string

Defined in: features/explorer/store/decorationStore.ts:25

optional descriptive text string popped up whenever the cursor hovers atop the node row.

Variables

Explorer Subsystems

useDecorationStore

const useDecorationStore: UseBoundStore<StoreApi<DecorationStore>>

Defined in: features/explorer/store/decorationStore.ts:80

Reactive Zustand State Store managing diagnostic markers, syntax status, and Git indicator decorations layer overlays for Tree View environments.

  • Data Pipeline & Tree View Integration Flow

[Background Engine: Git/Linter] ──> Invokes setDecorations()


[useDecorationStore State]

(Triggers Reactive Subscription Notification)

[GenericTreeView / FileTree UI]
- Scans store via current item.id
- Paints target label green/red/yellow
- appends 'M' / 'U' trailing badge nodes