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:

Then we also have the hover state to consider:

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:

And of course we need to consider the dark mode versions for any palette:



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]