Skip to content

Round 2 (A): Brookes code page, documentation sidebar + corrections, citation policy - #657

Merged
HenryMehta merged 1 commit into
phases1to11from
round2-brookes-docs
Aug 20, 2026
Merged

Round 2 (A): Brookes code page, documentation sidebar + corrections, citation policy#657
HenryMehta merged 1 commit into
phases1to11from
round2-brookes-docs

Conversation

@mcfrank

@mcfrank mcfrank commented Aug 19, 2026

Copy link
Copy Markdown
Member

Part A of the round-2 feedback, against phases1to11. Templates/CSS only (plus one tiny view context addition). Design proposal: https://claude.ai/code/artifact/7a4700c1-5e9d-4d52-ba64-299ee58981c6

Brookes access-code page

  • Restyled as a focused card (same pattern as login): what a code is, that it's a one-year licence per researcher, a labelled input, Apply code / Not now, and a Brookes-support link for broken codes.
  • Deep link to the exact Brookes product. Brookes sells one Web-CDI access product per instrument family (listed on their CDI product page); the four chargeable families map 1:1, so brookes/utils.py maps family name → product URL, with the general Web-CDI page as fallback. Keyed by name, not pk, so it holds on the EU server's database too.
  • The "Access Denied" modal (shown instead of the add-administrations dialog when the group's instrument has no live licence) gets the same copy and deep link, plus "Enter your code" and support links.
  • "Not now" keeps name=cancel value=CancelBrookesCodeForm.clean and the view key on that value to remove the family from the researcher's list (same behaviour as the old Cancel; the footer now says so).

Documentation

  • Sticky sidebar table of contents with scroll-spy on wide screens; folds to a two-column Contents card on narrow. Sections stay expanded (a manual should be readable top-to-bottom and Ctrl-F-able).
  • Corrected stale UI names (Instruments page, "New administration group", Add Administrations, tick-row + Re-administer, row edit for Lab ID / opted-out, dashboard cards / group switcher, current download menu items). Added an access-code section.
  • PDF link removed (per decision — it'll only drift further from the UI).
  • New How to cite section.

Citations

  • webcdi/_how_to_cite.html — one shared block used by About and the docs. Three explicit rules: platform → deMayo et al. (2021); CAT → Kachergis et al. (2022); instruments → Marchman, Dale & Fenson (2023) manual. Full references; DOIs verified resolving. Please eyeball the author lists — you're on two of them.

Verification

  • Pages render (200) for About, docs, and code pages for a chargeable family (deep-links to its product) and a non-chargeable one (falls back to the general page).
  • Code page: invalid code shows "Invalid code" with the value retained; "Not now" removes the family (tested and restored).
  • Full fast suite (CI command) green alongside part B: 253 tests OK.

🤖 Generated with Claude Code

…rt A)

Brookes access code
- brookescode_form.html: restyled as a focused card (same pattern as login);
  explains what a code is and that it's a one-year licence per researcher;
  labelled input; "Apply code" / "Not now" (the latter keeps name=cancel
  value=Cancel, which BrookesCodeForm.clean and the view depend on);
  Brookes-support link for broken codes.
- Deep link to the exact Brookes product for the family being unlocked:
  brookes/utils.py maps the four chargeable families to the per-instrument
  access-code products listed on brookespublishing.com/product/cdi/, keyed by
  family name so it holds across deployments; anything else falls back to the
  general Web-CDI page.
- no_brookes_code.html (shown instead of the add-administrations dialog when
  the group's instrument has no active licence): same copy, same deep link,
  plus "Enter your code" and support links. AdminNew passes the URLs.

Documentation
- Sticky sidebar table of contents with scroll-spy on wide screens, folding
  to a two-column Contents card on narrow ones (sections stay expanded: a
  manual should be readable top-to-bottom and Ctrl-F-able).
- Corrected stale UI names: Instruments page (not "My CDI Forms"),
  "+ New administration group" page (not a "Set Up dialog"), Add
  Administrations, tick-row + Re-administer, row edit (pencil) for Local Lab
  ID and Opted-out-of-sharing, dashboard cards / group switcher, current
  Download All / Download menu item names.
- Access-code section added under Selecting instruments.
- PDF version link removed (the PDF will only drift further from the UI).
- New "How to cite" section.

Citations
- webcdi/_how_to_cite.html: one shared block used by About and the docs.
  Three explicit rules (platform -> deMayo et al. 2021; CAT -> Kachergis et
  al. 2022; instruments -> Marchman, Dale & Fenson 2023 manual) with full
  references and verified DOI / publisher links.

Theme: auth-card-wide, eyebrow, form-error, auth-actions/foot helpers; doc
sidebar styles; .wcdi-ref hanging indent. Both theme copies kept in sync.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@HenryMehta
HenryMehta merged commit e39f589 into phases1to11 Aug 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants