-
Notifications
You must be signed in to change notification settings - Fork 3
Executable metadata #275
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
Executable metadata #275
Conversation
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.
Pull Request Overview
This PR introduces executable metadata support to the AEM Content Manager, allowing Groovy scripts to be documented using JavaDoc/GroovyDoc comment blocks. The metadata is parsed from script files and displayed in the UI, providing better documentation and script information visibility.
- Adds
ExecutableMetadatatype and parser to extract metadata from JavaDoc/GroovyDoc comments - Updates the UI to display metadata, inputs, and outputs in dedicated info cards with improved layout
- Refactors example scripts to use standardized metadata format with placeholder author information
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
ui.frontend/src/types/executable.ts |
Adds ExecutableMetadata type definition as a record of strings or string arrays |
ui.frontend/src/types/script.ts |
Refactors Script type to extend Executable, inheriting id, content, and metadata fields |
ui.frontend/src/pages/ScriptView.tsx |
Updates script details view to use InfoCard components and display metadata |
ui.frontend/src/pages/ExecutionView.tsx |
Restructures execution view with InfoCard layout, adds metadata display and new component imports |
ui.frontend/src/components/markdown.module.css |
Extends margin reset styles to include ol and ul elements for consistent list rendering |
ui.frontend/src/components/InfoCard.tsx |
New reusable component for consistent styling of information panels |
ui.frontend/src/components/Footer.tsx |
Updates image imports to use Vite module imports instead of hardcoded paths |
ui.frontend/src/components/ExecutionOutputs.tsx |
New component displaying execution outputs with contextual help for documentation |
ui.frontend/src/components/ExecutionInputs.tsx |
New component displaying execution inputs with contextual help for defining inputs |
ui.frontend/src/components/ExecutableMetadata.tsx |
New component for rendering executable metadata with support for arrays and contextual help |
ui.content.example/.../ACME-203_output-xls.groovy |
Adds metadata comment block and reorders methods (metadata, describeRun, canRun, doRun) |
ui.content.example/.../ACME-203_output-csv.groovy |
Adds metadata comment block with description and author, reorders methods |
ui.content.example/.../ACME-202_page-thumbnail.groovy |
Updates author information from real name to placeholder email, removes trailing blank line |
ui.content.example/.../ACME-201_inputs.groovy |
Simplifies description and updates author to placeholder email |
ui.content.example/.../ACME-200_hello-world.groovy |
Simplifies description and updates author to placeholder email |
ui.content.example/.../ACM-1_classes_rtjar.groovy |
Updates author to placeholder email |
ui.content.example/.../ACM-1_classes_jms.groovy |
Updates author to placeholder email |
ui.content.example/.../ACME-100_acl.groovy |
Adds comprehensive metadata comment block describing script purpose and functionality |
core/.../CodeMetadataTest.java |
New test class for metadata parsing with tests for various script formats |
core/.../Script.java |
Adds getMetadata() implementation returning parsed CodeMetadata |
core/.../Executable.java |
Adds getMetadata() method to interface and removes throws clause from getContent() |
core/.../CodeMetadata.java |
New class implementing JavaDoc/GroovyDoc comment parsing with regex-based extraction |
core/.../Code.java |
Adds getMetadata() implementation and updates comment to clarify it represents console code |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fixes #234