aglinxinyuan commented on code in PR #3911:
URL: https://github.com/apache/texera/pull/3911#discussion_r2433788968


##########
frontend/src/app/workspace/service/joint-ui/joint-ui.service.ts:
##########
@@ -791,6 +806,17 @@ export class JointUIService {
         "y-alignment": "middle",
         "x-alignment": "middle",
       },
+      [`.${operatorWorkerCountClass}`]: {
+        text: "",

Review Comment:
   Remove text



##########
frontend/src/app/workspace/component/menu/menu.component.html:
##########
@@ -165,6 +165,16 @@
                 >
               </li>
             </ul>
+            <ul nz-menu>
+              <li nz-menu-item>
+                <label
+                  nz-checkbox
+                  [(ngModel)]="showNumWorkers"
+                  (ngModelChange)="onWorkerVisibilityChange()"
+                  >Display #Workers</label

Review Comment:
   Remove "Display".



##########
frontend/src/app/workspace/component/menu/menu.component.ts:
##########
@@ -253,6 +256,13 @@ export class MenuComponent implements OnInit, OnDestroy {
     document.body.removeChild(tempSpan);
   }
 
+  onWorkerVisibilityChange() {
+    this.jointUIService.handleWorkerVisibilityChange(
+      this.showNumWorkers,
+      this.workflowActionService.getJointGraphWrapper().mainPaper

Review Comment:
   You want to make some changes to mainPaper, and all the necessary 
information is already within it. So, what’s the point of passing mainPaper to 
another service to make those changes? You can simply do it right here.



##########
frontend/src/app/workspace/component/menu/menu.component.ts:
##########
@@ -139,7 +141,8 @@ export class MenuComponent implements OnInit, OnDestroy {
     private reportGenerationService: ReportGenerationService,
     private panelService: PanelService,
     private computingUnitStatusService: ComputingUnitStatusService,
-    protected config: GuiConfigService
+    protected config: GuiConfigService,
+    public jointUIService: JointUIService

Review Comment:
   You don't need this.



##########
frontend/src/app/workspace/service/joint-ui/joint-ui.service.ts:
##########
@@ -791,6 +806,17 @@ export class JointUIService {
         "y-alignment": "middle",
         "x-alignment": "middle",
       },
+      [`.${operatorWorkerCountClass}`]: {
+        text: "",
+        fill: "green",

Review Comment:
   Remove fill. This value will not be used.



##########
frontend/src/app/workspace/service/joint-ui/joint-ui.service.ts:
##########
@@ -286,6 +288,15 @@ export class JointUIService {
     return operatorElement;
   }
 
+  public handleWorkerVisibilityChange(show: boolean, paper: joint.dia.Paper): 
void {

Review Comment:
   You don't need this function here. Everything can be done in menu. Move this 
function to menu.



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