diff --git a/src/components/blocks/ReviewDetail.astro b/src/components/blocks/ReviewDetail.astro new file mode 100644 index 0000000..090537a --- /dev/null +++ b/src/components/blocks/ReviewDetail.astro @@ -0,0 +1,261 @@ +--- +// ReviewDetail — the static review panel for a single submission. +// +// The "detail" article on the review desk. Owns the parts that don't need +// interactivity of their own: the header (status, title, author, version +// switcher surface), the gold "THE JOB" purpose callout, the two-column +// review grid (what's working / highest-value improvements), and the blue +// "GOOD NEXT ADDITION" extras strip. +// +// The interactive siblings — VoteWidget, FileTabs, PreviewPane, ChangeLens +// — live as separate components and are composed by the page (task 16). +// This component is the static wrapper around them. + +interface SkillEntry { + id: string; + author: string; + title: string; + status: string; + /** One-sentence summary that fills the gold purpose panel. */ + focus: string; + /** "WHAT'S ALREADY WORKING" bullets. */ + wins: string[]; + /** "HIGHEST-VALUE IMPROVEMENTS" bullets. */ + improve: string[]; + /** "GOOD NEXT ADDITION" copy. */ + extras: string; +} + +interface Props { + entry: SkillEntry; + /** Which draft is currently being viewed. Drives the version switcher's + * initial state and the share-link copy. */ + preview: 'original' | 'improved'; +} + +const { entry, preview } = Astro.props; +const shareHref = `?author=${encodeURIComponent(entry.author)}&skill=${encodeURIComponent(entry.id)}&view=${preview}`; +const authorHref = `?author=${encodeURIComponent(entry.author)}`; +--- + +
+
+
+ {entry.status} +

{entry.title}

+

+ Submitted by {entry.author} ·{' '} + +

+
+
+ + +
+
+ +
+ THE JOB +

{entry.focus}

+
+ + + +
+
+ WHAT'S ALREADY WORKING +
    + {entry.wins.map((item) =>
  • {item}
  • )} +
+
+
+ HIGHEST-VALUE IMPROVEMENTS +
    + {entry.improve.map((item) =>
  • {item}
  • )} +
+
+
+ + + + + +
+ +