NS Design System
v3.0.0 · 257 tokens

118Sources & practice check

The two things that separate a tutor from an answer machine: where it got this, and one question back. Sources are numbered mono chips so the prose can reference [1] inline the way an article cites; the check is a real fieldset of radios, asked after an explanation.

Use it for

  • Every answer built from lesson content — the citation is the student's way of verifying
  • One check question after an explanation, when the mode is Coach or the setting is on

Not for

  • More than about four sources — a citation list longer than the answer is not attribution, it is noise
  • A quiz: this is one question in a conversation, not a graded assessment (see Quiz for that)

Sources

markup
<div class="ns-aisource" style="max-inline-size:40rem">
  <span class="ns-aisource__label">Sources</span>
  <a class="ns-aisource__item" href="#0"><span class="ns-aisource__num">1</span> Bulk-safe Apex patterns · lesson 04</a>
  <a class="ns-aisource__item" href="#0"><span class="ns-aisource__num">2</span> Apex basics · lesson 09</a>
  <a class="ns-aisource__item" href="#0"><span class="ns-aisource__num">3</span> Execution governors and limits <i class="ph ph-arrow-up-right" aria-hidden="true"></i></a>
</div>

Practice check

The teaching move. After explaining governor limits it asks one question and waits — which is the whole difference between reading an answer and knowing it.

// Quick check

Your trigger queries Account inside a for loop over 200 Contacts. How many SOQL queries does the transaction use?

markup
<div class="ns-aicheck" style="max-inline-size:36rem">
  <span class="ns-aicheck__kicker">// Quick check</span>
  <p class="ns-aicheck__q">Your trigger queries Account inside a <code class="ns-code-inline">for</code> loop over 200 Contacts. How many SOQL queries does the transaction use?</p>
  <div class="ns-aicheck__options">
    <label class="ns-choice"><input class="ns-radio" type="radio" name="ai-doc-check"><span class="ns-choice__text"><span class="ns-choice__label">1 — the loop is compiled away</span></span></label>
    <label class="ns-choice"><input class="ns-radio" type="radio" name="ai-doc-check"><span class="ns-choice__text"><span class="ns-choice__label">200 — one per record, and the limit is 100</span></span></label>
    <label class="ns-choice"><input class="ns-radio" type="radio" name="ai-doc-check"><span class="ns-choice__text"><span class="ns-choice__label">100 — it stops at the limit and continues</span></span></label>
  </div>
  <div class="ns-aicheck__foot">
    <button type="button" class="ns-btn ns-btn--primary ns-btn--sm">Check answer</button>
    <button type="button" class="ns-btn ns-btn--quiet ns-btn--sm">Skip</button>
  </div>
</div>

Accessibility contract

  • Source chips are links with visible numbers, not superscript-only markers
  • The check is a real radio group inside a fieldset — arrow keys work, and the options are labels, not clickable divs