sardell commented on code in PR #9855:
URL: https://github.com/apache/nifi/pull/9855#discussion_r2080122205


##########
nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/pages/expolorer/feature/ui/import-new-flow-version-dialog/import-new-flow-version-dialog.component.html:
##########
@@ -0,0 +1,107 @@
+<!--
+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.
+-->
+
+<h2 mat-dialog-title>
+    <div class="flex justify-between items-baseline">
+        <div>Import New Flow Version</div>
+    </div>
+</h2>
+    <mat-dialog-content>
+        <div class="w-full">
+            <div class="pb-2 label-name">
+                <label>Flow Name</label>
+            </div>
+            <div class="flex justify-between items-center mb-2">
+                <div id="version-flow-name-input" class="w-full">
+                    <input
+                        id="version-flow-name-input-field"
+                        class="pad-bottom-md w-full"
+                        matInput
+                        disabled
+                        type="text"
+                        value="{{droplet.name}}"/>
+                </div>
+                <div class="version-count">
+                    <span>v.{{droplet.versionCount + 1}}</span>
+                </div>
+            </div>
+        </div>
+
+        <div id="flow-version-definition"
+             class="w-full flex flex-col justify-between pb-2"
+             (click)="selectFile()"
+             (dragenter)="fileDragHandler($event, extensions)"
+             (dragover)="fileDragHandler($event, extensions)"
+             (dragend)="fileDragEndHandler()"
+             (dragleave)="fileDragEndHandler()"
+             (drop)="fileDropHandler($event)">
+            <div class="flex justify-between">
+                <mat-label>Flow Definition</mat-label>
+                <div class="flex justify-between items-center">
+                    <ng-container *ngIf="fileToUpload !== null && 
!hoverValidity || hoverValidity === 'valid'">
+                        <span class="file-upload-message">
+                            Looks good!
+                            <i class="fa fa-check-circle-o 
success-color-default" aria-hidden="true"></i>
+                        </span>
+                    </ng-container>
+                    <ng-container *ngIf="hoverValidity === 'invalid'">
+                        <span class="file-upload-message">
+                            File format is not valid
+                            <i class="fa fa-times-circle error-color" 
aria-hidden="true"></i></span>
+                    </ng-container>
+                </div>

Review Comment:
   > Also, how could the UI know if the format is valid? It must submit the 
file and the backend will return an error so we should be using the error 
banner UX
   
   Good point. This code / behavior is taken directly from the legacy Registry 
UI. I didn't scrutinize it as much as I should've because I was focused on 
keeping parity between the old and new UI, so I appreciate you pointing this 
out. I'll change this to follow NiFi's UX and rely on the backend to handle 
validation.



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