From ba460f5b8b029e5dddc996d1e9e99cd0c2926da2 Mon Sep 17 00:00:00 2001 From: Marcos Paulo Date: Sat, 5 Sep 2026 07:10:02 +0000 Subject: [PATCH] feat(blocks): add ReviewDetail for review desk static panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Static markup-only component for the right-column review panel. Owns the parts that don't need their own interactivity: 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. Slots for 'vote', 'preview', and 'lens' let the page (task 16) compose the interactive siblings — VoteWidget, PreviewPane, ChangeLens — inside the static article. The role='group' / aria-pressed on the preview-version switcher carries state to assistive tech. Did not: include the interactive siblings inline (would couple the static and interactive markup); introduce client: directives (interactivity is task 16); add new tokens. --- src/components/blocks/ReviewDetail.astro | 261 +++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 src/components/blocks/ReviewDetail.astro 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}
  • )} +
+
+
+ + + + + +
+ +