diff --git a/src/components/blocks/SkillList.astro b/src/components/blocks/SkillList.astro new file mode 100644 index 0000000..1caacb6 --- /dev/null +++ b/src/components/blocks/SkillList.astro @@ -0,0 +1,151 @@ +--- +// SkillList — the catalog listbox of reviewed submissions. +// +// The 24 reviews are data, not 24 components. One list, one row template. +// Click handling and selection state are task 16's job; this component +// ships zero JS and just renders the rows from props. +// +// The id `#skill-list` and CSS class `active` are asserted by +// scripts/verify.mjs via the legacy stylesheet. They survive here so the +// verification engineer can re-point assertions at the new architecture +// without renaming anything. CSS hooks `grid-template-columns:minmax(0,1fr)`, +// `height:120px`, and `-webkit-line-clamp:2` are kept verbatim for the same +// reason — task 19 will diff against this baseline. + +interface SkillEntry { + /** Stable identifier used for selection and URL params. */ + id: string; + /** Display name of the submitter. */ + author: string; + /** Skill title — second row of the row template. */ + title: string; + /** Short status string ("reviewed", "draft", etc.). */ + status: string; + /** Pre-computed package summary (e.g. "1 skill · 2 refs · 1 script"). */ + summary: string; +} + +interface Props { + entries: SkillEntry[]; + /** Optional id of the currently-selected entry; the matching row gets + * `aria-selected="true"` and the `active` class. */ + selectedId?: string; +} + +const { entries, selectedId } = Astro.props; +--- + +