Skip to content

feat(ui-concerto-editor): add graphical editor for Concerto data models#449

Merged
mttrbrts merged 3 commits into
accordproject:mainfrom
soniaduma:feat/concerto-parser-integration
May 18, 2026
Merged

feat(ui-concerto-editor): add graphical editor for Concerto data models#449
mttrbrts merged 3 commits into
accordproject:mainfrom
soniaduma:feat/concerto-parser-integration

Conversation

@soniaduma
Copy link
Copy Markdown
Contributor

@soniaduma soniaduma commented May 4, 2026

Summary

Adds a new @accordproject/ui-concerto-editor package providing a graphical (visual) editor for Concerto data models using React Flow (@xyflow/react).

  • Visual model editing — drag-and-drop canvas with concept, enum, map, and scalar nodes
  • Bi-directional sync — changes in the graphical editor update the CTO text and vice versa
  • Relationship/inheritance wiring — drag edges between nodes to add properties, relationships, or extends declarations
  • Undo/redo — Ctrl+Z / Ctrl+Y / Ctrl+Shift+Z keyboard shortcuts with full history
  • Import/export — toolbar actions to bring in or export CTO text

Changes

  • packages/ui-concerto-editor/ — new package: React Flow-based graphical editor components
  • Fix TypeScript errors: useNodesState/useEdgesState explicit type parameters (Node[]/Edge[])
  • Remove deprecated enableMapType option (enabled by default in concerto-core v4)
  • Upgrade @accordproject/concerto-core and concerto-cto from ^3.x to ^4.1.0
  • Upgrade @xyflow/react from ^12.0.0 to ^12.10.2
  • Upgrade vite-plugin-node-polyfills to ^0.26.0, align @types/react* to ^18.3.0

Flags

  • The new package uses Vite for its own build, separate from the Lerna/Rollup pipeline used by other packages
  • Bundle size is large (~1.5 MB minified) due to React Flow — code-splitting is a future improvement

Related Issues

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 master from fork:branchname
  • Manual accessibility test performed
    • Keyboard-only access, including forms
    • Contrast at least WCAG Level A
    • Appropriate labels, alt text, and instructions

@soniaduma soniaduma changed the title Feat/concerto parser integration (WIP) Feat/concerto parser integration May 4, 2026
@soniaduma soniaduma changed the title (WIP) Feat/concerto parser integration (WIP) Feat/concerto graphical editor May 4, 2026
@soniaduma soniaduma force-pushed the feat/concerto-parser-integration branch from d0cfbd8 to 1b5c0ae Compare May 4, 2026 22:11
@soniaduma soniaduma marked this pull request as ready for review May 5, 2026 16:11
@mttrbrts
Copy link
Copy Markdown
Member

mttrbrts commented May 9, 2026

Thank you for the contribution @soniaduma. Can you fix the DCO sign-off for your commits, please?

@mttrbrts mttrbrts changed the title (WIP) Feat/concerto graphical editor feat(ui-concerto-editor): add graphical editor for Concerto data models May 9, 2026
@mttrbrts mttrbrts force-pushed the feat/concerto-parser-integration branch from e6d532a to 3c6e6d7 Compare May 9, 2026 19:31
@mttrbrts mttrbrts closed this May 9, 2026
@mttrbrts mttrbrts reopened this May 9, 2026
soniaduma and others added 3 commits May 10, 2026 11:47
Add new package `ui-concerto-editor` — a React Flow-based visual editor
for Concerto data models. Supports visual editing of concepts, enums,
scalars, and map declarations with drag-and-drop, inline property editing,
and bidirectional CTO ↔ graph synchronization using the official
Concerto Parser/Printer.

Signed-off-by: Sonia Duma <nicoladuma31@gmail.com>
Signed-off-by: Sonia Duma <nicoladuma31@gmail.com>
- Fix useNodesState/useEdgesState to use explicit Node/Edge type params
  so TypeScript infers the correct types instead of never[]
- Remove enableMapType option from ModelManager (removed in concerto-core v4,
  map types are now enabled by default)
- Upgrade @accordproject/concerto-core and concerto-cto from ^3.25.7 to ^4.1.0
- Upgrade @xyflow/react from ^12.0.0 to ^12.10.2
- Upgrade vite-plugin-node-polyfills from ^0.22.0 to ^0.26.0
- Align @types/react and @types/react-dom to ^18.3.0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Matt Roberts <code@rbrts.uk>
Signed-off-by: Sonia Duma <nicoladuma31@gmail.com>
@soniaduma soniaduma force-pushed the feat/concerto-parser-integration branch from 3c6e6d7 to ad0399e Compare May 10, 2026 08:48
@soniaduma
Copy link
Copy Markdown
Contributor Author

Thank you for the contribution @soniaduma. Can you fix the DCO sign-off for your commits, please?

Done, thanks!

@mttrbrts mttrbrts closed this May 18, 2026
@mttrbrts mttrbrts reopened this May 18, 2026
@mttrbrts mttrbrts merged commit f04b5ca into accordproject:main May 18, 2026
1 of 5 checks 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.

2 participants