page

Tutorial (Project)

Route: /tutorials/:id/* → views/Topic.vue → components/Tutorial.vue (kind "project")

1. Route and component dispatch

This page is the interactive DocC tutorial: a full RenderNode whose top-level kind discriminator is the wire value "project" (swift-docc's RenderNode.Kind declares case tutorial = "project", line 256 — every layer above the wire calls this a "tutorial", but "project" is what actually lands on disk). Full route/dispatch details and citations are documented in kinds/node-tutorial.html §1; summarized here for this page's own tree.

The route-level dispatcher is views/Topic.vue, which switches on topic.kind via a local TopicKind map ({ article: 'article', tutorial: 'project' }) and, for kind: "project", renders components/Tutorial.vue, passing exactly five props derived from the RenderNode:

propsFor(topic) {
  const {
    hierarchy, kind, metadata, references, sections, identifier,
  } = topic;
  return {
    [TopicKind.tutorial]: {
      hierarchy, metadata, references, sections, identifierUrl: identifier.url,
    },
    ...
  }[kind];
}

hierarchy and metadata feed the page chrome (section 2); sections is the array this page's own body is built from, each entry re-dispatched by its own kind field through Tutorial.vue's local SectionComponents map (hero → Hero.vue, tasks → SectionList.vue, assessments → Assessments.vue, callToAction → CallToAction.vue); references is the identifier-keyed lookup table those sections resolve topic links, images, code files, and downloads against. This same five-prop hand-off and section dispatch table is what kinds/node-tutorial.html §1 walks through with full line citations — see that page for the RenderNode.Kind/SectionComponents source excerpts verbatim.

2. Page chrome (non-schema)

Tutorial.vue's root template renders exactly one chrome component above the section list: components/Tutorial/NavigationBar.vue, conditionally rendered only when !isTargetIDE (line 14 of Tutorial.vue: <NavigationBar v-if="!isTargetIDE" .../> — Xcode's embedded IDE documentation viewer suppresses this bar entirely).

NavigationBar.vue builds on the shared docc-render/components/NavBase.vue: its template renders <NavBase id="nav" :aria-label="technology" hasSolidBackground>, giving the root chrome element the id #nav and a solid (non-translucent) dark background, distinct from the default, scroll-transparent nav used on documentation pages. Inside NavBase's default slot it places a NavTitleContainer showing the technology name (metadata.category) as the title and a localized "Tutorials" subhead, linked back to the tutorial's technology root via a ReferenceUrlProvider wrapping hierarchy.reference. Inside the tray slot it places, in order:

Both PrimaryDropdown.vue and SecondaryDropdown.vue delegate their open/closed toggle behavior to the shared DropdownCustom.vue, and SecondaryDropdown's selection additionally drives a manual scrollToElement mixin call (working around a vue-router scroll-restoration bug) rather than a plain in-page anchor jump. NavigationBar.vue's own scoped CSS layers dark-themed dropdown backgrounds (--color-tutorial-navbar-dropdown-background / -border) on top of the shared NavBase styles, and collapses the desktop grid (.dropdown-container, .separator) in favor of the mobile dropdown at the nav-in-breakpoint mixin's breakpoint.

This page has no sidebar navigator and no search. Unlike the Documentation Topic page (DocumentationTopic.vue, wire kind "symbol"/"article" " — see doc-topic.html for its NavigatorDataProvider/left-rail tree and its Navigator-embedded search field), Tutorial.vue's template contains no navigator sidebar component and no search input at all: navigation within a tutorial project is limited to the Primary/Secondary/Mobile chapter+section dropdowns described above, plus the page's own in-content anchors and the trailing callToAction section's "what's next" link. This is a structural fact of Tutorial.vue's template (no sidebar/search components are imported or rendered anywhere in it), not a configuration flag that could be toggled on.

3. DOM hierarchy: root → chrome → content → leaves

Below is a representative (not exhaustive) walk of the rendered DOM for a tutorial project page, one example subtree per section kind Tutorial.vue actually dispatches on. Tag legend: chrome non-schema UI, node top-level RenderNode kind, section RenderSectionKind, block RenderBlockContent, inline RenderInlineContent, reference RenderReference (from the references map).

Not walked above for brevity, but reachable the same way: orderedList/ unorderedList/aside/table/row blocks and emphasis/image/newTerm inline runs anywhere ContentNode.vue dispatches over block/inline content (hero intro, step content/ caption, quiz title/content/choices, callToAction abstract) — see section 4 for the full reachable set specific to this page.

4. RenderNode content dispatch (schema-driven)

Tutorial.vue's SectionComponents map (see section 1) is a closed set of exactly four section kinds. Two other section kinds that share the same top-level RenderSection oneOf (volume, resources) exist on the schema but belong to the Tutorial Overview page (kind "overview"), not this page — Tutorial.vue has no entry for them and would silently drop a section with either kind.

Section kindComponentKind page
heroTutorial/Hero.vuesection-hero.html
tasksTutorial/SectionList.vuesection-tasks.html
assessmentsTutorial/Assessments.vuesection-assessments.html
callToActionTutorial/CallToAction.vuesection-calltoaction.html

Underneath those four sections, block and inline content is dispatched generically by the shared ContentNode.vue (its BlockType/InlineType maps), except for step, which SectionSteps.vue intercepts and routes to its own dedicated Step.vue instead of letting ContentNode.vue render it generically (see block-step.html).

Reachable viaBlock/inline/reference kinds
Hero contentparagraph, and (generically, via ContentNode.vue) any other block/inline kind an author's Markdown produces inside an @Intro directive
Tasks contentSection introany block/inline kind, via SectionIntro.vue's own ContentNode.vue usage
Tasks stepsSectionstep (dedicated component); interstitial non-step nodes between steps render generically
Step content/captionany block/inline kind, most commonly paragraph, codeVoice, reference
Step code/step mediafile reference (code), image/video reference (media)
Assessments question/choice contentany block/inline kind, via Quiz.vue's ContentNode.vue usage
CallToAction abstract/actionblock/inline content plus a topic-shaped action reference
Hero xcodeRequirement/projectFilesxcodeRequirement, download

5. Kind cross-reference table

KindTierKind file
project (tutorial)nodenode-tutorial.html
herosectionsection-hero.html
taskssectionsection-tasks.html
assessmentssectionsection-assessments.html
callToActionsectionsection-calltoaction.html
stepblockblock-step.html
paragraphblockblock-paragraph.html
codeListingblockblock-codelisting.html
asideblockblock-aside.html
headingblockblock-heading.html
orderedListblockblock-orderedlist.html
unorderedListblockblock-unorderedlist.html
tableblockblock-table.html
rowblockblock-row.html
smallblockblock-small.html
termListblockblock-termlist.html
tabNavigatorblockblock-tabnavigator.html
linksblockblock-links.html
videoblockblock-video.html
thematicBreakblockblock-thematicbreak.html
textinlineinline-text.html
codeVoiceinlineinline-codevoice.html
emphasisinlineinline-emphasis.html
stronginlineinline-strong.html
referenceinlineinline-reference.html
image (inline)inlineinline-image.html
newTerminlineinline-newterm.html
strikethroughinlineinline-strikethrough.html
subscriptinlineinline-subscript.html
superscriptinlineinline-superscript.html
topicreferencereference-topic.html
section (reference)referencereference-section.html
image (reference)referencereference-image.html
video (reference)referencereference-video.html
filereferencereference-file.html
downloadreferencereference-download.html
xcodeRequirementreferencereference-xcoderequirement.html
linkreferencereference-link.html
unresolvablereferencereference-unresolvable.html