Skip to content

Commit 0f61971

Browse files
authored
[ui] Use semantic tooltip styles for filter tag, fix context menu color (#18487)
## Summary & Motivation Use regular tooltip background colors for tags, fix asset node context menu colors. https://github.com/dagster-io/dagster/assets/2823852/4567dd05-7006-4c23-8421-c52d178298cd <img width="288" alt="Screenshot 2023-12-04 at 3 45 07 PM" src="https://github.com/dagster-io/dagster/assets/2823852/b18e3e65-f5bc-48ee-b7fa-8429660b4121"> ## How I Tested These Changes - Hover a filter tag with truncation, verify styles. - View context menu in asset graph.
1 parent a0a523e commit 0f61971

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

js_modules/dagster-ui/packages/ui-components/src/components/BaseTag.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import * as React from 'react';
22
import styled from 'styled-components';
33

4-
import {colorBackgroundDefault, colorTextDefault} from '../theme/color';
4+
import {
5+
colorBackgroundDefault,
6+
colorTextDefault,
7+
colorTooltipBackground,
8+
colorTooltipText,
9+
} from '../theme/color';
510

611
import {IconWrapper} from './Icon';
712
import {SpinnerWrapper} from './Spinner';
@@ -47,8 +52,8 @@ export const BaseTag = (props: Props) => {
4752
data-tooltip={typeof label === 'string' ? label : tooltipText}
4853
data-tooltip-style={JSON.stringify({
4954
...BaseTagTooltipStyle,
50-
backgroundColor: fillColor,
51-
color: textColor,
55+
backgroundColor: colorTooltipBackground(),
56+
color: colorTooltipText(),
5257
})}
5358
>
5459
{label}

js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
colorLineageNodeBorderSelected,
2121
colorLineageNodeBorderHover,
2222
colorLineageNodeBackground,
23+
colorPopoverBackground,
2324
} from '@dagster-io/ui-components';
2425
import countBy from 'lodash/countBy';
2526
import isEqual from 'lodash/isEqual';
@@ -260,8 +261,7 @@ export const AssetNodeContextMenuWrapper = React.memo(
260261
position: 'absolute',
261262
top: menuPosition.top,
262263
left: menuPosition.left,
263-
backgroundColor: '#fff',
264-
border: '1px solid #ccc',
264+
backgroundColor: colorPopoverBackground(),
265265
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
266266
zIndex: 10,
267267
}}

js_modules/dagster-ui/packages/ui-core/src/ui/Filters/useFilter.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import {
55
colorBackgroundBlue,
66
colorLinkDefault,
77
colorTextBlue,
8+
colorTooltipBackground,
9+
colorTooltipText,
810
} from '@dagster-io/ui-components';
911
import React from 'react';
1012
import styled from 'styled-components';
@@ -82,8 +84,8 @@ export const FilterTagHighlightedText = React.forwardRef(
8284
);
8385

8486
const LabelTooltipStyles = JSON.stringify({
85-
background: colorBackgroundBlue(),
86-
color: colorTextBlue(),
87+
background: colorTooltipBackground(),
88+
color: colorTooltipText(),
8789
border: 'none',
8890
borderRadius: 7,
8991
overflow: 'hidden',

0 commit comments

Comments
 (0)