page

Documentation Topic

Route: /documentation* → views/DocumentationTopic.vue

1. Route and component dispatch

The Vue Router entry point for every symbol/article page is src/views/DocumentationTopic.vue (exported as DocumentationTopicView). Its template wraps a CodeTheme provider around a DocumentationLayout, and slots a Topic component (an alias for theme/components/DocumentationTopic.vue) into DocumentationLayout's #content slot:

<CodeTheme>
  <DocumentationLayout v-if="topicData" v-bind="documentationLayoutProps">
    <template #nav-title="{ className }">...</template>
    <template #content>
      <Topic
        v-bind="topicProps"
        :key="topicKey"
        ...
        :hierarchyItems="hierarchyItems"
      />
    </template>
  </DocumentationLayout>
</CodeTheme>

(lines 11-43.) beforeRouteEnter/beforeRouteUpdate (lines 287-322) fetch the page's raw RenderNode JSON and assign it to topicData; the view's own topicProps computed then calls extractProps(this.topicData) (line 66, destructured from theme/components/DocumentationTopic.vue's own methods) to turn the wire JSON into the flat prop set the layout/content chain expects. Unlike the top-level tutorial/overview kinds, there is no per-kind lookup table here: both kind: "symbol" and kind: "article" RenderNodes flow through this exact same view/component chain (see kinds/node-symbol.html and kinds/node-article.html for how the two are distinguished downstream via metadata.role/symbolKind instead of kind).

DocumentationLayout (src/components/DocumentationLayout.vue) is the actual owner of the page's chrome: it renders Nav (DocumentationNav.vue) unconditionally (when not an IDE target), then wraps AdjustableSidebarWidth around the routed content, feeding the sidebar's #aside slot with a QuickNavigationModal plus either a caller-provided #navigator slot or, by default, the Navigator component:

<div class="documentation-layout">
  <Nav v-if="!isTargetIDE" ... :displaySidenav="enableNavigator" @toggle-sidenav="...">
    <template #title="{ className }"><slot name="nav-title" :className="className" /></template>
  </Nav>
  <AdjustableSidebarWidth v-bind="sidebarProps" v-on="sidebarListeners" class="full-width-container topic-wrapper">
    <PortalTarget name="modal-destination" multiple />
    <template #aside="{ scrollLockID, breakpoint }">
      <div class="documentation-layout-aside">
        <QuickNavigationModal v-if="enableQuickNavigation" ... />
        <transition name="delay-hiding">
          <slot name="navigator" ...>
            <Navigator key="base-navigator" v-bind="{ ...navigatorProps, technologyProps }" ... />
          </slot>
        </transition>
      </div>
    </template>
    <slot name="content" />
  </AdjustableSidebarWidth>
</div>

(lines 11-81.) The #content slot passed in from the view chain above is exactly the Topic component, so the routed <main> content sits as a sibling to the sidebar inside AdjustableSidebarWidth's own .content wrapper — the schema-driven page is a child of the chrome, not the chrome's parent.

Topic (theme/components/DocumentationTopic.vue) is the actual root of the schema-rendering tree, with template root <div class="doc-topic"> (lines 12-15). Its direct children are a <main id="app-main"> wrapping a DocumentationHero (title/hierarchy/abstract/declarations chrome-and-content mix), a .doc-content-wrapper holding the primary content column plus an optional OnThisPageStickyContainer, and a trailing BetaLegalText (lines 11-178). Section 3 below walks this full tree top to bottom.

DocCArchive transform status: neither MyHTMLTransformer nor MyMarkdownTransformer in Sources/DocCArchive/DocCArchive.swift has any kind-specific handling for DocumentationRenderNode today — both are stub placeholders (a hardcoded <!-- what? --> comment and an empty string, respectively), so a symbol/article RenderNode parsed via Archive.parseRenderNode(dataPath:) decodes correctly but produces no real output through DocCArchive's own transform layer yet.

2. Page chrome (non-schema)

Everything in this section is UI shell built by swift-docc-render's own Vue components — none of it is driven by a field in the RenderNode JSON schema (it is driven by which page type is being rendered, and by the site-wide navigation index, not by this page's own wire data). The Documentation Topic page is the only one of the six top-level page kinds (Documentation Topic, Tutorial/Project, Tutorial Article, Tutorials Overview, Not Found, Server Error) that has a sidebar navigator and search — DocumentationLayout.vue is used exclusively by views/DocumentationTopic.vue, and no other top-level view renders Navigator.vue, NavigatorCard.vue, QuickNavigationButton.vue, or QuickNavigationModal.vue. This is a citable structural fact, not an inference: a grep for these four component names under src/views/ and src/components/ turns up their construction site only inside DocumentationLayout.vue.

DocumentationNav.vue

Role: the sticky top nav bar shown on every non-IDE page; on this page type it is additionally handed a "open sidenav" toggle button. Root DOM: renders through NavBase.vue's <nav class="nav" ...>, itself wrapped with an outer class of documentation-nav (lines 11-22). CSS behavior: position: sticky; top: 0; on .nav (NavBase.vue, $nav-height tall), with a background/border that fades in via nav--is-sticking/nav--is-open state classes toggled by an IntersectionObserver (onIntersect mixin) and by manual open/close. Actions/links: when displaySidenav is true (this page type sets it to enableNavigator), a .sidenav-toggle button in the #pre-title slot emits toggle-sidenav (lines 23-39), which DocumentationLayout.vue's handleToggleSidenav uses to flip either the mobile-visible or large-viewport-hidden sidebar state; a collapsible hamburger menu tray (NavMenuItems) optionally holds a Swift/Objective-C LanguageToggle.

AdjustableSidebarWidth.vue

Role: generic two-pane shell (an <aside> plus a .content region) that DocumentationLayout.vue uses to host the navigator next to the routed page content. Root DOM: <div class="adjustable-sidebar-width">, with .sidebar > .aside (the resizable pane, slotted as #aside) and .content (the default slot, i.e. the Topic tree) (lines 11-56.) CSS/JS behavior: resizable — a .resize-handle element starts a drag (startDrag/handleDrag) that live-sets width in component data(), clamped between a responsive min/max percent of the viewport width and persisted to localStorage under the key sidebar (lines 70-102, 324-332). Collapsible on large viewports via the hiddenOnLarge prop/hide-on-large class (persisted under navigator-hidden-large in DocumentationLayout.vue), and slides in as a full-width mobile overlay below the medium breakpoint (show-on-mobile class, transform: translateX(...) transition). Actions: drag the resize handle to resize; the nav's sidenav-toggle button (above) or dragging past a threshold toggles hiddenOnLarge/mobile visibility.

Navigator.vue / NavigatorCard.vue

Role: the sidebar's tree-view of the current technology's symbol/article index, letting a reader jump directly to any other page in the same module without reloading the nav chrome. Root DOM: Navigator.vue renders <nav class="navigator"> (lines 11-47), delegating its body to NavigatorCard.vue's BaseNavigatorCard-wrapped .card-body, which contains a Reference-based .technology-title link (jumps to the technology root page) followed by a virtualized DynamicScroller list of NavigatorCardItem rows (lines 26-96). Behavior: each row is expand/collapse-able (toggle/toggleFullTree methods track an openNodes map, persisted to sessionStorage under navigator.state), the currently-active page's row is auto-scrolled into view and highlighted (activeUID/activePathMap), and the whole list can be filtered live (see FilterInput below) or by "Hide Deprecated"/API-diff tags. Actions/links: click any row to navigate (emits navigate with the row's path); Alt/Option-click a parent row's technology title or a row's own disclosure toggle to expand/collapse its entire subtree at once (toggleAllNodes/toggleFullTree); arrow keys and Alt+Up/Down move focus between rows.

QuickNavigationButton.vue + QuickNavigationModal.vue + FilterInput.vue (search UI)

Role: a fuzzy "jump to any symbol" command-palette, opened either by clicking the small / button docked at the end of the sidebar's filter row, or by the / or Cmd+Shift+O keyboard shortcuts registered globally on DocumentationLayout.vue while it is mounted (lines 222-231). Root DOM: QuickNavigationButton.vue is a single <button class="quick-navigation-open">/</button> (lines 11-19), slotted into NavigatorCard.vue's filter row. QuickNavigationModal.vue is a GenericModal(isFullscreen) hosting a .quick-navigation container: a FilterInput search box up top and a live .quick-navigation__match-list of Reference rows below, each rendering a TopicTypeIcon, fuzzy-highlighted title, and breadcrumb path, plus a side-by-side preview pane (QuickNavigationPreview) of the selected result's rendered content (lines 11-133). FilterInput.vue itself is the shared search-input widget also used by the sidebar's own filter (below): <div class="filter" role="search"> wrapping an <input>, an optional list of removable/suggested filter tags, and a clear button (lines 11-124). Behavior: input is debounced 250ms before fuzzy-matching every symbol title in the technology's flattened index (constructFuzzyRegex/fuzzyMatch, capped at 20 results, LRU-cached preview fetches per match). Actions/links: "open search modal" (click the / button, or press //Cmd+Shift+O outside of a text input); type to filter; Up/Down arrow to move the highlighted match; Enter to navigate to the highlighted match and close the modal.

Hierarchy.vue (breadcrumb)

Role: the technology › parent › parent › current-page breadcrumb trail rendered just above the page title, inside the hero. Root DOM: a NavMenuItems-based <ul class="hierarchy"> of HierarchyItem entries (lines 11-58), imported into DocumentationTopic.vue as plain Hierarchy (line 215). It reads its parent-topic titles/URLs from the RenderNode's hierarchy field (resolved through references up in the view layer), so its content is schema-derived even though the crumb-trail widget itself is chrome. CSS behavior: responsively collapsing — beyond a content-width threshold up to MaxVisibleLinks (3) intermediate crumbs show inline; narrower viewports collapse the middle crumbs into a HierarchyCollapsedItems dropdown, and below the small breakpoint the current-page title itself folds into that same collapsible list (lines 136-162). Actions/links: each non-current crumb is a link to that ancestor page; deprecated or beta symbols show a trailing Badge next to the current-page crumb.

OnThisPageNav.vue

Role: the right-hand-rail "On this page" table of contents, listing the page's own top-level (and second-level) headings. Root DOM: <div class="OnThisPageNav"><ul class="items"> of router-link items (lines 10-30), wrapped by OnThisPageStickyContainer.vue's <div class="OnThisPageStickyContainer">. CSS behavior: the container is position: sticky (offset below the top nav) and only shown above the small breakpoint and above a 1050px content-width threshold (enableOnThisPageNav/isOnThisPageNavVisible in DocumentationTopic.vue); OnThisPageNav.vue itself is only mounted at all once the store has more than two registered sections (lines 167-171). A scroll listener highlights the currently-in-view heading by adding an active class to its list item (onScroll/checkIsActive). Actions/links: "jump to on-page anchor" — clicking an entry is a plain in-page router-link to #anchor, which also triggers handleFocusAndScroll to move keyboard focus to the target heading.

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

The tree below follows the actual component nesting from DocumentationLayout.vue down through DocumentationTopic.vue into representative primary-content sections and their block/inline leaves. CHROME entries are non-schema UI; NODE/SECTION/BLOCK/INLINE/REFERENCE entries are schema-backed kinds and link to their kinds/*.html page where one exists. Depth is illustrative, not exhaustive — see section 5 for the complete kind list.

4. RenderNode content dispatch (schema-driven)

Which section kinds are reachable depends heavily on whether the page's underlying DocumentationRenderNode is a symbol (metadata.role === "symbol"-family) or an article (metadata.role === "article") — the template is shared, but symbol pages populate many more of the optional, conditionally-rendered fields. An article's primaryContentSections is typically just a single content section holding the article's Markdown body; a symbol's primaryContentSections commonly starts with declarations (pulled into the hero) and can additionally include parameters, relationships (as relationshipsSections, a sibling top-level field, not inside primaryContentSections), REST-specific sections, dictionary/property-list sections, and mentions.

KindTierSymbol pagesArticle pages
declarationssectionyes (hero)no
contentsectionyes (Discussion/Overview)yes (article body)
parameterssectionyesno
attributessectionyes (constrained-value symbols)no
possibleValuessectionyes (plist-key symbols)no
plistDetailssectionyes (plist-key symbols)no
propertiessectionyes (dictionary symbols)no
restEndpointsectionyes (REST symbols)no
restParameterssectionyes (REST symbols)no
restBodysectionyes (REST symbols)no
restResponsessectionyes (REST symbols)no
mentionssectionyes (non-module symbols)no
relationshipssectionyes (relationshipsSections)no
taskGroupsectionyes (topicSections/seeAlsoSections/defaultImplementationsSections)yes (topicSections/seeAlsoSections)
headingblockyesyes
paragraphblockyesyes
asideblockyesyes
codeListingblockyesyes
orderedListblockyesyes
unorderedListblockyesyes
tableblockyesyes
termListblockyesyes
rowblockyesyes
smallblockyesyes
tabNavigatorblockyesyes
linksblockyesyes
videoblockyesyes
dictionaryExampleblockyesyes
endpointExampleblockyes (REST content)yes (REST content)
thematicBreakblockyesyes
all 11 inline kindsinlineyes (inside any block/abstract/heading)yes (inside any block/abstract/heading)
most reference kinds (topic, section, image, video, file, link, download, externalLocation, unresolvable)referenceyesyes
xcodeRequirement, fileTypereferencenot observed on this page type (tutorial-only / unconstructed)not observed on this page type

5. Kind cross-reference table

Every kind that can appear anywhere on a Documentation Topic page (symbol or article), for generating backlinks from each kinds/*.html page to this one.

KindTierKind file
symbolnodekinds/node-symbol.html
articlenodekinds/node-article.html
declarationssectionkinds/section-declarations.html
contentsectionkinds/section-content.html
parameterssectionkinds/section-parameters.html
attributessectionkinds/section-attributes.html
possibleValuessectionkinds/section-possiblevalues.html
plistDetailssectionkinds/section-plistdetails.html
propertiessectionkinds/section-properties.html
restEndpointsectionkinds/section-restendpoint.html
restParameterssectionkinds/section-restparameters.html
restBodysectionkinds/section-restbody.html
restResponsessectionkinds/section-restresponses.html
mentionssectionkinds/section-mentions.html
relationshipssectionkinds/section-relationships.html
taskGroupsectionkinds/section-taskgroup.html
sampleDownloadsectionkinds/section-sampledownload.html
headingblockkinds/block-heading.html
paragraphblockkinds/block-paragraph.html
asideblockkinds/block-aside.html
codeListingblockkinds/block-codelisting.html
orderedListblockkinds/block-orderedlist.html
unorderedListblockkinds/block-unorderedlist.html
tableblockkinds/block-table.html
termListblockkinds/block-termlist.html
rowblockkinds/block-row.html
smallblockkinds/block-small.html
tabNavigatorblockkinds/block-tabnavigator.html
linksblockkinds/block-links.html
videoblockkinds/block-video.html
dictionaryExampleblockkinds/block-dictionaryexample.html
endpointExampleblockkinds/block-endpointexample.html
thematicBreakblockkinds/block-thematicbreak.html
stepblockkinds/block-step.html
codeVoiceinlinekinds/inline-codevoice.html
emphasisinlinekinds/inline-emphasis.html
stronginlinekinds/inline-strong.html
imageinlinekinds/inline-image.html
referenceinlinekinds/inline-reference.html
textinlinekinds/inline-text.html
newTerminlinekinds/inline-newterm.html
inlineHeadinlinekinds/inline-inlinehead.html
subscriptinlinekinds/inline-subscript.html
superscriptinlinekinds/inline-superscript.html
strikethroughinlinekinds/inline-strikethrough.html
image (reference)referencekinds/reference-image.html
video (reference)referencekinds/reference-video.html
filereferencekinds/reference-file.html
topicreferencekinds/reference-topic.html
section (reference)referencekinds/reference-section.html
downloadreferencekinds/reference-download.html
linkreferencekinds/reference-link.html
externalLocationreferencekinds/reference-externallocation.html
unresolvablereferencekinds/reference-unresolvable.html