-
Notifications
You must be signed in to change notification settings - Fork 417
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
Add a distinct divider between function overloads #2585
Conversation
private val String.isAbsolute: Boolean | ||
get() = URI(this).isAbsolute | ||
|
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.
Unused
@@ -321,6 +313,40 @@ open class HtmlRenderer( | |||
} | |||
} | |||
|
|||
private fun groupDivergentInstancesWithSourceSet( |
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.
This made buildDivergent
considerably longer, even though this particular function needed no context from it and shared nothing in common, so I don't see a reason why it has to be a nested function.
Extracted for the sake of readability of buildDivergent
Proposing to go with this solution as it adds no new public API, so it will be easy to remove when the page is redesigned, which is just a matter of time. I'll post the final result to #kotlin-libs and ask for feedback. If this version is not liked for some reason, it can be changed before release |
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.
- https://dokka-snapshots.s3.eu-central-1.amazonaws.com/fuction-overloads-dinstinct/serialization/8779f50/kotlinx-serialization-core/kotlinx.serialization.builtins/serializer.html
There are not overloads. - Regression: There is extra space in a declaration list. It requires a check
node.dci.kind == ContentKind.Main
that it is removed in this PR.
Not sure what you mean. These are different functions with different description, but with the same function name, so for me it makes an overload 🤔 Fixed the problem with |
Sorry( I wrote a wrong sentence (and a link). For https://dokka-snapshots.s3.eu-central-1.amazonaws.com/fuction-overloads-dinstinct/stdlib/4ce210b/kotlin-stdlib/kotlin.collections/indices.html, that has several extension properties, it does not have a divider. |
Silly me, for some reason I thought class named Previously there was a check that it was only functions, changed it to accept all members, so both functions and properties. Should be OK now |
888676a
to
9a214de
Compare
After some discussion, we decided to drop "Overload" header and just stick with a simple horizontal line Updated the PR, @vmishenev please have a look |
By far not the best solution, but I found no other reliable way to add a divider for function overloads especially considering different sourcesets. This adds no new public API, so I think it's not a big deal - will probably have to redesign this down the road anyway.
See #2576
For function overloads with some description
For function overloads with the same description