Copilot commented on code in PR #8455:
URL: https://github.com/apache/texera/pull/8455#discussion_r3991433708


##########
frontend/src/app/common/formly/editable-label-wrapper/editable-label-wrapper.component.html:
##########
@@ -0,0 +1,61 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!-- Authoring: the label is the input, so what you type is what the reader 
reads. -->
+<div
+  class="lbl-row"
+  *ngIf="props.authoring">
+  <input
+    class="lbl-input"
+    [value]="props.authorName"
+    [placeholder]="props.schemaLabel"
+    (change)="onRename($event)"

Review Comment:
   In authoring mode this textbox is only the label editor; it is not 
programmatically associated with the Formly control rendered by 
`fieldComponent`. Because `decorate()` also clears `props.label`, the actual 
scalar/sub-field control below has no accessible name. Preserve a programmatic 
label for the generated field id (for example, a visually hidden label that 
tracks `authorName || schemaLabel`) while keeping this input as the visible 
editor.
   
   This issue also appears on line 52 of the same file.



##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts:
##########
@@ -462,34 +536,93 @@ export class WorkflowFormComponent implements OnInit, 
OnDestroy {
   }
 
   /**
-   * Show the workflow rather than edit it: the graph shape and its properties 
are read-only
-   * on this page. A later PR's authoring mode makes properties editable with 
write access.
+   * Lock or unlock editing: the graph and its properties are read-only unless 
a writer is in edit
+   * mode, which is the only state that unlocks them (see toggleAuthoring).
    */
   private applyEditability(): void {
-    this.workflowActionService.disableWorkflowModification();
+    // Edit mode with write access is the only state that makes the operator 
properties (and the
+    // embedded canvas) modifiable here; every other state locks them, so a 
reader -- or a writer
+    // just viewing -- cannot change the workflow through this page.
+    if (this.authoring && this.canEdit) {
+      this.workflowActionService.enableWorkflowModification();

Review Comment:
   Enabling the global modification flag also unlocks the embedded editor's 
context menu. `WorkflowEditorComponent.structureLocked` only gates 
paper/keyboard interactions (`workflow-editor.component.ts:127-140`), while the 
context menu shows cut, paste, disable, and delete solely from this global flag 
(`context-menu.component.html:33-79,126-151`). Consequently, Edit mode can 
reshape or delete operators from a preview that is still passed 
`structureLocked=true`. Please propagate the structure lock to the context menu 
(or split property-edit permission from structural-edit permission) before 
enabling the panel.
   
   This issue also appears in the following locations of the same file:
   - line 598
   - line 861
   - line 1130



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