Context
skola.dev PR #202 makes <CodeExample position={n}> 0-based, consistent with <Quiz> and the stored position (previously it was 1-based, which silently broke the intro-python examples authored as position={0}).
The fix inverts which markers are correct:
- intro-python used
position={0} → now correct, no MDX change needed.
- qa-sandbox used
position={1}/{2} → now off-by-one, renders nothing until shifted down by one.
qa-sandbox is a sandbox/showcase course (not learner-facing), so this is low-urgency, but the examples are currently blank.
Changes needed (qa-sandbox MDX markers)
| Lesson |
Current |
Change to |
qa-sandbox/lessons/03-mixed-everything/kea.mdx |
<CodeExample position={1} /> |
position={0} |
qa-sandbox/lessons/04-callouts-and-figure/kea.mdx |
<CodeExample position={1} /> |
position={0} |
qa-sandbox/lessons/05-code-notations/kea.mdx |
<CodeExample position={1} />, position={2} |
position={0}, position={1} |
Also (intro-python — comment cleanup only, no functional change)
The 3 code-examples.yaml sidecars in intro-python (L02/L07/L09) carry a now-misleading comment: "position 0 corresponds to <CodeExample position={0}>". With the fix this is finally accurate, but the comment was written under the old (broken) assumption — worth a quick reword to "0-based marker = stored 0-based position" for clarity.
After editing
Republish + task content:bump per the content pipeline. A redeploy is required for the static lesson routes to pick up the MDX change.
Guardrail
PR #202 adds a dev console.warn when a <CodeExample> position matches no example, so this class of drift is no longer silent during authoring.
Context
skola.dev PR #202 makes
<CodeExample position={n}>0-based, consistent with<Quiz>and the storedposition(previously it was 1-based, which silently broke the intro-python examples authored asposition={0}).The fix inverts which markers are correct:
position={0}→ now correct, no MDX change needed.position={1}/{2}→ now off-by-one, renders nothing until shifted down by one.qa-sandbox is a sandbox/showcase course (not learner-facing), so this is low-urgency, but the examples are currently blank.
Changes needed (qa-sandbox MDX markers)
qa-sandbox/lessons/03-mixed-everything/kea.mdx<CodeExample position={1} />position={0}qa-sandbox/lessons/04-callouts-and-figure/kea.mdx<CodeExample position={1} />position={0}qa-sandbox/lessons/05-code-notations/kea.mdx<CodeExample position={1} />,position={2}position={0},position={1}Also (intro-python — comment cleanup only, no functional change)
The 3
code-examples.yamlsidecars in intro-python (L02/L07/L09) carry a now-misleading comment: "position 0 corresponds to<CodeExample position={0}>". With the fix this is finally accurate, but the comment was written under the old (broken) assumption — worth a quick reword to "0-based marker = stored 0-based position" for clarity.After editing
Republish +
task content:bumpper the content pipeline. A redeploy is required for the static lesson routes to pick up the MDX change.Guardrail
PR #202 adds a dev
console.warnwhen a<CodeExample>position matches no example, so this class of drift is no longer silent during authoring.