-
Notifications
You must be signed in to change notification settings - Fork 157
Populate abbreviated declaration fragments in external render nodes #1255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
anferbui
merged 11 commits into
swiftlang:main
from
anferbui:declaration-fragments-in-external-render-nodes
Sep 26, 2025
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2ec78bd
Clarify doc comment for `OutOfProcessReferenceResolver.declarationFra…
anferbui 8086acc
Add full (symbol) name to LinkDestinationSummary
anferbui 12a7e1d
Use the abbreviated declaration fragments in LinkDestinationSummary
anferbui 51e7611
Populate declaration fragments in navigator metadata for external links
anferbui 078469a
Add navigator title to LinkDestinationSummary
anferbui 7cddb9e
Add navigator title tests for external links in the navigator
anferbui 04867f1
Rename `fullName` to `plainTextDeclaration` in LinkDestinationSummary
anferbui fbc7a8a
Rename to `subheadingDeclarationFragments` for clarity
anferbui 56672da
Rename `navigatorTitle` to `navigatorDeclarationFragments`
anferbui 427e27c
Rename helper function for readability
anferbui edd24c2
Fix minor issue in comment
anferbui File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: since this is for the navigator, should it return the navigator title?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's meant to return the subheading declaration fragments AFAICT -- for internal links in the navigator, we store this information:
swift-docc/Sources/SwiftDocC/Indexing/Navigator/RenderNode+NavigatorIndex.swift
Lines 71 to 76 in 257c62d
Where this type is wrapping
RenderMetadata
and these fragments are derived from the symbol subheading fragments:swift-docc/Sources/SwiftDocC/Model/Rendering/RenderNode/RenderMetadata.swift
Lines 124 to 131 in 257c62d
swift-docc/Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift
Line 1305 in 257c62d
And then finally there's some logic when deriving the final navigator title, to choose to use either the subheading fragments or the navigator fragments:
swift-docc/Sources/SwiftDocC/Indexing/Navigator/RenderNode+NavigatorIndex.swift
Lines 141 to 157 in 257c62d