Skip to content

Commit 9e87aa3

Browse files
committed
Converted route filter on performance tab from mui component to regular html component.
Co-authored-by: Chris LeBrett <[email protected]> Co-authored-by: Robby Tipton <[email protected]> Co-authored-by: Joseph Park <[email protected]> Co-authored-by: David Kim <[email protected]> Co-authored-by: Kevin HoEun Lee <[email protected]>
1 parent a32d1b5 commit 9e87aa3

File tree

4 files changed

+54
-47
lines changed

4 files changed

+54
-47
lines changed

src/app/components/BarGraph.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -150,24 +150,24 @@ const BarGraph = props => {
150150
>
151151
Save Series
152152
</button>
153+
<form className="routesForm" id="routes-formcontrol">
154+
<label id="routes-dropdown">Select Route: </label>
155+
<select
156+
labelId="demo-simple-select-label"
157+
id="routes-select"
158+
onChange={e => setRoute(e.target.value)}
159+
>
160+
<option>
161+
All Routes
162+
</option>
163+
{allRoutes.map(route => (
164+
<option className="routes">
165+
{route}
166+
</option>
167+
))}
168+
</select>
169+
</form>
153170
</div>
154-
<FormControl className="routesForm" id="routes-formcontrol" size="small">
155-
<InputLabel id="routes-dropdown">Select Route</InputLabel>
156-
<Select
157-
labelId="demo-simple-select-label"
158-
id="routes-select"
159-
onChange={e => setRoute(e.target.value)}
160-
>
161-
<MenuItem value={null}>
162-
All Visited Routes
163-
</MenuItem>
164-
{allRoutes.map(route => (
165-
<MenuItem value={route} className="routes">
166-
{route}
167-
</MenuItem>
168-
))}
169-
</Select>
170-
</FormControl>
171171
<svg ref={containerRef} width={width} height={height}>
172172
<rect
173173
x={0}

src/app/components/PerformanceVisx.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ const PerformanceVisx = (props: BarStackProps) => {
178178
const [series, setSeries] = useState(true);
179179
const [action, setAction] = useState(false);
180180

181-
const [route, setRoute] = useState(null);
181+
const [route, setRoute] = useState('All Routes');
182182

183183
useEffect(() => {
184184
dispatch(setCurrentTabInApp('performance'));
@@ -242,7 +242,7 @@ const PerformanceVisx = (props: BarStackProps) => {
242242
filteredSnapshots.push(data.barStack[i]);
243243
}
244244
}
245-
if (route) {
245+
if (route !== 'All Routes') {
246246
data.barStack = filteredSnapshots;
247247
}
248248

src/app/styles/components/_buttons.scss

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
align-items: center;
1010
border-style: solid;
1111
border-color: transparent;
12-
border-radius: 3px;
12+
border-radius: 5px;
1313
cursor: pointer;
1414
line-height: 1.5em;
15-
font: 300 14px 'Roboto', sans-serif;
16-
font-size: $button-text-size;
15+
font: 400 14px 'Roboto', sans-serif;
16+
// font-size: $button-text-size;
1717
width: 120px;
1818
background: $red-color-gradient;
1919
height: 30px;
2020
position: absolute;
21-
right: 2.5rem;
21+
right: 3rem;
2222

2323
&.animate {
2424
background: rgb(41, 164, 41);
@@ -196,7 +196,6 @@
196196
background: $blue-color-gradient;
197197
}
198198

199-
200199
.import-button:hover,
201200
.howToUse-button:hover,
202201
.export-button:hover,
@@ -241,9 +240,11 @@
241240
.dropdown-dark {
242241
background: #444;
243242
border-color: #111111 #0a0a0a black;
244-
background-image: -webkit-linear-gradient(top,
245-
transparent,
246-
rgba(0, 0, 0, 0.4));
243+
background-image: -webkit-linear-gradient(
244+
top,
245+
transparent,
246+
rgba(0, 0, 0, 0.4)
247+
);
247248
background-image: -moz-linear-gradient(top, transparent, rgba(0, 0, 0, 0.4));
248249
background-image: -o-linear-gradient(top, transparent, rgba(0, 0, 0, 0.4));
249250
background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
@@ -271,7 +272,7 @@
271272
color: #ccc;
272273
}
273274

274-
.dropdown-dark .dropdown-select>option {
275+
.dropdown-dark .dropdown-select > option {
275276
background: #444;
276277
text-shadow: 0 1px rgba(0, 0, 0, 0.4);
277278
}
Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,62 @@
11
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
22

33
#RenderContainer {
4-
display: flex;
5-
justify-content: center;
4+
display: flex;
5+
justify-content: center;
66
}
77

88
.MuiSwitch-colorPrimary.Mui-checked {
9-
color: #62d6fb !important;
9+
color: #62d6fb !important;
1010
}
1111

1212
.MuiSwitch-switchBase {
13-
color: #ff6569 !important;
13+
color: #ff6569 !important;
1414
}
1515

1616
.MuiSwitch-track {
17-
background-color: #e7e7e7 !important;
17+
background-color: #e7e7e7 !important;
1818
}
1919

2020
.MuiTypography-body1 {
21-
font-size: 2em !important;
21+
font-size: 2em !important;
2222
}
2323

2424
#routes-formcontrol {
2525
padding: 3px;
2626
margin-left: 50px;
27-
font: 300 13px 'Roboto', sans-serif;
27+
font: 400 14px 'Roboto', sans-serif;
2828
text-align: left;
29-
min-width: 10em;
30-
max-height: 50%;
29+
// min-width: 10em;
30+
// max-height: 50%;
3131
}
3232

3333
#routes-dropdown {
3434
color: white !important;
35-
background-color: #ff6569 !important;
36-
font: 300 13px 'Roboto', sans-serif;
35+
// background-color: #ff6569 !important;
36+
font: 400 14px 'Roboto', sans-serif;
3737
text-align: left;
3838
}
3939

4040
#routes-select {
4141
color: white !important;
4242
background-color: #ff6569 !important;
43-
font: 300 13px 'Roboto', sans-serif;
43+
font: 400 14px 'Roboto', sans-serif;
4444
text-align: left;
45+
width: 120px;
46+
height: 30px;
47+
border-radius: 5px;
48+
text-align: center;
4549
}
4650

4751
#seriesname {
48-
float: right;
49-
width: 220px;
50-
margin-right: 165px;
51-
height: 24px;
52+
float: right;
53+
width: 220px;
54+
margin-right: 165px;
55+
height: 24px;
5256
}
5357

54-
input:focus, textarea:focus, select:focus{
55-
outline: none;
56-
}
58+
input:focus,
59+
textarea:focus,
60+
select:focus {
61+
outline: none;
62+
}

0 commit comments

Comments
 (0)