Xiao-zhen-Liu commented on code in PR #3753:
URL: https://github.com/apache/texera/pull/3753#discussion_r2437975138
##########
frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.ts:
##########
@@ -330,6 +333,68 @@ export class WorkflowEditorComponent implements OnInit,
AfterViewInit, OnDestroy
});
}
+ private handleRegion(): void {
+ this.editor.classList.add("hide-region");
+ const Region = joint.dia.Element.define(
+ "region",
+ {
+ attrs: {
+ body: {
+ fill: "rgba(255,213,79,0.2)",
+ stroke: "#FFD54F",
+ "stroke-width": 3,
+ "stroke-dasharray": "6,4",
+ pointerEvents: "none",
+ class: "region",
+ },
+ },
+ },
+ {
+ markup: [{ tagName: "path", selector: "body" }],
+ }
+ );
+
+ let regionMap: { regionShape: joint.dia.Element; operators:
joint.dia.Cell[] }[] = [];
+ // update region shapes on execution
Review Comment:
The name "shape" is very confusing. You are referring to a region's Joint
element as a shape, but when an operator is moved, you actually also change the
"shape" (i.e., contour) of the region element. Why not just name them
something like `RegionElement` or `RegionJointElement` to avoid ambiguity?
##########
frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.ts:
##########
@@ -330,6 +333,68 @@ export class WorkflowEditorComponent implements OnInit,
AfterViewInit, OnDestroy
});
}
+ private handleRegion(): void {
Review Comment:
Ditto, the name is confusing. Change to `handleRegionUpdate`?
##########
frontend/tsconfig.json:
##########
@@ -1,6 +1,7 @@
{
"compileOnSave": false,
"compilerOptions": {
+ "allowSyntheticDefaultImports": true,
Review Comment:
Why is this needed?
##########
frontend/src/app/workspace/service/execute-workflow/execute-workflow.service.ts:
##########
@@ -85,6 +85,8 @@ export class ExecuteWorkflowService {
current: ExecutionStateInfo;
}>();
+ private regionStream = new Subject<readonly string[][]>();
Review Comment:
Name it `regionUpdateStream`?
--
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]