Skip to content

Commit cd86f25

Browse files
committed
styled clear button and route description header
1 parent 10950e8 commit cd86f25

File tree

6 files changed

+55
-45
lines changed

6 files changed

+55
-45
lines changed

src/app/components/Actions/RouteDescription.tsx

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,17 @@ const RouteDescription = (props: RouteProps): JSX.Element => {
1616
const url: URL = new URL(actions[0].props.routePath); // Use new URL to use the url.pathname method.
1717

1818
return (
19-
<div className='routedescription' >
20-
<h3 className='route'>Route: {url.pathname}</h3>
21-
<div style={{
22-
// div that contains slider and snapshots
23-
display: 'flex',
24-
flexDirection: 'row',
25-
height: `${actions.length * 30}px`,
26-
marginBottom: '50px'
27-
}}>
28-
<VerticalSlider className='main-slider' snapshots={actions} />
29-
<div style={{marginTop: '10px'}}>
30-
{/* actual snapshots per route */}
31-
{actions}
32-
</div>
33-
</div>
19+
<div className='route-container'>
20+
<div className='route-header'>Route: {url.pathname}</div>
21+
<div className='route-content' style={{ height: `${actions.length * 30}px` }}>
22+
<VerticalSlider className='main-slider' snapshots={actions} />
23+
<div className='actions-container'>
24+
{/* actual snapshots per route */}
25+
{actions}
26+
</div>
3427
</div>
28+
</div>
3529
);
3630
};
3731

38-
3932
export default RouteDescription;

src/app/containers/ActionContainer.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { Button, Switch } from '@mui/material';
1414
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.
1515
*/
1616

17-
1817
// resetSlider locates the rc-slider elements on the document and resets it's style attributes
1918
const resetSlider = () => {
2019
const slider = document.querySelector('.rc-slider-handle');
@@ -57,7 +56,6 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
5756
children?: [];
5857
}
5958
*/
60-
6159

6260
const displayArray = (obj: Obj): void => {
6361
if (
@@ -234,9 +232,9 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
234232
dropdownSelection={dropdownSelection}
235233
setDropdownSelection={setDropdownSelection}
236234
/>
237-
<div className='action-component exclude'>
235+
<div className='clear-button-container'>
238236
<Button
239-
className='clear-button'
237+
className='clear-button-modern'
240238
variant='text'
241239
onClick={() => {
242240
dispatch(emptySnapshots()); // set slider back to zero, visually
@@ -248,12 +246,11 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
248246
</Button>
249247
</div>
250248
<div className='snapshots'>
251-
{dropdownSelection === 'Provider/Consumer' && <ProvConContainer/>}
252-
{dropdownSelection === 'TimeJump' &&
249+
{dropdownSelection === 'Provider/Consumer' && <ProvConContainer />}
250+
{dropdownSelection === 'TimeJump' &&
253251
Object.keys(routes).map((route, i) => (
254252
<RouteDescription key={`route${i}`} actions={routes[route]} />
255-
))
256-
}
253+
))}
257254
</div>
258255
</div>
259256
) : null}

src/app/styles/abstracts/_variablesLM.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ $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;
74-
// $action-clear-button-text: $background-color;
75-
$route-bar: $primary-color-strong;
76-
$route-bar-text: $light-text;
7773
$indiv-action-input-bg: $background-color-strong;
7874
$indiv-action-selected: darken($background-color, 15%);
7975
$indiv-action-selected-text: $light-text;

src/app/styles/components/_actionComponent.scss

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@
2626
color: $indiv-action-selected-text;
2727
}
2828

29-
.action-component.exclude {
30-
color: #ff0000;
31-
display: flex;
32-
justify-content: center;
33-
margin-top: 10px;
34-
}
35-
3629
.action-component:focus {
3730
outline: none;
3831
}
@@ -46,3 +39,20 @@
4639
overflow: hidden;
4740
@extend %disable-highlight;
4841
}
42+
43+
.route-container {
44+
width: 100%;
45+
}
46+
47+
.route-header {
48+
background-color: #1f2937;
49+
color: #ffffff;
50+
padding: 10px;
51+
font-size: 14px;
52+
}
53+
54+
.route-content {
55+
display: flex;
56+
flex-direction: row;
57+
margin-bottom: 50px;
58+
}

src/app/styles/components/_buttons.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,3 +471,19 @@ aside {
471471
margin-left: 5px;
472472
margin-right: -22px;
473473
}
474+
475+
.clear-button-modern {
476+
width: 100% !important;
477+
background-color: #f3f4f6 !important;
478+
color: #374151 !important;
479+
font-size: 0.875rem !important;
480+
font-weight: 500 !important;
481+
text-transform: uppercase !important;
482+
padding: 0.375rem 1rem !important;
483+
border-radius: 0.375rem !important;
484+
transition: background-color 200ms ease-in-out !important;
485+
}
486+
487+
.clear-button-modern:hover {
488+
background-color: #e5e7eb !important;
489+
}

src/app/styles/layout/_actionContainer.scss

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
.action-container {
22
// overflow: auto;
3+
background: white;
4+
border-right: 1px solid #e5e7eb;
5+
transition: width 0.3s ease;
36
overflow-x: hidden;
4-
background-color: $action-tab-background;
57
}
68

79
.actionname {
@@ -34,14 +36,10 @@
3436
width: 28px;
3537
}
3638

37-
.route {
38-
background-color: $route-bar;
39-
color: $route-bar-text;
40-
padding-left: 10px;
41-
padding-top: 5px;
42-
padding-bottom: 5px;
43-
}
44-
4539
.toggle-record {
4640
color: $toggle-record-text;
47-
}
41+
}
42+
43+
.clear-button-container {
44+
padding: 16px;
45+
}

0 commit comments

Comments
 (0)