section

plistDetails

Wire value: "details"

Appears on: Documentation Topic

1. How swift-docc-render consumes this

This is one of the "primary content" section kinds attached to a symbol's primaryContentSections array — specifically the one used for documenting a property-list key or entitlement key (for example, an Info.plist key or a .entitlements key). The dispatch happens in PrimaryContent.vue, which keys a lookup table on section.kind via the SectionKind constant map (defined in constants/PrimaryContentSection.js, where details: 'details' is the literal wire value). For SectionKind.details it selects the PropertyListKeyDetails component and passes through the section's details object as a prop:

componentFor(section) {
  return {
    ...
    [SectionKind.details]: PropertyListKeyDetails,
    ...
  }[section.kind];
},
propsFor(section) {
  const { ..., details, ... } = section;
  return {
    ...
    [SectionKind.details]: { details },
    ...
  }[kind];
},

The actual rendering happens in PropertyListKeyDetails.vue. Its template root is a <section class="details"> containing a heading (via the shared LinkableHeading component, anchored to "details" per ContentSectionAnchors.js) followed by a single definition list (<dl>) that conditionally emits up to three key/value pairs depending on the details.titleStyle field:

<section class="details">
  <LinkableHeading :anchor="contentSectionData.anchor">
    {{ $t(contentSectionData.title) }}
  </LinkableHeading>
  <dl>
    <template v-if="isSymbol">
      <dt class="detail-type">{{ $t('metadata.details.name') }}</dt>
      <dd class="detail-content">{{ details.ideTitle }}</dd>
    </template>
    <template v-if="isTitle">
      <dt class="detail-type">{{ $t('metadata.details.key') }}</dt>
      <dd class="detail-content">{{ details.name }}</dd>
    </template>
    <dt class="detail-type">{{ $t('metadata.details.type') }}</dt>
    <dd class="detail-content">
      <PropertyListKeyType :types="details.value" />
    </dd>
  </dl>
</section>

The isSymbol/isTitle computed properties read details.titleStyle ("symbol" vs. "title") together with the presence of details.ideTitle to decide which extra row to show: when the raw key itself is the displayed title (titleStyle === 'symbol'), it shows a "Name" row with the human-friendly ideTitle; when a friendly display name is the title instead (titleStyle === 'title'), it shows a "Key" row with the raw details.name. The "Type" row always renders, delegating to a small child component, PropertyListKeyType.vue, which turns the value array of { baseType, arrayMode } objects into an English phrase such as "array of strings or a number" (joining with commas and a trailing "or", and pluralizing baseType when arrayMode is true).

See also: Localization fallback — how $t()/locale-key lookup works across every kind that uses it.

2. Example JSON and rendered mockup

Real fixture: swift-docc's test suite includes a full rendered plist-key RenderNode fixture at Tests/SwiftDocCTests/Rendering/Rendering Fixtures/plist-symbol.json (lines 84–101), used by PlistSymbolTests.swift. The excerpt below is that fixture's details section, unmodified.

{
  "kind": "details",
  "title": "Details",
  "details": {
      "name": "com.apple.developer.networking.wifi",
      "value": [
        {
          "baseType": "string",
          "arrayMode": true
        },
        {
          "baseType": "number"
        }
      ],
      "platforms": ["iOS", "macOS"],
      "ideTitle": "WiFi access",
      "titleStyle": "title"
  }
}
Details
Key
com.apple.developer.networking.wifi
Type
array of strings or a number

Because titleStyle is "title" here, the mockup shows a "Key" row holding the raw name (the symbol's displayed title is presumably the friendlier ideTitle, "WiFi access", shown elsewhere on the page as the page heading — not repeated inside this section). The platforms array from the fixture is not rendered by PropertyListKeyDetails.vue at all; see the data sheet below.

3. Data sheet

Per Sources/DocCArchive/Vendored/RenderNode.spec.json, schema object DetailsRenderSection (lines 2956–2975) plus its nested DetailsSection object (lines 2976–3011) and the shared TypeDetails object (lines 3225–3238). Cross-checked against the generated Components.Schemas.DetailsRenderSection struct in Sources/DocCArchive/generated/Types.swift (lines 6628–6660), its nested Components.Schemas.DetailsSection (lines 6661–6712), and Components.Schemas.TypeDetails (lines 7057–7079).

FieldTypeRequired?Enum values / defaultNote
kindstringyes["details"] (single-value enum)Discriminator value; matches RenderSectionKind.plistDetails in swift-docc's Swift model (case plistDetails = "details").
titlestringyes—swift-docc's PropertyListDetailsRenderSection defaults this to "Details" and the translator never overrides it; the Vue component also supplies its own localized heading text (sections.details → "Details") rather than reading this field, so in practice it is redundant on the wire.
detailsDetailsSection objectyes—The single property-list-key description; unlike some sibling section kinds this is one object, not an array.
DetailsSection.namestringyes—The raw property-list key (e.g. "com.apple.developer.networking.wifi"). Wire key is name; swift-docc's Swift model calls the equivalent field rawKey via a custom CodingKeys mapping (case rawKey = "name").
DetailsSection.valuearray of TypeDetailsyes—Acceptable value type(s) for this key; usually one entry, but can list several (e.g. "string or number").
DetailsSection.platformsarray of stringyes—Platform names the key applies to (e.g. ["iOS", "macOS"]). Present on the wire and required by the schema, but not read by PropertyListKeyDetails.vue — no platform information is rendered in this section as of the pinned commit.
DetailsSection.ideTitlestringno—Optional human-friendly display name for the key (e.g. "WiFi access"). Wire key is ideTitle; swift-docc's Swift model calls the equivalent field displayName via case displayName = "ideTitle". Shown as the "Name" row only when titleStyle == "symbol".
DetailsSection.rawNamestringno—Present in the JSON Schema and generated Swift type but has no corresponding field in swift-docc's own PropertyListDetailsRenderSection.Details struct and is not read anywhere in PropertyListKeyDetails.vue. Appears to be vestigial/unused on both the producer and consumer sides as of the pinned commits.
DetailsSection.titleStylestringyes["title", "symbol"]Controls which extra row the Vue component shows (see section 1). Matches swift-docc's PropertyListTitleStyle enum (useRawKey = "symbol", useDisplayName = "title").
TypeDetails.baseTypestring, nullableno—e.g. "string", "number", "boolean", "array", "dictionary"; free-text on the wire, but PropertyListKeyType.vue only special-cases "array", "number", "string", and "dictionary" for pluralization, defaulting unrecognized/absent values to "*" for display.
TypeDetails.arrayModeboolean, nullableno—When true, the type is rendered as "array of <baseType>s" instead of the bare base type.

Source-of-truth alignment: swift-docc's own Swift model for this section lives at Sources/SwiftDocC/Model/Rendering/Symbol/PropertyListDetailsRenderSection.swift (lines 27–70), defining public struct PropertyListDetailsRenderSection: RenderSection, Equatable with a nested Details struct. The struct's field names (rawKey, value, platforms, displayName, titleStyle) differ cosmetically from the vendored JSON Schema/generated Swift names (name, value, platforms, ideTitle, titleStyle) purely via CodingKeys remapping — the wire JSON is identical either way. The rawName field noted above is the one field present on the wire schema with no corresponding Swift-model property at all.

4. HTML/CSS mapping in DocC-Render output

5. Modern CSS-only alternative

Not applicable

Current behavior: PropertyListKeyDetails.vue holds no component-local reactive state and has no click/toggle/expand-collapse handlers. It is a one-way template render: two computed properties (isSymbol, isTitle) derive a boolean directly from the immutable details.titleStyle/details.ideTitle props passed down from the parent, and v-if uses those booleans to decide, at render time, which of two mutually exclusive rows to include. This is conceptually a compile-time/data-driven conditional, not a runtime UI toggle a user can flip — there is no user interaction anywhere in this component (no click handler, no v-model, no v-show tied to a click). PropertyListKeyType.vue is likewise a pure, stateless string-formatting computed chain with no interactivity.

Because there is no interactive state to reproduce (no expand/collapse, no active/inactive selection, no show/hide driven by user input), none of the native state-holding mechanisms (<details>/<summary>, radio+:checked, :target, the Popover API, <dialog>, :has(), container queries, CSS anchor positioning, view-transitions) have anything to hold or replace for this kind. The one piece of "state" on the page — which of the two conditional rows is shown — is fully determined by the server-rendered JSON payload before the page ever reaches the browser, so it is not something CSS (native or otherwise) would ever need to manage.