Skip to content

Add support for detailed plugin descriptions#11935

Merged
mnonnenmacher merged 7 commits into
mainfrom
plugin-descriptions
Jun 3, 2026
Merged

Add support for detailed plugin descriptions#11935
mnonnenmacher merged 7 commits into
mainfrom
plugin-descriptions

Conversation

@mnonnenmacher
Copy link
Copy Markdown
Member

Rename the description property of @OrtPlugin to summary to emphasize that it is a short description. Using it for detailed descriptions is not convenient, because annotation properties must be compile time constants. Instead, take the detailed description from the KDoc of the plugin class, similar to how it is done for plugin options.

Also show the detailed descriptions on the website and apply some trivial improvements to the existing plugin KDocs to improve how they are shown on the website. Generally improving the plugin docs is out of scope for this PR.

See the commit messages for details.

Example for the OrtProject package manager plugin:

image

Rename the `description` property of the `OrtPlugin` annotation and the
`PluginDescriptor` to `summary` as it captures only a short description
of the plugin. Using it for longer descriptions is inconvenient because
it is taken from a property of the `OrtPlugin` annotation which must be
a compile time constant.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.io>
Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.io>
Similar to the description of plugin options, the value is taken from
the KDoc of the plugin class. This allows to use it for longer
descriptions containing Markdown.

The property is optional, as not all plugins require a detailed
description.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.io>
@mnonnenmacher mnonnenmacher force-pushed the plugin-descriptions branch from 9698fb0 to ad357d0 Compare June 3, 2026 10:01
id = pluginId,
displayName = ortPlugin.displayName,
summary = ortPlugin.summary,
description = pluginClass.docString?.trim(),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this trimmed whereas summary is not?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because it's coming from a different source, the doc string for option descriptions is also trimmed.

Comment thread buildSrc/src/main/kotlin/GeneratePluginDocsTask.kt Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.43%. Comparing base (2adf5e4) to head (796efaa).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #11935   +/-   ##
=========================================
  Coverage     58.43%   58.43%           
- Complexity     1807     1809    +2     
=========================================
  Files           361      361           
  Lines         13499    13499           
  Branches       1383     1383           
=========================================
  Hits           7888     7888           
  Misses         5115     5115           
  Partials        496      496           
Flag Coverage Δ
funTest-external-tools 14.64% <ø> (ø)
funTest-no-external-tools 30.37% <ø> (+0.08%) ⬆️
test-ubuntu-24.04 41.78% <ø> (ø)
test-windows-2025 41.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Also emphasize the plugin summaries to visually separate them from the
descriptions.

As the plugin descriptions are taken from the KDoc of the plugin
classes, replace any KDoc symbol links with inline code blocks.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.io>
Also document the requirements to ensure descriptions are nicely
rendered on the website.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.io>
Apply some trivial improvements to ensure that the plugins docs are
rendered nicely on the website. This mainly consists of fixing links.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.io>
As detailed descriptions of plugins are now supported and automatically
added to the website, move the docs of the `OrtProject` package manager
to the plugin itself.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.io>
@mnonnenmacher mnonnenmacher enabled auto-merge (rebase) June 3, 2026 10:56
@mnonnenmacher mnonnenmacher merged commit 4673835 into main Jun 3, 2026
38 of 40 checks passed
@mnonnenmacher mnonnenmacher deleted the plugin-descriptions branch June 3, 2026 14:06
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.

3 participants