Skip to content

Commit b4c2aac

Browse files
committed
commented out useEffect in ActionContainer. Playing around with collapsing arrow and putting labels into actionToolContainer. committing before I mmake some style changes so that I can save my progress.
1 parent be0cce9 commit b4c2aac

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

src/app/containers/ActionContainer.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,11 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
146146
);
147147
},
148148
);
149-
useEffect(() => {
150-
setActionView(true);
151-
}, [setActionView]);
149+
150+
// JR: this is questionable, why would you always set it to true?
151+
// useEffect(() => {
152+
// setActionView(true);
153+
// }, [setActionView]);
152154

153155
// Function sends message to background.js which sends message to the content script
154156
const toggleRecord = (): void => {
@@ -181,12 +183,21 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
181183
<div className='actionToolContainer'>
182184
<div id='arrow'>
183185
<aside className='aside'>
184-
<a onClick={toggleActionContainer} className='toggle'>
186+
<a
187+
onClick={(e) => {
188+
e.stopPropagation;
189+
toggleActionContainer();
190+
}}
191+
className='toggle'
192+
>
193+
{' '}
194+
{/* JR: updating onClick to stop propgation so that it detects the click only on the arrow and not the parent*/}
185195
<i />
186196
</a>
187197
</aside>
188198
</div>
189199
<a type='button' id='recordBtn' onClick={toggleRecord}>
200+
<i />
190201
<div style={{ display: 'flex', alignItems: 'center' }}>Toggle Record</div>
191202
{recordingActions ? <Switch defaultChecked /> : <Switch />}
192203
</a>

src/app/styles/components/_buttons.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;300;400;500;600;700;800;900&display=swap');
22

3-
43
.save-series-button {
54
padding: 3px;
65
outline: transparent;
@@ -308,8 +307,8 @@ aside {
308307
}
309308

310309
.no-aside {
311-
width: 30px;
312-
margin-right: 15px;
310+
width: 45px;
311+
// margin-right: 15px;
313312
}
314313

315314
.toggle {
@@ -349,6 +348,7 @@ aside {
349348
.toggle i::before {
350349
content: '';
351350
display: block;
351+
// top: -5px;
352352
}
353353

354354
.toggle i::before {
@@ -372,7 +372,7 @@ aside {
372372
.reconnect-button-pop-up {
373373
padding: 3px;
374374
outline: transparent;
375-
background: $red-color-gradient;
375+
background: $red-color-gradient;
376376
color: $text-color !important;
377377
border: none;
378378
border-radius: 3px;
@@ -405,7 +405,7 @@ aside {
405405
.close-icon-pop-up {
406406
cursor: pointer;
407407
color: $text-color;
408-
font-size: 20px;
408+
font-size: 20px;
409409
padding-right: 8px;
410410
color: black;
411411
}
@@ -430,4 +430,4 @@ aside {
430430
color: #d72828;
431431
margin-left: 5px;
432432
margin-right: -22px;
433-
}
433+
}

src/app/styles/layout/_actionContainer.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
display: flex;
2020
justify-content: space-between;
2121
align-items: center;
22+
height: 40px;
2223
}
2324

2425
#recordBtn .fa-regular {

0 commit comments

Comments
 (0)