docs(website,frontend): rewrite docs and wizard copy for researchers#146
Conversation
Rewrite the six documentation pages and the wizard's interface text for readers who run jsPsych experiments but are not developers. The `data/raw/` rule and the join-key concept were each restated in several places, every time in different words and heavy with terms like "byte-for-byte, same-named copy" and "re-serialised". Each now has one plain-English explanation, reused where it is needed and linked to from the rest. Wizard labels match what the docs call them, field hints drop SPDX/canonical-URL jargon, `@type` becomes "Author type" and "Privacy policy" becomes "Sharing restrictions" (both still naming the underlying JSON key), and error messages say what to do next instead of dumping exception text into the file list. The processing summary now reports outcomes rather than counting skipped and failed files as processed, and destructive confirmations state that files on disk are untouched. Two factual fixes fell out of the pass: Validation now covers the dataset the user actually downloads. The zip has always shipped placeholder README.md and CHANGES.md, but the validator never saw them, so every run raised MISSING_README_DOC and MISSING_CHANGES_DOC against documents the download does contain — and the Review step carried a note explaining the false alarm away. Both Psych-DS rules are presence-only (stem plus extension at the dataset root), so handing the validator the same bytes the zip carries is an honest check rather than a suppression, verified against psychds-validator directly. Their content now lives once in datasetLayout.ts, shared with the zip builder so the two cannot drift. The project name is passed only when a zip is on offer: saving the bare dataset_description.json produces no such files, and the warnings are then real advice about the user's own folder. Review also pointed at `npx @jspsych/cli validate` — a package that does not exist on npm, with a subcommand the metadata CLI never had. Since validation now covers the whole downloaded project, the re-validation block was removed rather than corrected, along with its dead styles. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 27b7451 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…warnings note The upload-explainer toggle test asserted the collapsed state against "Array values" — copy this branch had already replaced. The string was absent whether or not the block collapsed, so the second half of the test verified nothing. It now checks for the same text the open-state assertion uses; confirmed load-bearing by forcing the block open, which fails it. The warnings note dropped its zip/no-zip gating and now renders for any warning list, including the bare-metadata save where MISSING_README_DOC is genuine. "Recommended metadata you haven't filled in" is the wrong description for that case — a missing README is a file, not an unfilled field — so the note, and the two doc pages carrying the same sentence, say "metadata or files". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Pushed 27b7451 with fixes for the two review findings.
269/269 tests pass, One cross-PR note, also left on #145: this branch conflicts with #145 in Separately, the stale |
Rewrites the six documentation pages and the wizard's interface text for readers who run jsPsych experiments but are not developers. Two factual bugs surfaced during the pass and are fixed here too.
Copy
The
data/raw/rule and the join-key concept were each restated in several places, every time in different words and heavy with terms like "byte-for-byte, same-named copy" and "re-serialised". Each now has one plain-English explanation, reused where needed and linked to from the rest.In the wizard: labels match what the docs call them, field hints drop the SPDX/canonical-URL jargon,
@typebecomes Author type andPrivacy policybecomes Sharing restrictions (both still naming the underlying JSON key so the preview stays readable), and errors say what to do next instead of dumping exception text into the file list. The processing summary reports outcomes —Finished. 3 files read, 1 skipped.— rather than counting skipped and failed files as "processed". Destructive confirmations now state that files on disk are untouched.One doc fix worth calling out: the wizard guide claimed variables with unknown descriptions "appear expanded at the top". They start collapsed, under a Missing descriptions heading.
Validation now checks what you actually download
The zip has always shipped placeholder
README.mdandCHANGES.md, but the validator never saw them — so every run reportedMISSING_README_DOC/MISSING_CHANGES_DOCagainst documents the download does contain, and Review carried a note explaining the false alarm away.Both Psych-DS rules are presence-only (
stem+extensionsat the dataset root, no content requirements), so handing the validator the same bytes the zip carries is an honest check rather than a suppression. Verified againstpsychds-validatordirectly rather than inferred from the schema:Their content now lives once in
datasetLayout.ts, shared with the zip builder so the two can't drift — that module's header already said it exists so the download and the validator "never drift", which is precisely the drift that caused this.The project name is passed only when a zip is on offer. Saving the bare
dataset_description.jsonproduces no such files, so those warnings are real advice about the user's own folder and still appear. Two tests cover both directions.A command that never existed
Review pointed at
npx @jspsych/cli validate— a package that is not on npm, with a subcommand the metadata CLI never had (it defines yargs.option()s only, so a barevalidatepositional is silently ignored). The--psych-ds-dirflag in the second line suggests this repo's CLI was meant, but no invocation of it validates a folder: it always wants a data directory and rewritesdataset_description.jsonas it goes.Since validation now covers the whole downloaded project, the re-validation block was removed rather than corrected, along with its dead styles. The stale reference is also gone from
packages/frontend/README.md,docs/dev/frontend-architecture.md, and a source comment.Notes for review
main. docs(website): rewrite CLI guide as prompt-by-prompt walkthrough #143 rewroteusing-the-cli.mdxwhile this was in flight; its prompt-by-prompt structure wins every conflict, and its dedicated join-key step made my paragraph there redundant. Theraw/tree comment is corrected — main's "if inputs were JSON/JSON-Lines" misses renamed and rewritten CSVs.origin/mainto confirm nothing was dropped.tscclean, site builds. Test churn is assertion updates tracking the new copy, plus two new validation tests.postcss/undicioverridesin the working tree. Related: the lock file currently haspostcssremoved but not reinstalled, sonpm run buildinwebsite/fails before Docusaurus starts and the wizard bundle inwebsite/static/wizard-app/is stale — the in-app copy here won't show on the site until that's resolved and the wizard is rebuilt.🤖 Generated with Claude Code