Docs Components
DualValueDiffFieldexperimental
The heart of the tagger. The left well holds what was imported — read-only, slightly sunken. The right well is the editorial set — raised, and yours to shape. Diverge from the import and the field says so with an Override marker; go past the slot cap and it calmly asks you to trim. Nothing ever changes silently.
States
in-sync— Editorial equals imported (set comparison, order-insensitive). Plain raised well; no badge.override— Sets diverge: caution Badge in the header, editorial well tints caution, Reset appears.well: color-status-caution-wash @ 55% into bg-raisededge: color-status-caution-edgeempty-editorial— States the consequence in place: 'Empty — viewers see nothing for this facet.'at-capacity— Add select disables when the slot count (label shows n/capacity) is full.over-capacity— Editorial count exceeds the slot cap (possible when imported adoption brings more values than slots). The count and a caution flag replace the Complete mark, and a note states how many to remove — a legit trim-me state, never presented as an error.
API
| Prop | Type | Description |
|---|---|---|
label required | string | Facet name (Genres, Themes, Moods). |
imported required | string[] | Source-of-record values; rendered as plain chips, never editable. |
editorial / onEditorialChange required | string[] / function | Controlled editorial set; chips are removable. |
options required | string[] | Taxonomy vocabulary for the add select — free-text tags don't exist. |
capacity | number | Editorial slot limit, shown as n/capacity. |
completenessTarget | number | Values needed for full completeness credit (≤ capacity). The Complete mark waits for the target; below it, the head shows 'n of target toward completeness' so the path to 100% is visible at the point of editing. |
Guidelines
- mustImported values are never editable and never hidden — curators must always see what the pipeline said.
- mustOverride is computed by set comparison, badged, and reversible in one action.
- mustValues come from the taxonomy vocabulary only; deprecated values surface with the Chip deprecated treatment.
- mustOver-capacity is caution, not danger: the add select stays disabled, existing values stay removable, and Save is never blocked — the state explains itself instead of trapping the curator.
- mustComplete means the completeness target is met, not merely non-empty — a facet with 1 of 2 values shows its partial progress, never a premature checkmark.