Skip to content

docs(tutorials): rework TS/JS download links and add AGENTS.md#303

Open
petermuessig wants to merge 1 commit into
mainfrom
docs/tutorial-tsjs-download-links
Open

docs(tutorials): rework TS/JS download links and add AGENTS.md#303
petermuessig wants to merge 1 commit into
mainfrom
docs/tutorial-tsjs-download-links

Conversation

@petermuessig

Copy link
Copy Markdown
Contributor

Summary

Reworks how the JS/TS download links are structured across every tutorial step README, and adds an AGENTS.md repo guide. Branches off the current main (after #295 landed), so the diff is scoped to just this change — ~82 files.

Problem

Each download link was wrapped in a paired <details class="ts-only|js-only" markdown="1">…</details>. On the rendered site one is hidden; but in the raw-markdown view (GitHub blob, editors, AI tools indexing the corpus) both render as noisy collapsibles labelled identically (📥 Download Solution), with the language distinguishable only by the URL suffix.

Change

Replace the wrappers with inline spans:

<span class="ts-only">[📥 Download Solution](…step-NN.zip)<span class="lang-suffix"> (TS)</span></span><span class="js-only">[📥 Download Solution](…step-NN-js.zip)<span class="lang-suffix"> (JS)</span></span>
Surface Before After
Raw markdown two collapsibles, identical labels both links inline: … (TS) and … (JS)
Rendered site (either language) single link, no suffix single link, no suffix — visually unchanged
  • No runtime JS change. The existing .ts-only / .js-only CSS already hides the inactive span; a new .lang-suffix { display: none } rule drops the (TS) / (JS) marker on the rendered side.
  • Covers the per-step block form, the tutorial-overview inline form, and the two standalone-bundle links in navigation/odatav4 step 01.
  • <details class="ts-only"> blocks used for language-only prose are intentionally left untouched.

Also included

  • AGENTS.md — repo guide for AI agents: layout, toolchain, authoring conventions, change-propagation rules, and how to use the tutorials as a codegen source (anchor on the last step, not the first). The new <span> pattern is documented here and in CONTRIBUTING.md.
  • Regenerated packages/*/steps.json (byte-identical — the generator's class-based regex still matches the new <span> shape).

Verification

  • Migration applied by an idempotent script (re-run = zero changes); no conflict markers, .?s placeholder absent, spans present in spot checks.
  • -js.zip bundles confirmed present for the standalone-bundle links.

🤖 Generated with Claude Code

Rework how JS/TS download links are structured across all step READMEs.
The old paired `<details class="ts-only|js-only" markdown="1">…</details>`
wrappers rendered as noisy collapsibles in the raw-markdown view (and to
AI tools indexing the corpus) and hid the "other language exists" signal.

Replace them with inline
`<span class="ts-only|js-only">…<span class="lang-suffix"> (TS|JS)</span></span>`:
both variants read plainly in raw markdown with distinct (TS)/(JS) labels,
while the rendered site still shows only the active language. Achieved with
no runtime JS change — the existing `.ts-only`/`.js-only` CSS hides the
inactive span and a new `.lang-suffix { display: none }` rule drops the
marker. Covers the per-step block form, the overview inline form, and the
two standalone-bundle links in navigation/odatav4 step 01.

Also add AGENTS.md (repo guide for AI agents: layout, conventions,
propagation rules, using the tutorials as a codegen source), document the
new `<span>` pattern in AGENTS.md and CONTRIBUTING.md, and refresh the
remaining README normalization plus packages/*/steps.json.

The one-off migration script lives under the gitignored `_/` folder.
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.

1 participant