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

Apply the same style to all KDoc tags, including throws/see/parameters #2587

Merged
merged 3 commits into from
Aug 3, 2022

Conversation

IgnatBeresnev
Copy link
Member

See #2576

  • Now all KDoc tag sections should look the same, including throws/see/parameters

  • Decreased space between tag header and values

  • Fixed a problem where longer link text had many word breaks:

    • See/Throws link text is now just the class name (if DRI is resolved), full path if unresolved; previously always full path
    • Increased first column width for See/Throws/Parameters a bit.
    • (I have a complete JS script to dynamically adjust the width of the first column based on link width, will discuss it during sync and maybe file it as another PR)

Copy link
Member

@vmishenev vmishenev left a comment

Choose a reason for hiding this comment

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

Before:
image
After (there is space after Return):
image

@@ -537,7 537,7 @@ open class DefaultPageCreator(
val params = tags.withTypeNamed<Param>()
val availablePlatforms = params.values.flatMap { it.keys }.toSet()

header(2, "Parameters", kind = ContentKind.Parameters, sourceSets = availablePlatforms)
header(4, "Parameters", kind = ContentKind.Parameters, sourceSets = availablePlatforms)
Copy link
Member

Choose a reason for hiding this comment

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

I think it is better to make a constant to avoid magic number.

@@ -555,7 555,9 @@ open class DefaultPageCreator(
kind = ContentKind.Parameters,
styles = mainStyles ContentStyle.RowTitle
)
comment(it.root)
if (it.root.children.isNotEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

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

I would create a helper like TagWrapper.isEmpty() = children.isEmpty() (Law of Demeter)

@IgnatBeresnev
Copy link
Member Author

After (there is space after Return)

I've fixed Since Kotlin block, totally forgot about that 👍 but I don't understand what's wrong with Return

@IgnatBeresnev IgnatBeresnev merged commit 3994c42 into master Aug 3, 2022
@IgnatBeresnev IgnatBeresnev deleted the same-style-tags branch August 3, 2022 11:51
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.

2 participants