yangzhang75 opened a new pull request, #8429:
URL: https://github.com/apache/texera/pull/8429

   ### What changes were proposed in this PR?
   
   Building on the title-bar frame (#8391), this PR adds the collapsible 
read-only **workflow preview** to the Form View, and the read-only support the 
embedded editor needs (parent issue #8011). Frontend only.
   
   * A "Workflow" strip on the page that opens to show the same workflow editor 
and mini-map the operator canvas uses, embedded here read-only. It is built the 
first time the reader opens the strip (a frame after the strip is revealed, so 
JointJS measures a real size rather than a zero-sized one that misroutes 
links), then centred.
   * `structureLocked` on the shared `workflow-editor`: a mode that locks the 
graph shape (dragging, linking, deleting) without touching the 
workflow-modification lock the property panel rides on, and suppresses the 
shared cursor so a read-only view never broadcasts one. It defaults to `false`, 
so the operator canvas is unchanged. A container `ResizeObserver` keeps the 
paper sized to its own container (the strip toggles it via `display:none`, 
which the window-resize handler never hears), and operators already in the 
graph when this late-mounting editor appears are repainted so a completed run's 
colours are not missing.
   * With the flag on the form renders for any workflow, so the preview shows 
the graph read-only regardless of the workflow's default view.
   
   The inputs, running and results are added on top of this by later PRs.
   
   #### Screenshot
   
   The workflow preview open on the read-only page (the "Workflow" strip 
expanded to the embedded editor + mini-map):
   
   <!-- drag the screenshot here; GitHub replaces this line with the uploaded 
image -->
   
   ### Any related issues, documentation, discussions?
   
   Part of the Form View feature (parent issue #8011); stacked on #8391 (title 
bar) and #8376 (page shell). Until those merge, this PR's diff includes their 
commits as well.
   
   ### How was this PR tested?
   
   Unit tests (vitest): `workflow-form.component.spec.ts` (direct construction) 
and `workflow-form.rendered.spec.ts` (TestBed-rendered template) cover the 
strip's open/build/close/walk-away behaviour and the rendered bar; the shared 
`workflow-editor.component.spec.ts` (106 tests) is unchanged and green, 
confirming the `structureLocked` split leaves the canvas untouched. The page 
component is at 100% of its TypeScript, and every line added to 
`workflow-editor` is covered. Three template lines are not exercised: the 
`<texera-workflow-editor>` and `<texera-mini-map>` embed behind `*ngIf`, which 
need a real JointJS paper jsdom cannot provide (the editor's own paper code is 
v8-ignored for the same reason). `ng build` is clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Yes. Co-authored with Claude (Anthropic), reviewed line by line by the 
author before submission.


-- 
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