Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 26, 2025

  • Explore repository structure and understand the existing codebase
  • Understand existing plugin documentation format (markdown tables for parameters and data)
  • Understand JSDoc structure in plugin source code (info.parameters and info.data objects with JSDoc comments)
  • Understand examples structure (examples/ folder at root, and some packages have examples/ subfolder)
  • Create documentation generator script that:
    • Parses JSDoc comments from plugin source files (info.parameters and info.data)
    • Extracts plugin description from class JSDoc comment
    • Extracts individual trial configurations from example files in /examples
    • Generates demo HTML files that can be embedded in documentation
    • Generates markdown with Code/Demo tabs matching existing documentation format
  • Add npm script to run documentation generation (npm run generate-plugin-docs)
  • Test documentation generation with plugins
  • Verify generated docs match expected format
  • Address code review feedback:
    • Extract pluginNameToVarName helper function to avoid duplication
    • Add comments explaining demo file dependencies
    • Improve nested object handling in trial extraction regex
  • Update developer documentation to describe enhanced example handling
Original prompt

make the documentation for plugins build automatically from the jsdoc strings and the examples in the examples folder within the package.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@changeset-bot
Copy link

changeset-bot bot commented Nov 26, 2025

⚠️ No Changeset found

Latest commit: 9e09ed9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI changed the title [WIP] Automate documentation generation from JSDoc and examples Add script to generate plugin documentation from JSDoc comments Nov 26, 2025
Copilot finished work on behalf of jodeleeuw November 26, 2025 21:33
Copilot AI requested a review from jodeleeuw November 26, 2025 21:33
${generateInstallSection(pluginName, version || "latest")}
`;

// Add examples section if examples exist
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to do more than this. Can we take files that are in /examples and convert them into the kinds of examples that are in the current documentation? This would allow us to not maintain two separate example sets.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Enhanced example handling in commit 9e09ed9. The script now:

  1. Extracts individual trial configurations from /examples files
  2. Generates interactive demo HTML files (using docs-demo-timeline.js wrapper)
  3. Creates markdown with ???+ example blocks containing Code/Demo tabs

Usage:

npm run generate-plugin-docs -- html-button-response --output docs/plugins --demos-output docs/demos

This eliminates maintaining two separate example sets - examples in /examples are automatically converted to the documentation format.

Copy link
Member

@jodeleeuw jodeleeuw left a comment

Choose a reason for hiding this comment

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

Let's enhance how examples are handled.

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