Tidy the admin editor's text: previews, blank options, no em-dashes

Your wording pass on adminSchema.ts and fields.tsx: "Default: ..."
blank options, "eg." examples, "URL ID" for slugs, and relabelled
front page sections, stat sources and hero fields.

On top of it:

- Content block row titles end with an ellipsis when the paragraph
  is cut. preview() in src/lib/text.ts does it for anything that
  shortens text: it collapses whitespace, cuts on a word and adds
  "..." only when it actually shortened.
- No em-dashes in the editor, front end or server: placeholders
  ("Internal note: ..."), the Organizations blurb, the URL ID help,
  empty table cells (now "-"), the Award dropdown ("Torch Award
  (NGU)" in OPTION_QUERIES), a boot error message, and every comment
  in the admin files. Also cleared from the files added this branch
  (QR page, directory route, embeds, hero, migration 024), and the
  QR page's team labels read "Board (NGU)".
- A few comments where removing the dash had run two sentences
  together get a comma, colon or parentheses back.
- docs/updating-data-in-code.md matches the new labels and gains a
  "Writing text in the editor" section with these conventions;
  CLAUDE.md lists them under Rules and gotchas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-26 19:38:24 -05:00
parent e35d09b172
commit 54bf649b8d
31 changed files with 239 additions and 187 deletions

View file

@ -1,5 +1,5 @@
/* ═══════════════════════════════════════════════════════════════
ADMIN — FEEDBACK TRIAGE
ADMIN: FEEDBACK TRIAGE
Reads /api/admin/feedback, writes status and notes back through
PATCH, and deletes through DELETE. Deliberately a flat list
@ -9,7 +9,7 @@
Two capabilities, two ranks. Editors and above can change a
status or leave a note; deleting is admin and above, matching
requireRole on the server. Both come from the roles ladder
rather than an equality check — a superadmin is not role ===
rather than an equality check: a superadmin is not role ===
"admin", and reading it that way is what hid these controls.
Every read passes ttl: 0. The api cache exists for public
@ -156,7 +156,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
rows={2}
value={note}
disabled={busy}
placeholder="Internal note — who's handling it, what was done"
placeholder="Internal note: who's handling it, what was done"
onChange={(e) => setNote(e.target.value)}
className="mt-3 w-full resize-y rounded-lg border border-[#4a6b72]/25 bg-white px-3 py-2 text-sm text-[#26454c] outline-none focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25"
/>
@ -238,7 +238,7 @@ export default function AdminFeedback() {
const [loading, setLoading] = useState(true);
const [error, setError] = useState<any>(null);
// Minimums, not equality — see lib/roles.ts.
// Minimums, not equality; see lib/roles.ts.
const canWrite = roleCanWrite(user);
const canRemove = canDelete(user);