Skip to content

feat(concerto): add one-click Concerto model formatter in editor header#830

Open
hemantch01 wants to merge 5 commits intoaccordproject:mainfrom
hemantch01:feat/add_concerto_formatter
Open

feat(concerto): add one-click Concerto model formatter in editor header#830
hemantch01 wants to merge 5 commits intoaccordproject:mainfrom
hemantch01:feat/add_concerto_formatter

Conversation

@hemantch01
Copy link
Copy Markdown

Closes #829

Adds a Concerto formatting action to the Playground so users can canonicalize CTO models with one click, similar to the existing JSON formatting experience.

Changes

  • Added formatConcertoModel(cto: string) utility using @accordproject/concerto-cto parser/printer pipeline.
  • Added ConcertoFormatButton in the Concerto Model header and wired action to:
    • format current editorModelCto
    • update both setEditorModelCto and setModelCto
    • show toast on invalid CTO without mutating editor state.
  • Added direct dependency declaration for @accordproject/concerto-cto.
  • Added tests:
    • utility tests for valid format, idempotence, and invalid CTO throw
    • component tests for success path and invalid CTO no-op + error toast.

Screenshots or Video

Screenshot 2026-03-17 225236

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

Signed-off-by: hemantch01 <hemantchaudhary905@gmail.com>
Signed-off-by: hemantch01 <hemantchaudhary905@gmail.com>
Signed-off-by: hemantch01 <hemantchaudhary905@gmail.com>
Signed-off-by: hemantch01 <hemantchaudhary905@gmail.com>
@hemantch01 hemantch01 requested a review from a team as a code owner March 17, 2026 17:26
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 17, 2026

Deploy Preview for ap-template-playground ready!

Name Link
🔨 Latest commit fdb76f9
🔍 Latest deploy log https://app.netlify.com/projects/ap-template-playground/deploys/69b98f093b53bb0007920404
😎 Deploy Preview https://deploy-preview-830--ap-template-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

This PR is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Apr 2, 2026
@hemantch01
Copy link
Copy Markdown
Author

@sanketshevkar any feedback??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add "Format Concerto" action in Concerto Model editor

1 participant