Design system / Organisms
Organism / Management and configuration
ProgramRubricEditor
ProgramRubricEditor assembles a controlled rubric from library copies, editable guidance, weights, ordering and optional images.
Intent and composition
The caller owns criteria through onChange and decides when to save. Adding a library item copies its definition and distributes weights; refresh replaces copied definition fields. Nested image upload and criterion creation remain separate operations. disabled removes mutation controls while retaining guidance inspection.
Coordinated concerns: Library selection, copied criterion fields, weights, ordering, refresh and supporting guidance/images.
Controlled criteria/onChange keep the draft with the caller. Nested ImageUploader and inline creation own their behavior; the parent decides when the rubric is saved.
Real component specimen
Actual rubric with a fictional criterion in its supported disabled state. Expand score guidance; uploads, library creation and draft edits remain unavailable.
Real component, fictional data. Product operations are not enabled.
Weights total 100 of 100.
Supported inputs and ownership
| Input | Responsibility |
|---|---|
| library / criteria / onChange | Available definitions, controlled copied criteria and draft updates. |
| tenantSlug / onCriterionCreated | Image/create context and optional new-library-item binding. |
| disabled / allowEmpty | Read-only behavior and whether a criteria-free round is valid. |
This is an integration summary, not a replacement for the implementation's complete prop types. A disabled control or hidden destination does not enforce permission.
Using it in a page
Integrate the section through its supported props and context requirements. Routes supply permitted data; instances bind product copy and behavior; templates arrange slots. Keep feature hooks and operations with their feature owner. Generic layouts must not load business data or enforce product policy.
Implementation
Repository path: src/components/evaluation-criteria/program-rubric-editor.tsx