mattcasters opened a new pull request, #7874:
URL: https://github.com/apache/hop/pull/7874

   ## What
   
   Minimal Hop Web SPI so **plugin graph editors** (not only 
pipelines/workflows) can reuse the existing SVG canvas overlay stack.
   
   Fixes #7873.
   
   ## Why (2.19.0 feature freeze)
   
   External plugins that paint custom canvases (e.g. Data Vault / dimensional 
modelers, 
[hop-data-vault#119](https://github.com/mattcasters/hop-data-vault/issues/119)) 
cannot use Hop Web today because:
   
   1. `CanvasSvgFacade` only exposes `renderPipeline` / `renderWorkflow`
   2. RAP hover and area-owner sync are hard-coded to pipeline/workflow graphs
   3. `CanvasFacadeImpl.setData` ClassCasts any non-`WorkflowMeta` to 
`PipelineMeta`
   
   This PR unblocks those plugins with the smallest possible API surface before 
2.19 feature freeze.
   
   ## Changes
   
   | Area | Change |
   |------|--------|
   | `IWebCanvasGraph` | New interface: `replaceAreaOwners`, 
`handleWebCanvasHover` |
   | `HopGuiPipelineGraph` / `HopGuiWorkflowGraph` | Implement the interface 
(methods already existed) |
   | `CanvasSvgFacade.publishSnapshot` | Publish a pre-rendered 
`CanvasSvgRenderResult` (pipeline/workflow render now call the same path) |
   | RAP `CanvasInteractionHandler` / area sync | Dispatch via 
`IWebCanvasGraph` |
   | RAP `CanvasFacadeImpl` | Common props only when meta is neither pipeline 
nor workflow |
   
   RCP facades remain no-ops. No client JS changes. Pipeline/workflow paint 
path behavior is unchanged aside from sharing `publishSnapshotInternal`.
   
   ## Plugin usage (after merge)
   
   ```java
   if (EnvironmentUtils.getInstance().isWeb()) {
     CanvasSvgFacade.registerCanvas(canvas, this); // this implements 
IWebCanvasGraph
     CanvasSvgFacade.ensureInteractionHandler(parent, canvas);
   }
   // on paint:
   CanvasSvgRenderResult result = myRenderer.render(...); // SvgGc + painter
   CanvasSvgFacade.publishSnapshot(canvas, result, magnification, offset, 
canvasSize);
   ```
   
   ## Testing
   
   - [x] `mvn -pl ui,rap,rcp -am compile -DskipTests`
   - [ ] Manual: pipeline + workflow open/paint under Hop Web (smoke; no 
intentional behavior change)
   - Plugin integration will follow in hop-data-vault against 2.19.0-SNAPSHOT 
once this lands
   
   ## Non-goals (follow-ups)
   
   - Plugin-shipped JS remote types
   - Relationship-drag / hop-mode client previews for custom graphs
   - Changes to `canvas-svg.js`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to