-
Notifications
You must be signed in to change notification settings - Fork 60
Highlight unique components of overloaded declarations #841
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
Highlight unique components of overloaded declarations #841
Conversation
…nents-of-overloaded-declarations
@swift-ci test |
…nents-of-overloaded-declarations
Marking this as a draft, because it sounds like the swift-docc design for the Render JSON may change |
…nents-of-overloaded-declarations
</template> | ||
|
||
<script> | ||
export default { name: 'Highlighted' }; |
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.
Maybe in the future we can reuse this component for other highlighting context like codeListing to unify all these logics in some way. I know it doesn't look easy
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.
Tested and it works great!
Re-opening this, because it sounds like we're going to actually go with this approach for now and later make the change to what is in #847 😅 |
@swift-ci test |
Resolves: rdar://128997251 Co-authored-by: Vera Mitchell <[email protected]>
Resolves: rdar://128997251 Co-authored-by: Vera Mitchell <[email protected]>
Bug/issue #, if applicable: 117503463
Summary
Adds support for highlighting the unique components of overloaded declarations through a new, recursive declaration token component. These highlighted tokens will only be visually rendered when a group of overloaded symbols have been expanded by the user.
Example
Here, the highlights emphasize that this function is overloaded by the type of its only parameter.
Dependencies
swift-docc
: Highlight declaration differences in overloaded symbol groups #928Testing
Steps:
npm run build
swift-docc
from this PR and runswift build
DOCC_HTML_DIR=/path/to/swift-docc-render/dist swift run docc preview --enable-experimental-overloaded-symbol-presentation Tests/SwiftDocCTests/Test\ Bundles/OverloadedSymbols.docc
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
npm test
, and it succeeded\cc @QuietMisdreavus