Skip to content
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

Move inheritors, params, see also and samples tabs to description for classlikes #2749

Merged
merged 10 commits into from Jan 9, 2023

Conversation

atyrin
Copy link
Contributor

@atyrin atyrin commented Nov 16, 2022

Migrate params, seealso, samples, and inheritors to the description

  • remove contentForComments API, those tags will be handled in the contentForDescription
  • change API for contentForScopes: remove inheritors parameter in the method
  • remove inheritors from the package list: I didn't find a way to show them there. mat be something with markdown but I don't see a reason to keep that.

Fix #2688

* remove contentForComments api, tag parameters are now edited in the contentForDescription
* add contentForInheritors api
* change api for contentForScopes: remove inheritors param
* remove inheritors from package list
* wrong style
* missed inheritors in different platform
* duplication for mergeImplicitActuals
@atyrin
Copy link
Contributor Author

atyrin commented Nov 22, 2022

There is still an issue with the case:

mergeImplicitExpectActualDeclarations=true

// jvm
open class A
class J1 : A()

// linuxX64
open class A
class L1 : A()

But seems it has to be addressed on the site where the inheritors list is combined.

image

@atyrin
Copy link
Contributor Author

atyrin commented Nov 24, 2022

UPD: Fixed

@atyrin atyrin requested a review from vmishenev December 7, 2022 16:58
header(KDOC_TAG_HEADER_LEVEL, "Samples", kind = ContentKind.Sample, sourceSets = availableSourceSets)
availableSourceSets.forEach { sourceSet ->
group(
sourceSets = setOf(sourceSet),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sourceSets = availableSourceSets?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, for MPP all samples will be shown on each platform tab

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least the behavior is preserved as it was before. So no performance degradation is expected in this area.

Copy link
Member

@IgnatBeresnev IgnatBeresnev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done — especially on the number of tests! :) And thanks for the PR and in-code comments, they made it easier to understand changes, corner cases and made review easier overall 👍

The only comment I didn't understand was the following:

remove inheritors from the package list

Which package list do you mean? Could you share an example of before/after, if it's still relevant?

@atyrin
Copy link
Contributor Author

atyrin commented Dec 15, 2022

@IgnatBeresnev

The only comment I didn't understand was the following:

remove inheritors from the package list

Which package list do you mean? Could you share an example of before/after, if it's still relevant?

I've meant this change: https://github.com/Kotlin/dokka/pull/2749/files#diff-393cd6c01196a89045f20b4a981cf4c5b5ac45cec583c8bc2fb41ea0e9fa1765R267
This precise contentForScope is used in contentForPackage. I removed all attempts here to show inheritors. For classlikes it moved to description. And for packages just removed.

* switch collections from nullability to empty
* add a little documentation
* move code around
Copy link
Member

@IgnatBeresnev IgnatBeresnev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍

@atyrin atyrin merged commit c3aa879 into master Jan 9, 2023
@IgnatBeresnev IgnatBeresnev deleted the tabs-to-description branch January 9, 2023 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move inheritors, params, see also and samples to main Classlike description
3 participants