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


##########
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:
   Right, and the editor's own `structureLocked` note said as much. Fixed in 
871649877: `texera-context-menu` takes `[structureLocked]` from the editor and 
gates cut, paste, delete and disable/enable on modification AND no lock 
(`canModify`); copy, the result toggles, execute-to and export do not re-shape 
the graph and are unchanged. Menu-level tests for each command, plus an editor 
test that opens the right-click menu on a locked editor and checks the lock 
arrived.



##########
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:
   Fixed in 871649877: while authoring, a visually hidden `<label [for]=id>` 
that follows the current name (the author's, else the schema's) sits beside the 
name box, so the control keeps an accessible name; test added. Line 52 is the 
reader's label, which already carries `for`; it is omitted only when there is 
no text at all to give.



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