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:
.mobile-dropdown-container > MobileDropdown— a single combined chapter+section picker shown only at small breakpoints (the container isdisplay: noneotherwise)..dropdown-container > .primary-dropdown (PrimaryDropdown.vue)— the chapter/tutorial picker, built fromchapters(hierarchy.modules) withcurrentOptionset to the page's own title (tutorialTitle, derived from theherosection, not from the RenderNode's own optionaltitlefield).ChevronIcon.icon-inline— a static separator glyph between the primary and secondary dropdowns..secondary-dropdown (SecondaryDropdown.vue)— rendered onlyv-if="currentSection"; lists the current tutorial's own@Sectionanchors (optionsForSections, derived fromhierarchy.modules[*].projects[*] .sectionsplus a synthetic "Introduction" first entry) with a live section-progress indicator (sectionIndicatorText, e.g. "Section 2 of 4").
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).
- node
div.tutorial— root element for the whole page; wraps the entireTutorialsPageRenderNode(kind"project"). kinds/node-tutorial.html- chrome
#nav (NavigationBar.vue > NavBase.vue)— technology/chapter/section navigation bar; rendered only when!isTargetIDE; no sidebar, no search (see section 2).- chrome
.nav-title (NavTitleContainer)— technology name + "Tutorials" subhead, linking tohierarchy.reference. - chrome
.mobile-dropdown-container > MobileDropdown— combined chapter+section picker (small breakpoint only). - chrome
.dropdown-container > .primary-dropdown (PrimaryDropdown.vue)— chapter/tutorial picker built fromhierarchy.modules. - chrome
.secondary-dropdown (SecondaryDropdown.vue)— current tutorial's own@Sectionanchors + progress indicator.
- chrome
- chrome
main#app-main[tabindex="0"]— wraps thesectionsarray; one child per entry, dispatched by each section's ownkind.- section
.tutorial-hero > div.hero.dark (Hero.vue)—kind: "hero"intro section. kinds/section-hero.html- chrome
.bg— optional background-image layer, resolved frombackgroundImageagainst the light-variant reference entry inreferences. - block
h1.headline > span.eyebrow—Headlinecomponent; eyebrow text is the hero'schapterstring, title is the hero's owntitlestring (both plain strings on the section, not block/inline content). - block
.intro (ContentNode.vue dispatch)— renders the hero'scontentarray.- block
p (paragraph)—kind: "paragraph". kinds/block-paragraph.html- inline
(bare text node)—type: "text", spliced in as a raw DOM string. kinds/inline-text.html - inline
code.inline-code—type: "codeVoice", e.g. a symbol name mentioned in the intro copy. kinds/inline-codevoice.html
- inline
- block
- chrome
a.call-to-action > PlayIcon+GenericModal > Asset.video-asset— "Watch intro video" trigger, shown only when the hero'svideofield is set; resolves to a referencevideoentry. kinds/reference-video.html - chrome
.metadata (HeroMetadata.vue)— rendersestimatedTimeInMinutes, and resolvesprojectFiles/xcodeRequirementto reference entries.- reference
(download link)—projectFilesidentifier resolved against the references map. kinds/reference-download.html - reference
(Xcode requirement chip)—xcodeRequirementidentifier resolved against the references map. kinds/reference-xcoderequirement.html
- reference
- chrome
- section
.sections > .section (SectionList.vue > Section.vue)—kind: "tasks", one.sectionper entry intasks. kinds/section-tasks.html- chrome
(SectionIntro.vue, via Section.vue's Intro)— renders the task'scontentSectionintro content/media (non-step body of the@Section/@Stepsblock). - block
.steps > .content-container > .step-container > .step (SectionSteps.vue > Step.vue)— one perstepentry instepsSection. kinds/block-step.html- block
p.step-label— "Step N" label (plain, non-schema chrome text driven by the computedstepNumber). - block
(ContentNode.vue dispatch over content)— the step's instructional prose.- block
p (paragraph)kinds/block-paragraph.html- inline
strong—type: "strong". kinds/inline-strong.html - inline
a (reference)—type: "reference", an inline link resolved viaidentifieragainstreferences, e.g. to a referencetopicentry. kinds/inline-reference.html / kinds/reference-topic.html
- inline
- block
- chrome
.asset-container > CodePreview > CodeListing (or Asset for media)— the step'scodeidentifier resolves to a referencefileentry rendered by the shared code-listing component; the step'smediaidentifier resolves to an referenceimage/videoentry. kinds/reference-file.html- block
pre > code (codeListing, via CodeListing.vue)— syntax-highlighted lines of the step's associated code file. kinds/block-codelisting.html
- block
- block
.caption (ContentNode.vue dispatch over caption)— optional step caption content, same block/inline shapes as the main step content.
- block
- chrome
- section
.assessments-wrapper > .assessments (Assessments.vue)—kind: "assessments", one instance for the section's wholeassessmentsarray (quiz questions are stepped through client-side, not all rendered as siblings). kinds/section-assessments.html- chrome
h2.title— localized "Check Your Understanding" banner (not schema content). - chrome
AssessmentsProgress— "Question N of M" progress indicator, computed from array length/index, not itself schema content. - block
.quiz (Quiz.vue)— renders oneassessments[activeIndex]entry at a time.- block
.title (ContentNode.vue over title)— the active question'stitleblock content. - block
.question-content (ContentNode.vue over content)— the active question's supportingcontentblock content (optional). - block
fieldset.choices > label— one per entry inchoices.- block
.question (ContentNode.vue over choice.content)— the choice's own label content. - block
.answer (ContentNode.vue over choice.justification)— revealed only after that choice is checked; the justification/feedback content.
- block
- block
- chrome
- section
(CallToAction.vue > shared CallToAction.vue "BaseCTA")—kind: "callToAction", DocC's auto-generated "what's next" panel. kinds/section-calltoaction.html- chrome
(featured media figure)— the section'smediaidentifier resolved to an referenceimageentry. kinds/reference-image.html - block
(ContentNode.vue over abstract)— the panel's abstract text.- inline
(bare text node)—type: "text". kinds/inline-text.html
- inline
- reference
a (action link)— the panel'sactionobject, an inline-reference-shaped pointer (type: "reference") to the next tutorial/article, with an optionaloverridingTitle. kinds/reference-topic.html
- chrome
- section
- chrome
PortalTarget[name="modal-destination"]— portal-vue teleport target for modals raised from within tutorial content (e.g. the Hero's video modal above).
- chrome
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 kind | Component | Kind page |
|---|---|---|
hero | Tutorial/Hero.vue | section-hero.html |
tasks | Tutorial/SectionList.vue | section-tasks.html |
assessments | Tutorial/Assessments.vue | section-assessments.html |
callToAction | Tutorial/CallToAction.vue | section-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 via | Block/inline/reference kinds |
|---|---|
Hero content | paragraph, and (generically, via ContentNode.vue) any other block/inline kind an author's Markdown produces inside an @Intro directive |
Tasks contentSection intro | any block/inline kind, via SectionIntro.vue's own ContentNode.vue usage |
Tasks stepsSection | step (dedicated component); interstitial non-step nodes between steps render generically |
Step content/caption | any block/inline kind, most commonly paragraph, codeVoice, reference |
Step code/step media | file reference (code), image/video reference (media) |
| Assessments question/choice content | any block/inline kind, via Quiz.vue's ContentNode.vue usage |
CallToAction abstract/action | block/inline content plus a topic-shaped action reference |
Hero xcodeRequirement/projectFiles | xcodeRequirement, download |