Repository navigation
Description
Need
R package sites built with pkgdown have no shared, evidence-based design for readers who lose the thread on long pages (ADHD-friendly: one next action per page, a visible first step, scannable tables, progressive disclosure, readable defaults). medfit produced a concrete, reviewable proposal after auditing its own site; the rules and layouts are package-independent and could live in Rforge so other packages start from them.
Source (read-only, merged docs): PROPOSAL-docs-adhd-design-2026-11-12.md and AUDIT-docs-and-site-2026-11-12.md. Status: proposal, not yet applied or rendered in medfit; medfit's pilot (home page and one model page) follows. Treat the numbers below as a starting point to validate, not as settled.
What the design contains
Rules, each tied to a check: P1 one **Next:** line per page; P2 a two-sentence "what this page is for" lead; P3 tables over paragraphs; P4 progressive disclosure (details blocks); P5 at most 7 choices per menu group; P6 one home per fact; P7 a breadcrumb and "you are here" cue; P8 readable defaults (body at least 16 px, line length at most 80 characters, WCAG AA contrast 4.5:1); P9 no walls of text (sub-heading or table past 30 lines, an "On this page" block past 400 lines); P10 no setup noise (package-attach messages) on a page's first screen.
Home page layouts, labeled so a maintainer can choose:
- A. Action first (chosen for medfit): title, a two-line "For / You get" lead, one visible action (run the short example), a one-line caveat callout where the package has one, then Install, Try it, Pick your model, More, with release notes collapsed. Best for newcomers.
- B. Model chooser: two or three questions route to one page. Best when readers know their data, not the package's class names.
- C. Start cards: four equal cards (Try it, Install, Pick a model, Fix an error). Easiest to scan, no single first step.
- D. Task lanes: an "I want to..." list by intent. Best for returning users.
Model/article page template: breadcrumb, a two-line lead, a fixed facts table, a "use this page when / use another page when" table, the shortest route first, results, limits, one **Next:** link.
Requested implementation
- A reference doc or skill in Rforge (extend
commands/r/site.mdand the existing site skill; do not add a second audit engine, see feat(docs): audit Quarto articles and pkgdown development-mode routes #111 and feat(skills): add a verified Quarto/pkgdown website audit and update workflow #112) holding the rules, the four home layouts, the page template and a smallpkgdown/extra.csswith the readability values. - An opt-in scaffold or checklist step in
r:sitethat proposes the layout and template for the package being edited, and shows the diff before writing. - The rules that are mechanically checkable (P1, P5, P6 as a single-source marker, P8 values, P9 length) listed as candidate checks for the site audit, each with a planted-defect fixture.
Acceptance
- The design kit is reviewable without running anything and states which rules are checkable and which need human review.
- Nothing is written to a package without a shown diff and confirmation.
- Existing pkgdown limits are respected (Markdown/Quarto,
_pkgdown.yml, one CSS file; no JavaScript, no new dependency).
Activity