From f44fb12272cc152f739d8980d523cee5dee552cd Mon Sep 17 00:00:00 2001 From: sickerine Date: Sat, 5 Dec 2026 22:52:28 +0000 Subject: [PATCH] fix(reports): say what check percentages, versions and a report row's icon mean From the DOI-destination walkers: a check's 99% read as progress or a grade, "Version 12" beside Agreement and Checks meant nothing, the live row's "Open in Publish" was shown while already in Publish, "Open" read as the public page, and a free voucher read "100% off the $10 a card pays". The percentage and the two versions now say what they are on hover or focus, the row's icon says what it opens ("See where it stands", "Manage its DOI, file and details"), and the voucher line reads "100% off $10". --- components/reports/publish-flow.tsx | 29 +++++++++++++++++++---------- messages/en-GB.json | 10 +++++++--- messages/en-US.json | 10 +++++++--- 3 files changed, 33 insertions(+), 16 deletions(-) diff --git a/components/reports/publish-flow.tsx b/components/reports/publish-flow.tsx index d010508cf..d5e66cc74 100644 --- a/components/reports/publish-flow.tsx +++ b/components/reports/publish-flow.tsx @@ -2448,9 +2448,12 @@ export function CheckRow({ name, result, advice = true, overruled = false }: { n - - {result.answer === "unclear" ? t("check.unclear") : t("check.sure", { percent: format.number(sure / 100, { style: "percent" }) })} - + {/* What the number is, on hover or focus: walkers read 99% as progress or a grade. */} + + + {result.answer === "unclear" ? t("check.unclear") : t("check.sure", { percent: format.number(sure / 100, { style: "percent" }) })} + + ) : result.evidence ? null : (

{inWords(result.detail)}

@@ -3490,12 +3493,12 @@ function ReportCover({ basics, report, slot }: { basics: Basics; report: Report }; }, []); // The report's facts, as rows of a label and its value, as the bill under them reads. - const facts: Array<{ id: string; label: string; value: ReactNode; href?: string }> = [ + const facts: Array<{ id: string; label: string; value: ReactNode; href?: string; /** What the value means, on hover or focus. */ why?: string }> = [ ...(live ? [{ id: "status", label: t("status"), value: {t("live")} }] : []), ...(landing && landingHost ? [{ id: "landing", label: tLead("leadsTo"), value: landing.place === "notice" ? tLead("leadsToAfter", { host: landingHost, seconds: NOTICE_SECONDS }) : landingHost, href: landing.url.trim() }] : []), ...(report?.pdf?.pages !== undefined ? [{ id: "pdf", label: t("steps.upload"), value: t("pages", { count: report.pdf.pages }) }] : []), - ...(report ? [{ id: "agreement", label: t("steps.agreement"), value: t("version", { version: report.agreementVersion }), href: `/publish/agreements/${report.key}` }] : []), - ...(report?.checksVersion ? [{ id: "checks", label: t("steps.checks"), value: t("version", { version: report.checksVersion }) }] : []), + ...(report ? [{ id: "agreement", label: t("steps.agreement"), value: t("version", { version: report.agreementVersion }), href: `/publish/agreements/${report.key}`, why: t("agreementVersionWhy") }] : []), + ...(report?.checksVersion ? [{ id: "checks", label: t("steps.checks"), value: t("version", { version: report.checksVersion }), why: t("checksVersionWhy") }] : []), // What was chosen when it was signed, kept in sight on the steps after, where the choices are locked. Live, the // screen shows both itself: who gets the file, and the archive's chip. ...(report && !live ? [{ id: "file", label: t("fileAccess.short"), value: report.fileAccess.mode === "embargo" ? t("fileAccess.until", { date: format.dateTime(new Date(`${report.fileAccess.until}T00:00:00Z`), { dateStyle: "medium", timeZone: "UTC" }) }) : t(`fileAccess.${report.fileAccess.mode}`) }] : []), @@ -3541,11 +3544,17 @@ function ReportCover({ basics, report, slot }: { basics: Basics; report: Report {/* The labels are a word each and keep it; a long value ("Embargoed until Nov 20, 2027") wraps instead. */}
{fact.label}
- {fact.href ? ( + {fact.why && !fact.href ? ( + + {fact.value} + + ) : fact.href ? ( // The agreement as signed, in a tab of its own to read, save or print. - - {fact.value} - + + + {fact.value} + + ) : ( fact.value )} diff --git a/messages/en-GB.json b/messages/en-GB.json index a5a2ba45c..a5b1c844a 100644 --- a/messages/en-GB.json +++ b/messages/en-GB.json @@ -6438,11 +6438,11 @@ "untitled": "Untitled report", "action": { "openPage": "Open its page", - "open": "Open", + "open": "See where it stands", "activate": "Pay", "carryOn": "Carry on", "seeFailed": "See what failed", - "manage": "Open in Publish" + "manage": "Manage its DOI, file and details" }, "seeChanges": "See your changes", "correct": "Correct the details", @@ -6920,6 +6920,8 @@ "saveFailed": "Your changes couldn't be saved", "agreementTitle": "Publishing agreement for {series}", "version": "Version {version}", + "agreementVersionWhy": "The wording of the agreement you signed. If the series changes its agreement later, yours stays this one.", + "checksVersionWhy": "The set of checks your report was checked with. Changes to the series' checks later never re-check it.", "agreementIntro": "{id, select, docid {You keep the copyright and choose the licence, which can't change once you sign. Signing reserves your DOCiD.} other {You keep the copyright and choose the licence, which can't change once you sign. Signing reserves your DOI.}}", "signedBy": "Signed by", "agree": "I agree to this agreement for the report's authors, who have all agreed. I am one of them, or they asked me to sign", @@ -7017,6 +7019,8 @@ "flagged": "Flagged", "unclear": "Unclear", "sure": "{percent}", + "sureWhy": "How sure the check is that your report passes. It passes at {need} or more, the line on the bar.", + "unclearWhy": "The check couldn't tell from your report whether it passes. A reviewer looks at it.", "foundIn": "Found in {where}", "foundAs": "Found as", "said": { @@ -7306,7 +7310,7 @@ "currency": "This workspace’s Stripe account is in {currency}, and reports are paid in US dollars, so a card can’t pay here until we change it.", "emailUs": "Email us", "saveCard": "Save a card", - "codeOff": "{off} off the {amount} a card pays", + "codeOff": "{off} off {amount}", "charged": "Charged to a card", "voucher": "Voucher" }, diff --git a/messages/en-US.json b/messages/en-US.json index 56be511d3..aa9e0e6dd 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -6438,11 +6438,11 @@ "untitled": "Untitled report", "action": { "openPage": "Open its page", - "open": "Open", + "open": "See where it stands", "activate": "Pay", "carryOn": "Carry on", "seeFailed": "See what failed", - "manage": "Open in Publish" + "manage": "Manage its DOI, file and details" }, "seeChanges": "See your changes", "correct": "Correct the details", @@ -6920,6 +6920,8 @@ "saveFailed": "Your changes couldn't be saved", "agreementTitle": "Publishing agreement for {series}", "version": "Version {version}", + "agreementVersionWhy": "The wording of the agreement you signed. If the series changes its agreement later, yours stays this one.", + "checksVersionWhy": "The set of checks your report was checked with. Changes to the series' checks later never re-check it.", "agreementIntro": "{id, select, docid {You keep the copyright and choose the license, which can't change once you sign. Signing reserves your DOCiD.} other {You keep the copyright and choose the license, which can't change once you sign. Signing reserves your DOI.}}", "signedBy": "Signed by", "agree": "I agree to this agreement for the report's authors, who have all agreed. I am one of them, or they asked me to sign", @@ -7017,6 +7019,8 @@ "flagged": "Flagged", "unclear": "Unclear", "sure": "{percent}", + "sureWhy": "How sure the check is that your report passes. It passes at {need} or more, the line on the bar.", + "unclearWhy": "The check couldn't tell from your report whether it passes. A reviewer looks at it.", "foundIn": "Found in {where}", "foundAs": "Found as", "said": { @@ -7306,7 +7310,7 @@ "currency": "This workspace’s Stripe account is in {currency}, and reports are paid in US dollars, so a card can’t pay here until we change it.", "emailUs": "Email us", "saveCard": "Save a card", - "codeOff": "{off} off the {amount} a card pays", + "codeOff": "{off} off {amount}", "charged": "Charged to a card", "voucher": "Voucher" },