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:
parent
e35d09b172
commit
54bf649b8d
31 changed files with 239 additions and 187 deletions
|
|
@ -5,8 +5,8 @@
|
|||
an ordered collection of them, and nests one level for content
|
||||
blocks and their items.
|
||||
|
||||
Ordering is array position — the server writes sort_order from
|
||||
the index — so moving a row is a splice, not a number to
|
||||
Ordering is array position (the server writes sort_order from
|
||||
the index), so moving a row is a splice, not a number to
|
||||
hand-edit. Rows can be dragged by the handle or moved with the
|
||||
arrow buttons; the arrows are the keyboard path and stay whether
|
||||
or not a pointer is in use.
|
||||
|
|
@ -135,7 +135,7 @@ export function Field({ field, value, row, options, error, onChange }: any) {
|
|||
/>
|
||||
) : widget === "select" ? (
|
||||
// A select has no readOnly, so this one really does have
|
||||
// to be disabled — there's no way to keep it focusable
|
||||
// to be disabled: there's no way to keep it focusable
|
||||
// and still refuse a new choice.
|
||||
<select
|
||||
{...common}
|
||||
|
|
@ -144,8 +144,8 @@ export function Field({ field, value, row, options, error, onChange }: any) {
|
|||
orphaned && !locked ? inputError : ""
|
||||
}`}
|
||||
>
|
||||
<option value="">{field.blankLabel ?? "— choose —"}</option>
|
||||
{orphaned && <option value={value}>{value} — no longer exists</option>}
|
||||
<option value="">{field.blankLabel ?? "- Please choose from the list -"}</option>
|
||||
{orphaned && <option value={value}>{value} no longer exists</option>}
|
||||
{list.map(([id2, label]) => (
|
||||
<option key={id2} value={id2}>
|
||||
{label}
|
||||
|
|
@ -294,7 +294,7 @@ export function Repeater({ spec, rows, options, errors, errorPrefix, onChange })
|
|||
}}
|
||||
onDragOver={(e) => {
|
||||
// A null dragIndex means the drag started in some
|
||||
// other collection — leave it to whoever owns it.
|
||||
// other collection; leave it to whoever owns it.
|
||||
if (dragIndex === null) return;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue