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


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/header/new-canvas-item/_new-canvas-item.component-theme.scss:
##########
@@ -26,20 +26,18 @@
 
     // Get the color palette from the color-config.
     $material-theme-primary-palette: map.get($material-theme-color-config, 
'primary');
+    $nifi-theme-surface-palette: map.get($nifi-theme-color-config, 'primary');
 
     // Get hues from palette
-    $surface-darker: utils.get-surface($nifi-theme-color-config, darker);
     $on-surface-highlight: utils.get-on-surface($nifi-theme-color-config, 
highlight);
     $on-surface-lighter: utils.get-on-surface($nifi-theme-color-config, 
lighter);
-
-    // Use the same logic as _navigation.component-theme.scss to determine the 
bg color for hover
-    $hover-bg: mat.get-color-from-palette($material-theme-primary-palette, 
'navbar');
-    @if ($hover-bg) {
-        // Nothing to do here, we have special color from the palette.
-    } @else {
-        // There was not a special value set for the navbar, so we use Angular 
Material behavior.
-        $hover-bg: mat.get-color-from-palette($material-theme-primary-palette, 
'default');
-    }
+    $is-dark: map-get($material-theme-color-config, is-dark);

Review Comment:
   Thanks for the review feedback @mcgilman! This is a particularly difficult 
thing to get right. The issue is that we need to make sure we have enough 
contrast with the navigation header background color and the draggable icons. 
The fact we have a lighter primary color set as the color of the navigation 
header background color basically forces us to use the opposite color. For 
example, in light mode we use the 300 hue from the material palette to color 
the navigation header background so we need to use the 700 hue from that same 
palette to get enough contrast ration between the two:
   
   ![Screenshot 2024-04-22 at 9 54 18 
AM](https://github.com/apache/nifi/assets/6797571/513b08f8-9709-4520-becb-b13b0513c30b)
   
   Then we also have the hover state to consider: 
   
   ![Screenshot 2024-04-22 at 9 54 28 
AM](https://github.com/apache/nifi/assets/6797571/3ef533f2-198e-4fd5-9a56-3327f984e98b)
   
   As well as the disabled state which up to this point we have opted to just 
use the default angular material disabled button styles which is a contrast 
color with no hover state and no pointer mouse cursor:
   
   ![Screenshot 2024-04-22 at 9 55 19 
AM](https://github.com/apache/nifi/assets/6797571/16321915-82b5-47c0-a898-765e81771185)
   
   And of course we need to consider the dark mode versions for any palette. 
Here we have the nifi default dark mode theme where the navigation header 
background color is the 800 hue to give enough contrast with the nifi logo so I 
had to use the 200 hue (which is very light colored and similar to the contrast 
colors used for the default state):
   
   ![Screenshot 2024-04-22 at 9 54 05 
AM](https://github.com/apache/nifi/assets/6797571/e2d415d6-ba2c-4785-9d03-f73699729c67)
   ![Screenshot 2024-04-22 at 9 54 40 
AM](https://github.com/apache/nifi/assets/6797571/2e618dae-9306-4613-a65d-aa58f9964803)
   ![Screenshot 2024-04-22 at 9 55 06 
AM](https://github.com/apache/nifi/assets/6797571/6d7d9c8e-0db9-4354-9d7c-e1268793344b)
   
   And then there is also the purple palette that I have been using as a sort 
of validation that all of these color choices are making sense to be reused in 
a general sense (meaning that these colors work well with a wide variety of 
color palettes provided by the angular material team which means creating new 
themes for nifi becomes much easier as well as maintaining the current themes).
   
   



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