Skip to content

Support diagram-only annotation elements and links#82

Merged
AlexeyMz merged 1 commit into
masterfrom
annotation-cells
Oct 31, 2025
Merged

Support diagram-only annotation elements and links#82
AlexeyMz merged 1 commit into
masterfrom
annotation-cells

Conversation

@AlexeyMz
Copy link
Copy Markdown
Member

  • Add AnnotationElement and AnnotationLink diagram cell types representing diagram-only elements and links which exports and imports with the diagram but does not exists in the data graph:
    • Support annotation elements in SelectionActionEstablishLink and new SelectionActionAnnotate components;
    • Support annotation links in LinkActionDelete, LinkActionMoveEndpoint components.
  • Display and edit annotations with new built-in templates NoteTemplate and NoteLinkTemplate which use NoteAnnotation, NoteEntity and NoteLink template components:
    • Change defaultElementTemplate to defaultElementResolver, defaultLinkTemplate to defaultLinkResolver in SharedCanvasState to support new default fallbacks.
  • Add AnnotationContent and ColorVariant element template state properties to support editable annotations:
    • Support ColorVariant template state property as default fallback for non-entity elements in typeStyleResolver.
  • Support user-resizable element templates with ElementSize template state property and ElementTemplate.resizable flag:
    • Resizable elements display "box with handles" in the Halo to change the size;
    • Changed element sizes are captured and restored by RestoreGeometry command;
    • Add setTemplateProperty() utility function to easily set or unset template state property.
  • Add TemplateProps.onlySelected flag to use in the element templates to track if the element is the only one selected without performance penalty.
  • Make Halo margin configurable via CSS property --reactodia-selection-single-box-margin.
  • Highlight link path in HaloLink with --reactodia-selection-link-color color by default.
  • Fix DraggableHandle to avoid using stale onDragHandle and onEndDragHandle prop values.
  • Refactor various places to support annotations:
    • Extract internal DragLinkMover as a utility component to use as base for DragEditLayer and AnnotationLinkMover;
    • Add internal ContentEditablePlaintext utility component;
    • Add internal ResizableBox utility component;
  • Use small subset of carbon design icons for various buttons.

@AlexeyMz AlexeyMz force-pushed the annotation-cells branch 2 times, most recently from 591a21b to 7430ee8 Compare October 31, 2025 21:12
* Add `AnnotationElement` and `AnnotationLink` diagram cell types representing diagram-only elements and links which exports and imports with the diagram but does not exists in the data graph:
  - Support annotation elements in `SelectionActionEstablishLink` and new `SelectionActionAnnotate` components;
  - Support annotation links in `LinkActionDelete`, `LinkActionMoveEndpoint` components.
* Display and edit annotations with new built-in templates `NoteTemplate` and `NoteLinkTemplate` which use `NoteAnnotation`, `NoteEntity` and `NoteLink` template components:
  - Change `defaultElementTemplate` to `defaultElementResolver`, `defaultLinkTemplate` to `defaultLinkResolver` in `SharedCanvasState` to support new default fallbacks.
* Add `AnnotationContent` and `ColorVariant` element template state properties to support editable annotations:
  - Support `ColorVariant` template state property as default fallback for non-entity elements in `typeStyleResolver`.
* Support user-resizable element templates with `ElementSize` template state property:
  - Resizable elements display "box with handles" in the `Halo` to change the size;
  - Changed element sizes are captured and restored by `RestoreGeometry` command;
  - Add `setTemplateProperty()` utility function to easily set or unset template state property.
* Add `ElementTemplate.supports` property to tell template capabilities such as ability to expand/collapse or resized by user.
* Add `TemplateProps.onlySelected` flag to use in the element templates to track if the element is the only one selected without performance penalty.
* Make `Halo` margin configurable via CSS property `--reactodia-selection-single-box-margin`.
* Highlight link path in `HaloLink` with `--reactodia-selection-link-color` color by default.
* Fix `DraggableHandle` to avoid using stale `onDragHandle` and `onEndDragHandle` prop values.
* Refactor various places to support annotations:
  - Extract internal `DragLinkMover` as a utility component to use as base for `DragEditLayer` and `AnnotationLinkMover`;
  - Add internal `ContentEditablePlaintext` utility component;
  - Add internal `ResizableBox` utility component;
* Use small subset of [carbon design icons](https://github.com/carbon-design-system/carbon-icons) for various buttons.
@AlexeyMz AlexeyMz merged commit 10d034e into master Oct 31, 2025
4 checks passed
@AlexeyMz AlexeyMz deleted the annotation-cells branch October 31, 2025 21:14
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