Skip to content

Refactor Image node and tools to avoid saving image fallback on the state#1094

Merged
jesusmpc merged 23 commits into
mainfrom
improvement/GH-1089-refactor-image-node-and
Jun 18, 2026
Merged

Refactor Image node and tools to avoid saving image fallback on the state#1094
jesusmpc merged 23 commits into
mainfrom
improvement/GH-1089-refactor-image-node-and

Conversation

@jesusmpc

@jesusmpc jesusmpc commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Closes #1089

@jesusmpc jesusmpc self-assigned this Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

❗ ❗ ❗ This Pull Request will not trigger a Release

A Pull Request with no changes to the code/ folder will not trigger a release

@jesusmpc jesusmpc marked this pull request as ready for review June 3, 2026 11:07
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

❗ ❗ ❗ This Pull Request will not trigger a Release

A Pull Request with no changes to the code/ folder will not trigger a release

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-03

Added

  • #1080 [alpha] API to manipulate document state natively on server-side

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-03

Added

  • #1080 [alpha] API to manipulate document state natively on server-side

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-03

Added

  • #1080 [alpha] API to manipulate document state natively on server-side

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@jesusmpc

jesusmpc commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

/publish-snapshot

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 NPM snapshot published

  • Version: 5.0.0-SNAPSHOT.336.1
  • Tag: next
  • Auth: OIDC trusted publishing (provenance)

@jesusmpc

jesusmpc commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

/publish-snapshot

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-03

Added

  • #1080 [alpha] API to manipulate document state natively on server-side

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 NPM snapshot published

  • Version: 5.0.0-SNAPSHOT.338.1
  • Tag: next
  • Auth: OIDC trusted publishing (provenance)

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-03

Added

  • #1080 [alpha] API to manipulate document state natively on server-side

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-03

Added

  • #1080 [alpha] API to manipulate document state natively on server-side

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-03

Added

  • #1080 [alpha] API to manipulate document state natively on server-side

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@jesusmpc

jesusmpc commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

/publish-snapshot

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 NPM snapshot published

  • Version: 5.0.0-SNAPSHOT.342.1
  • Tag: next
  • Auth: OIDC trusted publishing (provenance)

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-03

Added

  • #1080 [alpha] API to manipulate document state natively on server-side

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@github-actions

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-16

Added

  • #1080 [alpha] API to manipulate document state natively on server-side

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

Fixed

  • #1088 Is not possible to draw a dot or very small line in the canvas using the brush tool
  • #1098 WeaveTextNode: textarea edit overlay misaligns due to hardcoded border offset and scrollHeight approximation

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@github-actions

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-16

Added

  • #1080 [alpha] API to manipulate document state natively on server-side
  • #1101 Add inline text labels to shape nodes (Rectangle and Ellipse)
  • #1104 Add Polygon Node and Polygon Drawing Tool with Label Support

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

Fixed

  • #1088 Is not possible to draw a dot or very small line in the canvas using the brush tool
  • #1098 WeaveTextNode: textarea edit overlay misaligns due to hardcoded border offset and scrollHeight approximation

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@jesusmpc

Copy link
Copy Markdown
Contributor Author

/publish-snapshot

@github-actions

Copy link
Copy Markdown

🚀 NPM snapshot published

  • Version: 5.0.0-SNAPSHOT.397.1
  • Tag: next
  • Auth: OIDC trusted publishing (provenance)

@github-actions

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-17

Added

  • #1039 Allow editing individual elements inside a group without ungrouping
  • #1080 [alpha] API to manipulate document state natively on server-side
  • #1101 Add inline text labels to shape nodes (Rectangle and Ellipse)
  • #1104 Add Polygon Node and Polygon Drawing Tool with Label Support

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

Fixed

  • #1088 Is not possible to draw a dot or very small line in the canvas using the brush tool
  • #1098 WeaveTextNode: textarea edit overlay misaligns due to hardcoded border offset and scrollHeight approximation

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@jesusmpc

Copy link
Copy Markdown
Contributor Author

/publish-snapshot

@github-actions

Copy link
Copy Markdown

🚀 NPM snapshot published

  • Version: 5.0.0-SNAPSHOT.403.1
  • Tag: next
  • Auth: OIDC trusted publishing (provenance)

@jesusmpc

Copy link
Copy Markdown
Contributor Author

/publish-snapshot

@github-actions

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-17

Added

  • #1039 Allow editing individual elements inside a group without ungrouping
  • #1080 [alpha] API to manipulate document state natively on server-side
  • #1101 Add inline text labels to shape nodes (Rectangle and Ellipse)
  • #1104 Add Polygon Node and Polygon Drawing Tool with Label Support
  • #1106 Add y-indexeddb client-side persistence to WeaveStoreAzureWebPubsub for optimistic initial render

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

Fixed

  • #1088 Is not possible to draw a dot or very small line in the canvas using the brush tool
  • #1098 WeaveTextNode: textarea edit overlay misaligns due to hardcoded border offset and scrollHeight approximation

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@github-actions

Copy link
Copy Markdown

🚀 NPM snapshot published

  • Version: 5.0.0-SNAPSHOT.409.1
  • Tag: next
  • Auth: OIDC trusted publishing (provenance)

@github-actions

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-18

Added

  • #1039 Allow editing individual elements inside a group without ungrouping
  • #1080 [alpha] API to manipulate document state natively on server-side
  • #1101 Add inline text labels to shape nodes (Rectangle and Ellipse)
  • #1104 Add Polygon Node and Polygon Drawing Tool with Label Support
  • #1106 Add y-indexeddb client-side persistence to WeaveStoreAzureWebPubsub for optimistic initial render

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

Fixed

  • #1088 Is not possible to draw a dot or very small line in the canvas using the brush tool
  • #1098 WeaveTextNode: textarea edit overlay misaligns due to hardcoded border offset and scrollHeight approximation

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@jesusmpc

Copy link
Copy Markdown
Contributor Author

/publish-snapshot

@github-actions

Copy link
Copy Markdown

❌ NPM snapshot publication failed

Please check the workflow logs for details.

@jesusmpc

Copy link
Copy Markdown
Contributor Author

/publish-snapshot

@github-actions

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-18

Added

  • #1039 Allow editing individual elements inside a group without ungrouping
  • #1080 [alpha] API to manipulate document state natively on server-side
  • #1101 Add inline text labels to shape nodes (Rectangle and Ellipse)
  • #1104 Add Polygon Node and Polygon Drawing Tool with Label Support
  • #1106 Add y-indexeddb client-side persistence to WeaveStoreAzureWebPubsub for optimistic initial render

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

Fixed

  • #1088 Is not possible to draw a dot or very small line in the canvas using the brush tool
  • #1098 WeaveTextNode: textarea edit overlay misaligns due to hardcoded border offset and scrollHeight approximation

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@github-actions

Copy link
Copy Markdown

🚀 NPM snapshot published

  • Version: 5.0.0-SNAPSHOT.413.1
  • Tag: next
  • Auth: OIDC trusted publishing (provenance)

@github-actions

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-18

Added

  • #1039 Allow editing individual elements inside a group without ungrouping
  • #1080 [alpha] API to manipulate document state natively on server-side
  • #1101 Add inline text labels to shape nodes (Rectangle and Ellipse)
  • #1104 Add Polygon Node and Polygon Drawing Tool with Label Support
  • #1106 Add y-indexeddb client-side persistence to WeaveStoreAzureWebPubsub for optimistic initial render

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

Fixed

  • #1088 Is not possible to draw a dot or very small line in the canvas using the brush tool
  • #1098 WeaveTextNode: textarea edit overlay misaligns due to hardcoded border offset and scrollHeight approximation

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

Add targeted unit tests for WeaveImageNode and WeaveNodesSnappingCustomGuides
to lift new-code coverage above the 80% SonarQube quality-gate threshold.

nodes-snapping.custom-guides.test.ts:
- deserialize() falsy/error branches
- initialize() with persistence.enabled=true (hook, metadata listener,
  window pointermove/keyup/keydown handlers)
- editCustomGuide/deleteCustomGuide with persist=true
- stagePanChangeHandler / zoomChangeHandler
- renderGuide() VERTICAL/HORIZONTAL, container-relative, static kind
- toggleCustomGuides on/off event wiring
- pointerClickHandler, arrowKeysHandler, deleteGuide branches
- createGuideNode event handlers via captured-handler pattern

image.test.ts:
- getImageFallbackId / saveImageFallback / cacheImageFallbackURL
  (imageFallback.enabled=true paths)
- isImageFallbackEnabled / getFallbackImageSource / getFallbackImageSourceURL
  / getImageSource getter helpers
- forceLoadFallbackImage (node found / not found)
- group.triggerCrop() / group.closeCrop() / group.resetCrop() callbacks
  assigned during onRender
- nodeDragStart / onCmdCtrlPressed / onCmdCtrlReleased early-return branches
  (utilityLayer null, isDragging, transformer null)
- onUpdate cropInfo / cropSize truthy branches and empty-imageURL path
- triggerCrop missing-image early return and show-callback body
- cropImageWithReference with nodeHandler (removeNodeNT path)
- updateNodeState with/without imageId

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-18

Added

  • #1039 Allow editing individual elements inside a group without ungrouping
  • #1080 [alpha] API to manipulate document state natively on server-side
  • #1101 Add inline text labels to shape nodes (Rectangle and Ellipse)
  • #1104 Add Polygon Node and Polygon Drawing Tool with Label Support
  • #1106 Add y-indexeddb client-side persistence to WeaveStoreAzureWebPubsub for optimistic initial render

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

Fixed

  • #1088 Is not possible to draw a dot or very small line in the canvas using the brush tool
  • #1098 WeaveTextNode: textarea edit overlay misaligns due to hardcoded border offset and scrollHeight approximation

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@github-actions

Copy link
Copy Markdown

🚀 Release Preview Success

You are going to release the version major with the following changes:

5.0.0 - 2026-06-18

Added

  • #1039 Allow editing individual elements inside a group without ungrouping
  • #1080 [alpha] API to manipulate document state natively on server-side
  • #1101 Add inline text labels to shape nodes (Rectangle and Ellipse)
  • #1104 Add Polygon Node and Polygon Drawing Tool with Label Support
  • #1106 Add y-indexeddb client-side persistence to WeaveStoreAzureWebPubsub for optimistic initial render

Changed

  • #1089 Refactor Image node and tools to avoid saving image fallback on the state
  • #1090 Remove usage of @syncedstore/core
  • #1091 Make Store Connection Lifecycle Asynchronous and Increase Azure Web PubSub Frame Size to 512 KB

Fixed

  • #1088 Is not possible to draw a dot or very small line in the canvas using the brush tool
  • #1098 WeaveTextNode: textarea edit overlay misaligns due to hardcoded border offset and scrollHeight approximation

💡 Merge Strategy: Squash and Merge

Remember to use the 'Squash and Merge' strategy to merge this Pull Request (improvement/GH-1089-refactor-image-node-andmain).

@sonarqubecloud

Copy link
Copy Markdown

@jesusmpc jesusmpc merged commit c2949a6 into main Jun 18, 2026
16 checks passed
@jesusmpc jesusmpc deleted the improvement/GH-1089-refactor-image-node-and branch June 18, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor Image node and tools to avoid saving image fallback on the state

1 participant