Skip to content

Commit f919a7e

Browse files
authored
feat: theming tweaks (#1727)
Miscellaneous light and dark theme tweaks after using it for awhile. Mostly things that were either improperly styled or issues for enterprise. - light disabled color for secondary buttons - adjust subdued-content-bg defninition - adjusted dark surface color - tweaked light theme to be grayer - added subdued-content-bg variable - fix button alignment - style tweaks - minor color fixes - style editor in conditional formating style fixes - fix console button disabled object styling - Numerous color adjustments - fix malformed hsl variable - adjust time slider styling - fix HCM styling - fix styling of custom time select - item-list styling - add fallback colors for a few more things, so that error message before api works - Buttons can use gap instead of margin on icons now that they are flex. Much easier. - whitespace change - expose is modified styling to styleguide timeslider for checking - styleguide icon button styling - add some spectrum stuff to styleguide for easier comparison - purge primary-light - schotcut settings rror message styling - settings menu user image and logo button adjust - widget list hover color - add legend color
1 parent ed41c42 commit f919a7e

366 files changed

Lines changed: 300 additions & 185 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/chart/src/ChartTheme.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
paper-bgcolor: var(--dh-color-chart-bg);
66
plot-bgcolor: var(--dh-color-chart-plot-bg);
77
title-color: var(--dh-color-chart-title);
8+
legend-color: var(--dh-color-chart-legend-color);
89
colorway: var(--dh-color-chart-colorway);
910
gridcolor: var(--dh-color-chart-grid);
1011
linecolor: var(--dh-color-chart-axis-line);

packages/chart/src/ChartTheme.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface ChartTheme {
1212
paper_bgcolor: string;
1313
plot_bgcolor: string;
1414
title_color: string;
15+
legend_color: string;
1516
colorway: string;
1617
gridcolor: string;
1718
linecolor: string;
@@ -48,6 +49,7 @@ export function defaultChartTheme(): Readonly<ChartTheme> {
4849
paper_bgcolor: chartTheme['paper-bgcolor'],
4950
plot_bgcolor: chartTheme['plot-bgcolor'],
5051
title_color: chartTheme['title-color'],
52+
legend_color: chartTheme['legend-color'],
5153
colorway: chartTheme.colorway,
5254
gridcolor: chartTheme.gridcolor,
5355
linecolor: chartTheme.linecolor,

packages/chart/src/ChartUtils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,6 +1856,11 @@ class ChartUtils {
18561856
color: theme.title_color,
18571857
},
18581858
},
1859+
legend: {
1860+
font: {
1861+
color: theme.legend_color,
1862+
},
1863+
},
18591864
};
18601865

18611866
if (type === dh.plot.AxisType.X) {

packages/chart/src/__snapshots__/ChartTheme.test.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ exports[`defaultChartTheme should create the default chart theme 1`] = `
88
"error_band_fill_color": "chartTheme['error-band-fill-color']",
99
"error_band_line_color": "chartTheme['error-band-line-color']",
1010
"gridcolor": "chartTheme['gridcolor']",
11+
"legend_color": "chartTheme['legend-color']",
1112
"line_color": "chartTheme['line-color']",
1213
"linecolor": "chartTheme['linecolor']",
1314
"ohlc_decreasing": "chartTheme['ohlc-decreasing']",

packages/code-studio/src/main/WidgetList.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
$widget-list-color: $gray-200;
44
$widget-list-hover-color: $foreground;
5-
$widget-list-background-hover-color: $primary;
5+
$widget-list-background-hover-color: var(--dh-color-highlight-hover);
66

77
$widget-list-owner-color: $gray-400;
88
$widget-list-owner-hover-color: $gray-200;

packages/code-studio/src/settings/SettingsMenu.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $settings-menu-header-color: var(--dh-color-fg);
88

99
$settings-menu-collapse-trigger-color: var(--dh-color-fg);
1010

11-
$settings-menu-rule-bg: $gray-800;
11+
$settings-menu-rule-bg: var(--dh-color-gray-400);
1212
$settings-menu-rule-button-color: $gray-300;
1313
$settings-menu-rule-border: $gray-400;
1414
$settings-menu-rule-focused-border: $primary;
@@ -107,8 +107,13 @@ $settings-menu-z-index: $zindex-modal;
107107
height: $settings-menu-header-user-image-size;
108108
width: $settings-menu-header-user-image-size;
109109
margin: $spacer $spacer-2 $spacer $spacer;
110-
background: $gray-400;
110+
background: var(--dh-color-accent-1100);
111111
border-radius: $border-radius;
112+
113+
svg {
114+
color: var(--dh-color-accent-contrast);
115+
}
116+
112117
img {
113118
height: $settings-menu-header-user-image-size;
114119
width: $settings-menu-header-user-image-size;
@@ -136,6 +141,7 @@ $settings-menu-z-index: $zindex-modal;
136141
text-decoration: underline;
137142
font-size: smaller;
138143
padding: 0 $spacer-1;
144+
height: 28px;
139145

140146
&:focus {
141147
background: hsla(var(--dh-color-fg-hsl), $focus-bg-transparency);

packages/code-studio/src/settings/ShortcutItem.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,9 @@
3434
flex-direction: row;
3535
justify-content: space-between;
3636
align-items: center;
37-
padding: 0 0.5rem;
38-
border-radius: $border-radius;
3937

4038
&.is-invalid {
41-
color: $danger;
42-
background-color: $toast-error-bg;
39+
color: var(--dh-color-form-control-error);
4340
}
4441

4542
.shortcut-item-message {

packages/code-studio/src/styleguide/Colors.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ function Colors(): React.ReactElement {
4747
'foreground',
4848
'primary',
4949
'primary-dark',
50-
'primary-light',
5150
'secondary',
5251
'secondary-hover',
5352
'success',

packages/code-studio/src/styleguide/SpectrumComparison.tsx

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ import {
88
ComboBox,
99
Flex,
1010
Grid,
11+
Icon,
1112
Item,
1213
Picker,
1314
Radio,
1415
RadioGroup,
1516
SpectrumButtonProps,
17+
Text,
1618
TextField,
1719
View,
1820
} from '@adobe/react-spectrum';
@@ -25,6 +27,8 @@ import {
2527
Select,
2628
} from '@deephaven/components';
2729
import { EMPTY_FUNCTION } from '@deephaven/utils';
30+
import { vsPlay } from '@deephaven/icons';
31+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
2832
import {
2933
SAMPLE_SECTION_E2E_IGNORE,
3034
SPECTRUM_COMPARISON_SAMPLES_ID,
@@ -68,18 +72,31 @@ export function SpectrumComparison(): JSX.Element {
6872
<Flex gap={20} wrap>
6973
<View>
7074
<h3>Buttons - Filled</h3>
71-
<Grid gap={20} columns="repeat(2, 120px)" autoRows="40x">
75+
<Grid
76+
gap={20}
77+
columns="repeat(2, 120px)"
78+
autoRows="40x"
79+
justifyItems="start"
80+
alignItems="start"
81+
>
7282
<label>Bootstrap</label>
7383
<label>Spectrum</label>
7484

7585
{buttons.map(([level, variant]) => (
7686
<Fragment key={level}>
77-
<BootstrapButtonOld onClick={EMPTY_FUNCTION} kind={level}>
87+
<BootstrapButtonOld
88+
onClick={EMPTY_FUNCTION}
89+
kind={level}
90+
icon={vsPlay}
91+
>
7892
Button
7993
</BootstrapButtonOld>
8094

8195
<Button variant={variant} style="fill">
82-
Button
96+
<Icon>
97+
<FontAwesomeIcon icon={vsPlay} />
98+
</Icon>
99+
<Text>Button</Text>
83100
</Button>
84101
</Fragment>
85102
))}

packages/code-studio/src/styleguide/SpectrumComponents.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {
3535
Divider,
3636
ButtonGroup,
3737
Flex,
38+
ListView,
3839
} from '@adobe/react-spectrum';
3940
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4041
import { dhTruck, vsEmptyWindow } from '@deephaven/icons';
@@ -115,7 +116,7 @@ function ButtonsSample(): JSX.Element {
115116
autoFlow="column"
116117
columnGap="size-250"
117118
rowGap="size-150"
118-
columns={repeat(4, 'size-2000')}
119+
columns={repeat(4, minmax(0, 'size-2000'))}
119120
rows={repeat(8, 'size-400')}
120121
>
121122
<label>Button style=&quot;outline&quot;</label>
@@ -206,7 +207,7 @@ function ContextualHelpSample(): JSX.Element {
206207
function FormsSample(): JSX.Element {
207208
return (
208209
<Form>
209-
<Grid gap={20} columns={repeat('auto-fit', '210px')}>
210+
<Grid gap={20} columns={repeat('auto-fit', '210px')} alignItems="end">
210211
<TextField label="Text Field" />
211212
<ComboBox label="Combobox" menuTrigger="focus" defaultSelectedKey="two">
212213
<Item key="one">One</Item>
@@ -236,6 +237,18 @@ function IllustratedMessageSample(): JSX.Element {
236237
function TableViewSample(): JSX.Element {
237238
return (
238239
<>
240+
<label id="table-view-sample">List View</label>
241+
<ListView
242+
selectionMode="multiple"
243+
maxWidth="size-6000"
244+
marginBottom="size-200"
245+
>
246+
<Item>One</Item>
247+
<Item>Two</Item>
248+
<Item>Three</Item>
249+
<Item>Four</Item>
250+
</ListView>
251+
239252
<label id="table-view-sample">Table View</label>
240253
<TableView aria-labelledby="table-view-sample" selectionMode="multiple">
241254
<TableHeader>

0 commit comments

Comments
 (0)