Skip to content

Commit d2864e6

Browse files
committed
styled the clear button
1 parent fd2b5f2 commit d2864e6

File tree

8 files changed

+50
-87
lines changed

8 files changed

+50
-87
lines changed

src/app/App.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React from 'react';
22
import { MemoryRouter as Router } from 'react-router-dom';
33
import MainContainer from './containers/MainContainer';
4-
import { ThemeProvider } from '@mui/material/styles';
5-
import theme from './styles/theme';
64

75
/*
86
'currentTab' is the current active tab within Google Chrome.
@@ -12,12 +10,10 @@ import theme from './styles/theme';
1210

1311
function App(): JSX.Element {
1412
return (
15-
<ThemeProvider theme={theme}>
16-
<Router>
17-
{/* we wrap our application with the <Router> tag so that all components that are nested will have the react-router context */}
18-
<MainContainer />
19-
</Router>
20-
</ThemeProvider>
13+
<Router>
14+
{/* we wrap our application with the <Router> tag so that all components that are nested will have the react-router context */}
15+
<MainContainer />
16+
</Router>
2117
);
2218
}
2319

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,7 @@ export default function ComponentMap({
215215
};
216216

217217
let filtered = processTreeData(currentSnapshot);
218-
console.log('filtered', filtered);
219-
collectNodes(filtered);
218+
collectNodes(currentSnapshot);
220219

221220
const keepContextAndProviderNodes = (node) => {
222221
if (!node) return null;
@@ -248,7 +247,6 @@ export default function ComponentMap({
248247
};
249248

250249
const contextProvidersOnly = keepContextAndProviderNodes(currentSnapshot);
251-
console.log('context only', contextProvidersOnly);
252250

253251
// @ts
254252
// find the node that has been selected and use it as the root

src/app/containers/ActionContainer.tsx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import ProvConContainer from './ProvConContainer';
1111
import { ActionContainerProps, CurrentTab, MainState, Obj, RootState } from '../FrontendTypes';
1212
import { Button, Switch } from '@mui/material';
1313

14-
1514
/*
1615
This file renders the 'ActionContainer'. The action container is the leftmost column in the application. It includes the button that shrinks and expands the action container, a dropdown to select the active site, a clear button, the current selected Route, and a list of selectable snapshots with timestamps.
1716
*/
@@ -27,7 +26,6 @@ const resetSlider = () => {
2726
};
2827

2928
function ActionContainer(props: ActionContainerProps): JSX.Element {
30-
3129
const [dropdownSelection, setDropdownSelection] = useState('TimeJump');
3230

3331
const dispatch = useDispatch();
@@ -229,15 +227,14 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
229227
</a>
230228
<SwitchAppDropdown />
231229
{/* add new component here for dropdown menu for useStae/ useReducer- ragad */}
232-
<DropDown
233-
dropdownSelection = {dropdownSelection}
234-
setDropdownSelection={setDropdownSelection}
235-
/>
230+
<DropDown
231+
dropdownSelection={dropdownSelection}
232+
setDropdownSelection={setDropdownSelection}
233+
/>
236234
<div className='action-component exclude'>
237235
<Button
238236
className='clear-button'
239-
variant='contained'
240-
//style={{ backgroundColor: '#ff6569' }}
237+
variant='text'
241238
onClick={() => {
242239
dispatch(emptySnapshots()); // set slider back to zero, visually
243240
resetSlider();
@@ -247,12 +244,11 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
247244
Clear
248245
</Button>
249246
</div>
250-
{dropdownSelection === 'Provider/Consumer' && <ProvConContainer/>}
251-
{dropdownSelection === 'TimeJump' &&
247+
{dropdownSelection === 'Provider/Consumer' && <ProvConContainer />}
248+
{dropdownSelection === 'TimeJump' &&
252249
Object.keys(routes).map((route, i) => (
253250
<RouteDescription key={`route${i}`} actions={routes[route]} />
254-
))
255-
}
251+
))}
256252
</div>
257253
) : null}
258254
</div>

src/app/containers/MainContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function MainContainer(): JSX.Element {
3333
const { connectionStatus }: MainState = useSelector((state: RootState) => state.main);
3434

3535
// JR 12.22.23: so far this log always returns true
36-
// console.log('MainContainer connectionStatus at initialization: ', connectionStatus);
36+
console.log('MainContainer connectionStatus at initialization: ', connectionStatus);
3737

3838
const [actionView, setActionView] = useState(true); // We create a local state 'actionView' and set it to true
3939

src/app/styles/abstracts/_variablesLM.scss

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ $contrasting-color: #161617;
2626
$contrasting-color-weak: #353536;
2727

2828
/// HEATMAP COLORS
29-
$heat-level-1: #F1B476;
30-
$heat-level-2: #E4765B;
31-
$heat-level-3: #C64442;
32-
$heat-level-4: #8C2743;
29+
$heat-level-1: #f1b476;
30+
$heat-level-2: #e4765b;
31+
$heat-level-3: #c64442;
32+
$heat-level-4: #8c2743;
3333

3434
/////////////////////////////////////////////////////////////////////
3535
// ALL OF THE FOLLOWING COLORS SHOULD REFERENCE A COLOR FROM ABOVE //
3636
/////////////////////////////////////////////////////////////////////
3737

3838
/// @type Color
39-
39+
4040
//general text color theme
4141
$dark-text: $contrasting-color;
4242
$light-text: $background-color;
@@ -70,14 +70,14 @@ $tab-arrow-indicator: lighten($contrasting-color, 30%);
7070
//SNAPSHOTS AND ROUTES LIST
7171
$action-tab-background: $background-color;
7272
$action-cont-border: $contrasting-color;
73-
//$action-clear-button: $primary-color; //currently being handled by mui theme.ts file
74-
//$action-clear-button-text: $background-color; //currently being handled by mui theme.ts file
73+
// $action-clear-button: $primary-color;
74+
// $action-clear-button-text: $background-color;
7575
$route-bar: $primary-color-strong;
7676
$route-bar-text: $light-text;
7777
$indiv-action-input-bg: $background-color-strong;
7878
$indiv-action-selected: darken($background-color, 15%);
7979
$indiv-action-selected-text: $light-text;
80-
$indiv-action-filler-text: lighten($contrasting-color,60%);
80+
$indiv-action-filler-text: lighten($contrasting-color, 60%);
8181
$indiv-action-custom-text: $dark-text;
8282
$indiv-action-border: $contrasting-color-weak;
8383
$indiv-action-time: $primary-color-weak;
@@ -98,12 +98,12 @@ $header-button-inactive-text: $dark-text;
9898
$header-button-hover: lighten($header-button-inactive, 20%);
9999

100100
//the buttons/tabs controlling what is displayed in STATECONTAINER (Map, Performance, History, Web Metrics, Tree)
101-
$navbar-background: $background-color; //this color only shows up in Diff mode when buttons don't fill the whole bar //DIFF FEATURE IS CURRENTLY COMMENTED OUT
101+
$navbar-background: $background-color; //this color only shows up in Diff mode when buttons don't fill the whole bar //DIFF FEATURE IS CURRENTLY COMMENTED OUT
102102
$navbar-selected: $primary-color-strong;
103103
$navbar-selected-text: $light-text;
104104
$navbar-unselected: $primary-color-weak;
105105
$navbar-unselected-text: $dark-text;
106-
$navbar-hover: darken($navbar-unselected,15%);
106+
$navbar-hover: darken($navbar-unselected, 15%);
107107

108108
$state-background: $background-color-strong;
109109
$state-cont-border: $contrasting-color;

src/app/styles/components/_actionComponent.scss

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,15 @@
1515
@extend %disable-highlight;
1616
}
1717

18-
.clear-button {
19-
background-color:#187924;
20-
color:#187924;
21-
}
22-
2318
.action-component-text {
2419
margin-bottom: 8px;
25-
color: $indiv-action-custom-text
20+
color: $indiv-action-custom-text;
2621
}
2722

2823
.action-component.selected {
2924
//font-size: 16px;
3025
background-color: $indiv-action-selected;
31-
color: $indiv-action-selected-text
26+
color: $indiv-action-selected-text;
3227
}
3328

3429
.action-component.exclude {

src/app/styles/components/_buttons.scss

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
border-radius: 5px;
1414
cursor: pointer;
1515
line-height: 1.5em;
16-
font: 400 16px 'Outfit', sans-serif;
16+
font:
17+
400 16px 'Outfit',
18+
sans-serif;
1719
width: 120px;
1820
background: $performance-save-series-button;
1921
height: 30px;
@@ -37,7 +39,9 @@
3739
border-radius: 3px;
3840
cursor: pointer;
3941
line-height: 1.5em;
40-
font: 300 16px 'Outfit', sans-serif;
42+
font:
43+
300 16px 'Outfit',
44+
sans-serif;
4145
font-size: $button-text-size;
4246
width: 120px;
4347
height: 30px;
@@ -59,17 +63,13 @@
5963
border-radius: 3px;
6064
cursor: pointer;
6165
line-height: 1.5em;
62-
font: 500 16px 'Roboto', sans-serif;
66+
font:
67+
500 16px 'Roboto',
68+
sans-serif;
6369
width: 120px;
6470
//background: #ff0000;
6571
}
6672

67-
.clear-button {
68-
background: #3256f1;
69-
background-color: #050787;
70-
color: #3256f1;
71-
}
72-
7373
.empty-button:hover {
7474
color: black;
7575
box-shadow: #ff0001;
@@ -87,7 +87,9 @@
8787
.action-component:hover .jump-button {
8888
opacity: 1;
8989
transform: rotateX(0deg);
90-
transition: opacity 300ms, transform 0.15s linear;
90+
transition:
91+
opacity 300ms,
92+
transform 0.15s linear;
9193
}
9294

9395
.time-button {
@@ -114,7 +116,9 @@
114116
background-color: #232529;
115117
color: #ffffff;
116118
transform: rotateX(90deg);
117-
transition: opacity 300ms, transform 0.15s linear;
119+
transition:
120+
opacity 300ms,
121+
transform 0.15s linear;
118122
opacity: 0;
119123
display: flex;
120124
align-items: center;
@@ -215,7 +219,9 @@
215219
align-items: center;
216220
cursor: pointer;
217221
line-height: 1.5em;
218-
font: 300 16px 'Outfit', sans-serif;
222+
font:
223+
300 16px 'Outfit',
224+
sans-serif;
219225
font-size: $button-text-size;
220226

221227
background: #ff0001;
@@ -234,8 +240,12 @@
234240
background-image: -moz-linear-gradient(top, transparent, rgba(0, 0, 0, 0.4));
235241
background-image: -o-linear-gradient(top, transparent, rgba(0, 0, 0, 0.4));
236242
background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
237-
-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px 1px rgba(0, 0, 0, 0.2);
238-
box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px 1px rgba(0, 0, 0, 0.2);
243+
-webkit-box-shadow:
244+
inset 0 1px rgba(255, 255, 255, 0.1),
245+
0 1px 1px rgba(0, 0, 0, 0.2);
246+
box-shadow:
247+
inset 0 1px rgba(255, 255, 255, 0.1),
248+
0 1px 1px rgba(0, 0, 0, 0.2);
239249
}
240250

241251
.dropdown-dark:before {
@@ -275,7 +285,6 @@
275285
}
276286

277287
.dropdown-and-delete-series-container {
278-
279288
display: flex;
280289
align-items: center;
281290
justify-content: space-around;

src/app/styles/theme.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)