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


##########
nifi-frontend/src/main/frontend/libs/shared/src/components/asset-upload/asset-upload.component.scss:
##########
@@ -0,0 +1,78 @@
+/*!
+ * 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.
+ */
+
+.asset-upload-container {
+    &.drop-allowed {
+        border: 1px dashed var(--mat-sys-primary);
+        * {
+            pointer-events: none;
+        }
+    }
+
+    &.drop-invalid {
+        border: 1px dashed var(--mat-sys-error);
+        * {
+            pointer-events: none;
+        }
+    }
+
+    &.disabled {
+        opacity: 0.6;
+        cursor: not-allowed;
+    }
+
+    &.has-error {
+        border: 1px solid var(--mat-sys-error);
+
+        &.drop-allowed {
+            border: 1px dashed var(--mat-sys-primary);
+        }
+
+        &.drop-invalid {
+            border: 1px dashed var(--mat-sys-error);
+        }
+    }
+}
+
+.asset-item-missing-content {
+    border-color: var(--nf-caution-default);
+    background-color: color-mix(in srgb, var(--nf-caution-default) 12%, 
transparent);
+}
+
+.asset-missing-icon {
+    color: var(--nf-caution-default);
+    font-size: 16px;
+    line-height: 1;
+}
+
+.asset-missing-hint {
+    color: var(--nf-caution-default);
+}
+
+.upload-icon {
+    color: var(--mat-sys-on-surface-variant);
+    font-size: 18px;
+    line-height: 1;
+}
+
+.progress-item.error {
+    border-color: var(--mat-sys-error);
+}
+
+.mat-mdc-progress-bar.progress-bar-critical {
+    --mdc-linear-progress-active-indicator-color: var(--mat-sys-error);
+}

Review Comment:
   The issue is that while we do have the mat-progress-bar in our design system 
toolbox here we do NOT have any success, caution, and error theming.
   
   I was trying to work around this by leveraging the color input but as you 
said that is a no-op because we are using M3 and it's tokens and the theming 
mixins etc.
   
   I also see that you attempted to do something similar with a 
mat-progress-bar in the connector-verification-progress-dialog.component.scss 
and template.
   
   We need to clean up these styles. It is obvious we have a need to add 
support for a success, caution, and error state to the mat-progress-bar design 
system component. Something like:
   ```
   @use '@angular/material' as mat;
   
   @mixin generate-material-theme() {
       :root {
           .progress-bar-success {
               @include mat.progress-bar-overrides((
                   active-indicator-color: var(--mat-sys-primary),
               ));
           }
   
           .progress-bar-caution {
               @include mat.progress-bar-overrides((
                   active-indicator-color: var(--nf-caution-default),
               ));
           }
   
           .progress-bar-error {
               @include mat.progress-bar-overrides((
                   active-indicator-color: var(--mat-sys-error),
               ));
           }
       }
   
       .darkMode {
           .progress-bar-success {
               @include mat.progress-bar-overrides((
                   active-indicator-color: var(--mat-sys-primary),
               ));
           }
   
           .progress-bar-caution {
               @include mat.progress-bar-overrides((
                   active-indicator-color: var(--nf-caution-default),
               ));
           }
   
           .progress-bar-error {
               @include mat.progress-bar-overrides((
                   active-indicator-color: var(--mat-sys-error),
               ));
           }
       }
   }
   ```
   somewhere towards the bottom of _app.scss generate-material-theme() mixin.



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