Skip to content

Conversation

@krystian-panek-vmltech
Copy link
Collaborator

@krystian-panek-vmltech krystian-panek-vmltech commented Nov 21, 2025

fixes #234

@krystian-panek-vmltech krystian-panek-vmltech changed the title Code metadata Executable metadata Nov 21, 2025
@krystian-panek-vmltech krystian-panek-vmltech added this to the 1.0.0 milestone Nov 21, 2025
@krystian-panek-vmltech krystian-panek-vmltech marked this pull request as ready for review November 21, 2025 11:27
Copilot finished reviewing on behalf of krystian-panek-vmltech November 21, 2025 11:31
Copy link
Contributor

Copilot AI left a 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 ExecutableMetadata type 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.

@krystian-panek-vmltech krystian-panek-vmltech merged commit 0412127 into main Nov 21, 2025
1 check passed
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.

Add script description in GUI

2 participants