Skip to content

feat(template-editor): add new template editing component#436

Draft
mttrbrts wants to merge 2 commits intomainfrom
mr-reset
Draft

feat(template-editor): add new template editing component#436
mttrbrts wants to merge 2 commits intomainfrom
mr-reset

Conversation

@mttrbrts
Copy link
Member

@mttrbrts mttrbrts commented Mar 13, 2026

Summary

  • Removes four deprecated packages (ui-components, ui-contract-editor, ui-markdown-editor, storybook) that were based on Slate.js and had fallen out of active maintenance
  • Adds @accordproject/ui-tiptap-template-editor — a new TypeScript-first template editor built on TipTap v2 / ProseMirror, covering all TemplateMark node types
  • Adds ui-tiptap-template-editor-demo — a Vite + React playground for local development of the editor
  • Updates ui-concerto dependencies and test snapshots to work in the slimmed-down monorepo
  • Cleans up root package.json, removes lerna.json, and updates CI workflows to reflect the new package structure

Key changes

Area Detail
New editor packages/ui-tiptap-template-editor — extensions for all TemplateMark nodes (Variable, Formula, Clause, Conditional, Optional, ListBlock, Foreach, …), serializer round-trips, validation
via TemplateMarkTransformer, modelManager prop for external Concerto models
Demo app packages/ui-tiptap-template-editor-demo — NDA and Services Agreement fixtures, JSON panel, hot-reload alias to editor source
Removed packages ui-components, ui-contract-editor, ui-markdown-editor, storybook — all deleted
CSS bundling postcss-import added to rollup config so @import directives in CSS are inlined at build time (fixes CSS variable injection in downstream consumers)
CI build-and-deploy.yml removed (storybook deploy); build.yml and publish.yml updated for the new package

Test plan

  • cd packages/ui-tiptap-template-editor && npm run build — clean build
  • cd packages/ui-tiptap-template-editor && npm test — serializer round-trip tests pass
  • cd packages/ui-tiptap-template-editor-demo && npm run dev — demo loads at localhost:5174, NDA and Services Agreement templates both validate correctly
  • cd packages/ui-concerto && npm test — existing concerto form tests still pass

Screenshots or Video

Kapture.2026-03-13.at.09.44.37.mp4

Related Issues

  • Issue #
  • Pull Request #

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

Signed-off-by: Matt Roberts <code@rbrts.uk>
Signed-off-by: Matt Roberts <code@rbrts.uk>
@mttrbrts mttrbrts changed the title wip feat(template-editor): add new template editing component Mar 18, 2026
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.

1 participant