-
Notifications
You must be signed in to change notification settings - Fork 60
don't display declaration platforms if they're all the same #717
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
hqhhuang
merged 7 commits into
swiftlang:main
from
QuietMisdreavus:multiple-decl-same-platform
Jul 24, 2024
Merged
don't display declaration platforms if they're all the same #717
hqhhuang
merged 7 commits into
swiftlang:main
from
QuietMisdreavus:multiple-decl-same-platform
Jul 24, 2024
Conversation
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
2 tasks
@swift-ci Please test |
fix test after rebasing
…vus/swift-docc-render into pr/717
add spacing between 2 declaration lists
@swift-ci test |
I rebased this PR to latest main and updated it to work with the current |
mportiz08
reviewed
Jul 10, 2024
src/components/DocumentationTopic/PrimaryContent/Declaration.vue
Outdated
Show resolved
Hide resolved
marinaaisa
approved these changes
Jul 23, 2024
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.
I cleaned up a bit of the code here 969fa50 but everything else looks good to me!
Thank you!
@swift-ci test |
hqhhuang
added a commit
to hqhhuang/swift-docc-render
that referenced
this pull request
Jul 24, 2024
…g#717) rdar://130985928 don't display declaration platforms if they're all the same (swiftlang#717) rdar://130985928 --------- Co-authored-by: Hanqing Huang <[email protected]> Co-authored-by: Marina Aísa <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bug/issue #, if applicable: rdar://130985928
Summary
This is an experiment to accompany swiftlang/swift-docc#654 - That PR and its SymbolKit dependency change the Declarations section to potentially include multiple declarations from the same platform. This PR updates the Declaration component to drop the platform caption if all the declaration groups have the same platform sets.
Before this change, this is what this situation would look like:
With this PR, the symbol looks like this: (this screenshot is using a local Swift-DocC-Render build on my machine, but the above screenshot is using the Swift-DocC-Render that shipped with Xcode 14.3.1, which hopefully explains the padding and heading differences)
Dependencies
This can land without it, but it's only useful with swiftlang/swift-docc#654.
Testing
Use the branch from swiftlang/swift-docc#654, then, in the Swift-DocC repo:
Steps:
DOCC_HTML_DIR=/path/to/swift-docc-render/dist swift run docc preview 'Tests/SwiftDocCTests/Test Bundles/AlternateDeclarations.docc'
MyClass/present(completion:)
page doesn't print the "macOS" caption on its declarations.Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
npm test
, and it succeeded