VB Project Planning

<quality-target>

Polygon-as-UI quality prioritization surface. Click any axis to set its level + rationale; the centre readout tracks Critical spend against the project's capacity. Pairs with iron-triangle via data-bind-to.

Overview

The <quality-target> component is the planning surface's quality decision. The polygon IS the picker — each of the 11 ility axes is a clickable hit-target that opens a per-ility <dialog> with a level radio group (Critical / Important / Acceptable / Not relevant) plus a required rationale when Critical. The same SVG shows the chosen vector on three level rings, with a centre readout of Critical spend against the project's capacity, so picking and reading happen on the same surface.

Pair it with <iron-triangle> via data-bind-to and the capacity comes from the project shape. "Quality" is the word the surface uses; the older "NFR" jargon and its separate compass + radar pair collapse into this one component, two roles.

Per-axis editors

Click an axis (or focus it and press Enter / Space) to open its dialog. Each editor has a radio group for the four priority levels, a <form-field>-wrapped rationale textarea (required when Critical, ≥10 chars by default via data-min-rationale), and Cancel + Save buttons; the dialog uses method="dialog" so submit closes it. Save is refused with an inline message until a level is picked and, for Critical, the rationale is long enough. The marker and label colour follow the level: red Critical, amber Important, green Acceptable, muted Not relevant. The polygon is the closed shape across all picked axes; unpicked ilities don't pull the shape toward the centroid.

Capacity budget

Every ility has a cost when Critical. Only Critical picks spend capacity; Important, Acceptable, and Not relevant are free. The running total is criticalSum:

The centre of the radar shows criticalSum over the capacity ("5" above "of 4"), or "unbounded" when no capacity is known. Capacity resolves in this order: a bound <iron-triangle>'s capacityPoints, then data-capacity-points, then the capacityPoints property, then unbounded. There is no envelope polygon; the three level rings are the only backdrop.

Going over budget is allowed, but it is never silent:

  • the centre sum turns to the error colour and the vector stroke to the warning colour (:state(over-budget));
  • an "Over budget — explain why." panel appears below the radar with the exact overrun ("You're over budget by 1 point (5/4).") and a labelled Overrun rationale textarea (≥10 chars by default via data-min-overrun-rationale);
  • the element is invalid until that rationale is long enough, so a parent <form> won't submit (see Form association);
  • quality-target:over-budget and quality-target:under-budget fire once each time the selection crosses the capacity line.

Default ility list and cost weights

The 11 default ilities (cost dropped — that's <iron-triangle>'s job), with their default cost-when-Critical weights:

IlityWeightIlityWeight
performance5compatibility2
accessibility3scalability5
security5portability3
reliability4internationalization4
maintainability2privacy4
observability3

The weights sum to 40 — against a realistic budget of 10–15 that forces real trade-offs. Override with data-cost-weights='{"performance": 8, "scalability": 8}' or set the ilities property to a custom array.

Attributes

AttributeValuesDefaultDescription
namestringqualityForm-association field name
data-bind-tostring—ID of a sibling <iron-triangle> to read capacityPoints from
data-capacity-pointsnumber—Literal capacity fallback when no triangle is bound
data-cost-weightsstring—JSON object overriding default per-ility cost weights
data-radiusnumber100Base radius in SVG units
data-min-rationalenumber10Min characters for a Critical row's rationale
data-max-rationalenumber200Max characters for the rationale textarea
data-min-overrun-rationalenumber10Min characters for overrunRationale
data-max-overrun-rationalenumber400Max characters for overrunRationale
disabledboolean—No editing: axes leave the tab order, openEditor() is a no-op, dialog and footer controls are disabled; also bars the element from form validation
lockedboolean—Read-only mode for shipped vectors; same editing lock as disabled, but the value still submits and validates

Properties & methods

MemberTypeDescription
valueR objectSnapshot { vector, rationales, costWeights, capacityPoints, capacitySource, criticalSum, overrunRationale, ironTriangleHash }. capacityPoints is null when unbounded; capacitySource is 'formula' when bound to a formula-mode triangle, otherwise 'manual'. The same JSON is the form value.
vectorR/W Record<ility, level>Current picks. Setting merges into the existing picks; entries with an unknown level are ignored.
rationalesR/W Record<ility, string>Per-Critical rationales.
costWeightsREffective merged weights.
capacityPointsR/WResolved capacity (triangle > attribute > property > Infinity). Setting only fills the property slot of that order.
criticalSumRLive sum of Critical weights.
overBudgetR booleancriticalSum > capacityPoints.
overrunRationaleR/W stringRequired when over budget; mirrors the footer textarea.
ilitiesR/W string[]Override the default 11.
openEditor(ility)methodImperatively open one axis's dialog. No-op while disabled or locked.
checkValidity()methodValidate Critical rationales + the over-budget rationale; sets :state(missing-rationale) and fills the error message below the radar.

Events

EventDetailDescription
quality-target:change{ vector, rationales, costWeights, capacityPoints, criticalSum, overrunRationale, ironTriangleHash, source, field }Any pick or rationale changes
quality-target:over-budget{ delta, criticalSum, capacityPoints }The selection just crossed into over-budget
quality-target:under-budget{ slack, criticalSum, capacityPoints }The selection just returned within budget

States

StateWhen
:state(over-budget)criticalSum exceeds a finite capacity. The vector stroke turns to the warning colour and the overrun panel shows.
:state(missing-rationale)The last checkValidity() call failed. Reveals the error message below the radar.

CSS Tokens

TokenDefaultPurpose
--quality-target-max36remMax inline size of the host (the SVG scales to fit)
--quality-target-vector-fillcolor-mix(in oklab, var(--color-interactive) 22%, transparent)Vector polygon fill
--quality-target-vector-strokevar(--color-interactive)Vector polygon and spoke stroke
--quality-target-label-size0.625remAxis label font size
--quality-target-capacity-size1.25remCentre sum font size

Form association

The element is form-associated: inside a <form> it submits the value JSON under its name (default quality). Its validity is reported through ElementInternals, so the form's own checkValidity(), reportValidity(), and native submit are blocked while a Critical pick lacks its rationale or an over-budget selection lacks its overrun rationale. When the overrun rationale is the problem, the browser points at that textarea. disabled takes the element out of validation entirely; locked keeps it submitting and validating, but read-only.

Accessibility

  • Keyboard. Each axis is a focusable role="button" (tabindex="0") inside an SVG role="group"; Enter and Space activate exactly like a click. Each axis's aria-label starts with its visible name, then its level and cost (“Performance — critical · 5 pts. Activate to edit.”); the hover tooltip shows just the level and cost.
  • Editors. Each dialog is a native <dialog> (focus is trapped and returned by the browser, Escape closes it) with an aria-label naming the ility, a <fieldset>/<legend> radio group, and a labelled rationale textarea. Generated ids are unique per instance, so several targets on one page keep their labels straight.
  • Never colour-only. Priority levels are conveyed by the radio label text and each axis's accessible name, so the red/amber/green/muted coding is reinforcement rather than the only signal. Over budget surfaces as visible text with the exact overrun, plus a required, labelled rationale field, not just a colour change.
  • Disabled / locked. Mouse input is off, the axes leave the tab order and carry aria-disabled="true", openEditor() does nothing, and every dialog and footer control is disabled.

Related

  • <iron-triangle> — supplies capacityPoints; the target reads it via data-bind-to.
  • <capacity-plan> — reads criticalSum from the target and reconciles it against capacity plus slotted feature costs.
  • <requirement-card> — renders a single ility's row outside the target for status dashboards and ADR appendices.
↑