Skip to content

Simplify canvas widgets placement at one or multiple specific layers#77

Merged
AlexeyMz merged 1 commit into
masterfrom
straightforward-widgets
Oct 23, 2025
Merged

Simplify canvas widgets placement at one or multiple specific layers#77
AlexeyMz merged 1 commit into
masterfrom
straightforward-widgets

Conversation

@AlexeyMz
Copy link
Copy Markdown
Member

@AlexeyMz AlexeyMz commented Oct 22, 2025

  • Add CanvasPlaceAt component to render a widget at specified non-viewport canvas layer;
    • Now it is possible to place widgets at underlay and overLinkGeometry layers;
  • Add changeTransform event to CanvasApi.events which triggers on CanvasApi.metrics.getTransform() changes;
  • Add --reactodia-z-index-base CSS property to override base z-index level for workspace components with a z-index set;
  • Fix HaloLink and visual authoring path highlight being rendered on top on elements by placing it onto overLinkGeometry layer;
  • Deprecate canvasWidgets prop on DefaultWorkspace and ClassicWorkspace in favor of passing widgets directly as children;
  • [Breaking] Remove defineCanvasWidget() and SharedCanvasState.setCanvasWidget():
    • Canvas children are always assumed to be viewport widgets;
    • Use child CanvasPlaceAt components to render different parts at other layers instead.
  • [Breaking] Canvas widgets are not re-rendered when parent canvas is rendered and require explicit subscriptions:
    • Subscribe to canvas changeTransform event when using CanvasApi.metrics to convert between coordinates;
    • Subscribe to canvas resize event to track viewport size;
    • Subscribe to changeCells event from DiagramModel to track graph content changes.

@AlexeyMz AlexeyMz force-pushed the straightforward-widgets branch 4 times, most recently from 8ede9f6 to 133bb04 Compare October 22, 2025 23:14
@AlexeyMz AlexeyMz changed the title Make canvas widgets definition and usage simple and straightforward Simplify canvas widgets placement at one or multiple specific layers Oct 22, 2025
@AlexeyMz AlexeyMz force-pushed the straightforward-widgets branch from 133bb04 to 2126ce6 Compare October 22, 2025 23:21
* Add `CanvasPlaceAt` component to render a widget at specified non-viewport canvas layer;
  - Now it is possible to place widgets at `underlay` and `overLinkGeometry` layers;
* Add `changeTransform` event to `CanvasApi.events` which triggers on `CanvasApi.metrics.getTransform()` changes;
* Add `--reactodia-z-index-base` CSS property to override base z-index level for workspace components with a `z-index` set;
* Fix `HaloLink` and visual authoring path highlight being rendered on top on elements by placing it onto `overLinkGeometry` layer;
* Deprecate `canvasWidgets` prop on `DefaultWorkspace` and `ClassicWorkspace` in favor of passing widgets directly as children;
* **[Breaking]** Remove `defineCanvasWidget()` and `SharedCanvasState.setCanvasWidget()`:
  - Canvas children are always assumed to be viewport widgets;
  - Use child `CanvasPlaceAt` components to render different parts at other layers instead.
* **[Breaking]** Canvas widgets are not re-rendered when parent canvas is rendered and require explicit subscriptions:
  - Subscribe to canvas `changeTransform` event when using `CanvasApi.metrics` to convert between coordinates;
  - Subscribe to canvas `resize` event to track viewport size;
  - Subscribe to `changeCells` event from `DiagramModel` to track graph content changes.
@AlexeyMz AlexeyMz force-pushed the straightforward-widgets branch from 2126ce6 to 2cedb44 Compare October 23, 2025 20:21
@AlexeyMz AlexeyMz merged commit 5c5b260 into master Oct 23, 2025
4 checks passed
@AlexeyMz AlexeyMz deleted the straightforward-widgets branch October 23, 2025 20:22
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