Skip to content

Commit 2eafd94

Browse files
committed
light mode added. More colors consolidated into _VariablesLM.scss file
1 parent 64d982a commit 2eafd94

File tree

18 files changed

+121
-59
lines changed

18 files changed

+121
-59
lines changed

src/app/components/StateRoute/ComponentMap/LinkControls.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,14 @@ export default function LinkControls({
4949
collectNodes(snapShots);
5050

5151
return (
52-
<div style={controlStyles}>
52+
<div className="comp-map-options" style={controlStyles}>
5353
{' '}
5454
{/* Controls for the layout selection */}
5555
<label>Layout:</label>
5656
&nbsp;{' '}
5757
{/* This is a non-breaking space - Prevents an automatic line break at this position */}
5858
<select
59+
className="comp-map-dropdown"
5960
onClick={(e) => e.stopPropagation()}
6061
onChange={(e) => setLayout(e.target.value)}
6162
// value={layout}

src/app/components/StateRoute/History.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ function History(props: Record<string, unknown>): JSX.Element {
190190
.enter()
191191
.append('path')
192192
.attr('class', 'link')
193+
.attr('stroke', '#161617')
194+
.attr('fill', 'none')
193195
.attr(
194196
//defines the path attribute (d) for each link (edge) between nodes, using a Bézier curve (C) to connect the source node's coordinates (d.x, d.y) to the midpoint between the source and target nodes and then to the target node's coordinates (d.parent.x, d.parent.y)
195197
'd',
@@ -288,7 +290,7 @@ function History(props: Record<string, unknown>): JSX.Element {
288290
.append('circle')
289291
.attr('fill', (d) => {
290292
if (d.data.index === currLocation.index) {
291-
return 'red';
293+
return '#284b63';
292294
}
293295
return d.color ? d.color : '#555';
294296
})
@@ -298,6 +300,7 @@ function History(props: Record<string, unknown>): JSX.Element {
298300
.append('text')
299301
.attr('dy', '0.31em')
300302
.attr('text-anchor', 'middle')
303+
.attr('fill', 'white')
301304
.text((d) => `${d.data.name}.${d.data.branch}`)
302305
.clone(true)
303306
.lower()

src/app/components/StateRoute/PerformanceVisx/BarGraph.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
8989
nice: true,
9090
});
9191

92+
const LMcolorScale = ['#a0c1d6','#669bbc','#105377','#003049','#55a8ac','#3c6e71','#1c494b','#c1676d','#c1121f','#780000']
93+
9294
const colorScale = scaleOrdinal<string>({
9395
// Gives each bar on the graph a color using schemeSet1 imported from D3
9496
domain: keys,
95-
range: schemeSet1,
97+
range: LMcolorScale,
9698
});
9799

98100
// setting max dimensions and scale ranges
@@ -186,7 +188,7 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
186188
</form>
187189
</div>
188190
<svg ref={containerRef} width={width} height={height}>
189-
<rect x={0} y={0} width={width} height={height} fill={background} rx={14} />
191+
<rect className='perf-rect' x={0} y={0} width={width} height={height} rx={14} />
190192
<Grid
191193
top={margin.top}
192194
left={margin.left}

src/app/components/WebMetrics.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const radialGraph = (props) => {
4949
},
5050
},
5151
track: {
52-
background: '#fff',
52+
background: '#161617',
5353
strokeWidth: '3%',
5454
margin: 0, // margin is in pixels
5555
dropShadow: {
@@ -66,12 +66,12 @@ const radialGraph = (props) => {
6666
name: {
6767
offsetY: -10,
6868
show: true,
69-
color: '#fff',
69+
color: '#161617',
7070
fontSize: '24px',
7171
},
7272
value: {
7373
formatter: props.formatted,
74-
color: '#fff',
74+
color: '#3c6e71',
7575
fontSize: '16px',
7676
show: true,
7777
},

src/app/containers/ActionContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
196196
<SwitchAppDropdown />
197197
<div className='action-component exclude'>
198198
<Button
199+
className='clear-button'
199200
variant='contained'
200-
className='empty-button'
201201
//style={{ backgroundColor: '#ff6569' }}
202202
onClick={() => {
203203
dispatch(emptySnapshots()); // set slider back to zero, visually

src/app/containers/TravelContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function TravelContainer(props: TravelContainerProps): JSX.Element {
7575
<Button
7676
className='play-button'
7777
variant='contained'
78-
sx={{ height: 25, p: 0, mr: 1, ml: 1}}
78+
sx={{ height: 25, p: 0, mr: 1, ml: 1 }}
7979
type='button'
8080
// data-testid, prop for testing in RTL
8181
data-testid='play-button-test'

src/app/styles/abstracts/_variablesLM.scss

Lines changed: 47 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,19 @@ $tab-select-background: $primary-color;
3737
$tab-select-text: $light-text;
3838
$tab-dropdown-background: $background-color-weak;
3939

40-
$launch-background: $background-color;
40+
$loader-background: $background-color;
41+
$loader-text: $dark-text;
42+
$loader-checks-border: $primary-color-strong;
43+
$launch-button: $primary-color-strong;
44+
$launch-button-hover: $primary-color;
45+
$launch-button-text: $light-text;
4146

4247
$action-tab-background: $background-color;
43-
$action-clear-button: $primary-color;
44-
$action-clear-button-text: $background-color;
48+
//$action-clear-button: $primary-color; //currently being handled by mui theme.ts file
49+
//$action-clear-button-text: $background-color; //currently being handled by mui theme.ts file
4550
$route-bar: $primary-color-strong;
4651
$route-bar-text: $light-text;
52+
$indiv-action-input-bg: $background-color;
4753
$indiv-action-selected: $primary-color-strong;
4854
$indiv-action-selected-text: $light-text;
4955
$indiv-action-filler-text: $contrasting-color-weak;
@@ -53,7 +59,7 @@ $indiv-action-time-text: $light-text;
5359
$current: $contrasting-color-weak;
5460
$current-text: $light-text;
5561
$jump: $contrasting-color-weak;
56-
$jump-hover: $secondary-color;
62+
$jump-hover: $primary-color;
5763
$jump-text: $light-text;
5864

5965
$header-background: $background-color;
@@ -70,7 +76,7 @@ $navbar-unselected-text: $dark-text;
7076

7177
$state-background: $background-color-strong;
7278

73-
$map-options-dropdown: $primary-color-strong;
79+
$map-options-dropdown: $primary-color;
7480
$map-options-label: $dark-text;
7581
$map-link: $contrasting-color;
7682
//root fill is currently a visx LinearGradient defined in ComponentMap.tsx
@@ -87,41 +93,57 @@ $map-child-text: $dark-text;
8793

8894
$performance-options-dropdown: $primary-color-strong;
8995
$performance-options-label: $dark-text;
96+
$performance-save-series-button: $primary-color;
97+
$performance-save-series-button-text: $light-text;
98+
$perf-background: $background-color;
9099

91-
$history-node: $primary-color;
92-
$history-text: $light-text;
100+
$history-node: $primary-color; //this is currently set in History.tsx line 291
101+
$history-link: $contrasting-color; // this is currently set in d3graph.css line 26
102+
//$history-text: $light-text;
93103

104+
//web metrics colors are selected in WebMetrics.tsx (text color line 69)
94105
$web-circles: $contrasting-color;
95106
$web-text: $dark-text;
96107

97-
$tree-key: $primary-color;
98-
$tree-expanded-key: $contrasting-color-weak;
99-
$tree-string: $primary-color-strong;
100-
$tree-boolean: $secondary-color;
101-
$tree-number: $secondary-color;
102-
$tree-other: $secondary-color;
108+
$tree-background: $background-color;
109+
//the following colors have not been adjusted
110+
// $tree-key: $primary-color;
111+
// $tree-expanded-key: $contrasting-color-weak;
112+
// $tree-string: $primary-color-strong;
113+
// $tree-boolean: $secondary-color;
114+
// $tree-number: $secondary-color;
115+
// $tree-other: $secondary-color;
103116

104117
$travel-background: $background-color;
105118
$travel-top-border: lighten($contrasting-color, 50%);
106-
$play-button: $primary-color;
107-
$play-button-text: $primary-strong-gradient;
119+
$play-button: $primary-strong-gradient;
120+
$play-button-text: $light-text;
108121
$slider-handle: $primary-strong-gradient;
109122
$slider-rail-left: $primary-color;
110123
$slider-rail-right: $background-color-weak;
111124
$scrub-button: $primary-strong-gradient;
112125
$scrub-icon: $light-text;
113126
$speed-dropdown: $primary-color-strong;
114-
$speed-dropdown-selected: $secondary-color;
115127
$speed-dropdown-text: $light-text;
128+
$speed-dropdown-expanded: lighten($primary-color-strong, 20%);
129+
$speed-dropdown-expanded-hover: $primary-color;
130+
$speed-dropdown-expanded-text: $light-text;
116131

117132
$function-bar-background: $background-color;
118133
//outline color currently handled in mui theme.ts file
119134
$function-bar-button-outlines: $primary-color;
120135
$function-bar-text: $primary-color-strong;
121136
$function-bar-text-hover: $primary-color;
122137
$function-bar-text-highlight: $primary-color-strong;
138+
//icons
123139
$function-bar-icons: $primary-color-strong;
124140

141+
//colors for pop-up window that opens when clicking the reconnect button
142+
$pop-up-window-background: $background-color;
143+
$pop-up-window-text: $dark-text;
144+
$reconnect-button: $primary-color-strong;
145+
$reconnect-button-text: $light-text;
146+
125147
/// @type Color
126148
/// fiery-rose changed from ff6569 to F00008 globally to improve contrast
127149
$fiery-rose: #fd0011;
@@ -234,10 +256,15 @@ $highlight-color: rgba(224, 224, 224, 0.5) !default;
234256
$button-text-size: 16px;
235257

236258
//https://coolors.co/780000-c1121f-f6d5bf-fdf0d5-003049-669bbc-a0c1d6
259+
//colors used in the performance tab bar graphs
237260
/// @type Color
238261
$color1: #780000;
239262
$color2: #c1121f;
240-
$color3: #fdf0d5;
241-
$color4: #003049;
242-
$color5: #669bbc;
243-
$color6: #a0c1d6;
263+
$color3: #c1676d;
264+
$color4: #55a8ac;
265+
$color5: #3c6e71;
266+
$color6: #1c494b;
267+
$color7: #003049;
268+
$color8: #105377;
269+
$color9: #669bbc;
270+
$color10: #a0c1d6;

src/app/styles/base/_base.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ body {
2020
grid-area: actions;
2121
transition: 0.5s;
2222
}
23+
24+
.perf-rect {
25+
fill: $perf-background;
26+
}
27+
2328
.state-container-container {
2429
grid-area: states;
2530
}

src/app/styles/components/_actionComponent.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
@extend %disable-highlight;
1616
}
1717

18+
.clear-button {
19+
background-color:#187924;
20+
color:#187924;
21+
}
22+
1823
.action-component-text {
1924
margin-bottom: 8px;
2025
color: $indiv-action-custom-text

src/app/styles/components/_buttons.scss

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.save-series-button {
55
padding: 3px;
66
outline: transparent;
7-
color: white;
7+
color: $performance-save-series-button-text;
88
font-size: 16px;
99
display: flex;
1010
justify-content: center;
@@ -16,7 +16,7 @@
1616
line-height: 1.5em;
1717
font: 400 16px 'Outfit', sans-serif;
1818
width: 120px;
19-
background: $red-color-gradient;
19+
background: $performance-save-series-button;
2020
height: 30px;
2121
position: absolute;
2222
right: 3rem;
@@ -65,6 +65,13 @@
6565
//background: #ff0000;
6666
}
6767

68+
.clear-button {
69+
background:#3256f1;
70+
background-color: #050787;
71+
color:#3256f1
72+
}
73+
74+
6875
.empty-button:hover {
6976
color: black;
7077
box-shadow: $box-shadow-red;
@@ -176,10 +183,10 @@
176183
cursor: pointer;
177184
}
178185

179-
.pause-button {
180-
color: #ff0000;
181-
background-color: #ff0000;
182-
}
186+
// .pause-button {
187+
// color: #ff0000;
188+
// background-color: #ff0000;
189+
// }
183190

184191
.import-button:hover,
185192
.howToUse-button:hover,
@@ -371,8 +378,8 @@ aside {
371378
.reconnect-button-pop-up {
372379
padding: 3px;
373380
outline: transparent;
374-
background: $red-color-gradient;
375-
color: $text-color !important;
381+
background-color: #050787;
382+
color: $reconnect-button-text !important;
376383
border: none;
377384
border-radius: 3px;
378385
cursor: pointer;

0 commit comments

Comments
 (0)