scottyaslan commented on code in PR #11193:
URL: https://github.com/apache/nifi/pull/11193#discussion_r3191600754


##########
nifi-frontend/src/main/frontend/libs/shared/src/components/asset-upload/asset-upload.component.html:
##########
@@ -0,0 +1,149 @@
+<!--
+  ~ 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.
+  -->
+<mat-card
+    appearance="outlined"
+    class="asset-upload-container flex flex-col gap-3 p-4 min-h-[100px] 
rounded-lg"
+    [class.disabled]="disabled"
+    [class.has-error]="hasError"
+    [class.has-content]="assets.length > 0 || uploadProgress.length > 0"
+    dragAndDrop
+    [allowMultipleFiles]="multiple"
+    [allowedFileTypes]="allowedFileTypes"
+    [maxFileSize]="maxFileSize"
+    (filesDropped)="onFilesDropped($event)"
+    (invalidDrop)="onInvalidDrop($event)"
+    data-qa="asset-drop-zone">
+    @if (assets.length === 0 && uploadProgress.length === 0) {
+        <div class="flex flex-col items-center justify-center gap-3">
+            <div class="flex items-center gap-2">
+                <i class="fa fa-cloud-upload" aria-hidden="true"></i>
+                <span class="tertiary-color">Drag and drop a file here</span>
+            </div>
+            <button
+                mat-stroked-button
+                type="button"
+                [disabled]="disabled"
+                (click)="openFileBrowser()"
+                data-qa="browse-files-button">
+                Browse
+            </button>
+        </div>
+    }
+
+    @if (assets.length > 0 || uploadProgress.length > 0) {
+        <div class="flex flex-col gap-4">
+            @for (asset of assets; track trackByAssetId($index, asset)) {
+                @if (asset.missingContent) {
+                    <div
+                        class="asset-item-missing-content 
caution-color-background flex items-center justify-between gap-3 px-3 py-2 
border rounded-md min-h-[44px]"
+                        data-qa="uploaded-asset-missing-content">
+                        <div class="flex items-start gap-2 min-w-0 flex-1">
+                            <i
+                                class="fa fa-warning caution-color shrink-0"

Review Comment:
   The issue here now is that the caution-color-background and the 
caution-color are defined in _app.scss as:
   
   ```
   .caution-color {
           color: var(--nf-caution-default);
           fill: var(--nf-caution-default);
       }
   
       .caution-color-background {
           background-color: var(--nf-caution-default);
       }
   ```
   
   So here the icon will be the same color as the background. Typically in nifi 
we do not color text or surfaces with really anything outside of what the 
design system provides. Is it necessary here? Do you need the 
caution-color-background applied to the container? Typically in our listings 
when we show the fa-warning icon for an invalid extension for example the icon 
is caution-colored but the surface is uncustomized.



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