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


##########
frontend/src/app/common/formly/expose-property-wrapper/expose-property-wrapper.component.html:
##########
@@ -0,0 +1,32 @@
+<!--
+ 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.
+-->
+
+<div class="expose-row choosing">
+  <label
+    class="expose-box"
+    title="Show this on the Form View">
+    <input
+      type="checkbox"
+      [checked]="props.exposed"
+      (change)="onToggle($event)" />

Review Comment:
    Fixed. The checkbox now has a property-specific [attr.aria-label] ("Show 
<property> on the Form View").



##########
frontend/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.ts:
##########
@@ -1341,13 +1353,28 @@ export class OperatorPropertyEditFrameComponent 
implements OnInit, OnChanges, On
         };
       }
 
+      // A tick box beside each TOP-LEVEL property only. The map callback runs 
for every
+      // field at every depth, so without this an array-of-objects property 
sprouted one on
+      // the array, each item and each nested field. Membership in the 
schema's own
+      // `properties` distinguishes a top-level field from a same-named nested 
one.
+      const isTopLevel = typeof mappedField.key === "string" && 
rootPropertyNames.has(mappedField.key);

Review Comment:
   Fixed. Moved the tick-box decoration off the per-depth formly map onto the 
root field group, so nested array/object fields can no longer receive a toggle 
(the map ran at every depth and could not tell a nested field from a same-named 
root one). Added a regression test with a nested object whose key collides with 
a root property, asserting only root fields are decorated.



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