Skip to content

Commit 3373318

Browse files
committed
Fixed merge conflicts
2 parents 9a98e6a + 5424815 commit 3373318

File tree

12 files changed

+112
-43
lines changed

12 files changed

+112
-43
lines changed

README.fr.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ Après avoir cloné ce référentiel, les développeurs peuvent simplement exéc
131131

132132
## <b>Auteurs</b>
133133

134+
- **Kris Sorensen** - [@kris-sorensen](https://github.com/kris-sorensen)
135+
- **Daljit Gill** - [@dgill05](https://github.com/dgill05)
136+
- **Ben Michareune** - [@bmichare](https://github.com/bmichare)
137+
- **Dane Corpion** - [@danecorpion](https://github.com/danecorpion)
134138
- **Becca Viner** - [@rtviner](https://github.com/rtviner)
135139
- **Caitlin Chan** - [@caitlinchan23](https://github.com/caitlinchan23)
136140
- **Kim Mai Nguyen** - [@Nkmai](https://github.com/Nkmai)

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ After cloning this repository, developers can simply run `npm run docs` at the r
156156
- [What time is it? Reactime!](https://medium.com/@liuedar/what-time-is-it-reactime-fd7267b9eb89)
157157

158158
## <b>Authors</b>
159+
160+
- **Kris Sorensen** - [@kris-sorensen](https://github.com/kris-sorensen)
161+
- **Daljit Gill** - [@dgill05](https://github.com/dgill05)
162+
- **Ben Michareune** - [@bmichare](https://github.com/bmichare)
163+
- **Dane Corpion** - [@danecorpion](https://github.com/danecorpion)
159164
- **Harry Fox** - [@StackOverFlowWhereArtThou](https://github.com/StackOverFlowWhereArtThou)
160165
- **Nathan Richardson** - [@BagelEnthusiast](https://github.com/BagelEnthusiast)
161166
- **David Bernstein** - [@dangitbobbeh](https://github.com/dangitbobbeh)

README.rus.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ Reactime beta поддерживает приложения, написанны
107107

108108
## <b>Авторы</b>
109109

110+
- **Kris Sorensen** - [@kris-sorensen](https://github.com/kris-sorensen)
111+
- **Daljit Gill** - [@dgill05](https://github.com/dgill05)
112+
- **Ben Michareune** - [@bmichare](https://github.com/bmichare)
113+
- **Dane Corpion** - [@danecorpion](https://github.com/danecorpion)
110114
- **Becca Viner** - [@rtviner](https://github.com/rtviner)
111115
- **Caitlin Chan** - [@caitlinchan23](https://github.com/caitlinchan23)
112116
- **Kim Mai Nguyen** - [@Nkmai](https://github.com/Nkmai)

src/app/components/BarGraph.tsx

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ const tooltipStyles = {
6262
const BarGraph = props => {
6363
const [{ tabs, currentTab }, dispatch] = useStoreContext();
6464
const { width, height, data, comparison } = props;
65+
<<<<<<< HEAD
6566
const [ seriesNameInput, setSeriesNameInput ] = useState(`Series ${comparison.length + 1}`);
67+
=======
68+
const [seriesNameInput, setSeriesNameInput] = useState(`Series ${comparison.length}`);
69+
>>>>>>> master
6670
const {
6771
tooltipOpen,
6872
tooltipLeft,
@@ -123,11 +127,11 @@ const BarGraph = props => {
123127
}
124128
}
125129
});
126-
130+
127131
const saveSeriesClickHandler = () => {
128132
if (tabs[currentTab].seriesSavedStatus === 'inputBoxOpen') {
129133
const actionNames = document.getElementsByClassName('actionname');
130-
for (let i = 0; i < actionNames.length; i++ ) {
134+
for (let i = 0; i < actionNames.length; i++) {
131135
toStorage.data.barStack[i].name = actionNames[i].value;
132136
}
133137
dispatch(save(toStorage, seriesNameInput));
@@ -137,18 +141,25 @@ const BarGraph = props => {
137141
dispatch(save(toStorage))
138142
}
139143

144+
<<<<<<< HEAD
140145
const textbox = tabs[currentTab].seriesSavedStatus === 'inputBoxOpen' ? <input type="text" className="seriesNameInput" value={seriesNameInput} onChange={e => setSeriesNameInput(e.target.value)} /> : null;
146+
=======
147+
const textbox = tabs[currentTab].seriesSavedStatus === 'inputBoxOpen' ? <input type="text" id="seriesname" placeholder="Enter Series Name" onChange={e => setSeriesNameInput(e.target.value)} /> : null;
148+
>>>>>>> master
141149
return (
142150
<div className="bargraph-position">
151+
143152
{/* <input type="text" id ="seriesname" placeholder="Series Name" /> */}
144-
{textbox}
145-
<button
146-
type="button"
147-
className="save-series-button"
148-
onClick={saveSeriesClickHandler}
149-
>
150-
Save Series
151-
</button>
153+
<div>
154+
{textbox}
155+
<button
156+
type="button"
157+
className="save-series-button"
158+
onClick={saveSeriesClickHandler}
159+
>
160+
Save Series
161+
</button>
162+
</div>
152163
<svg ref={containerRef} width={width} height={height}>
153164
<rect
154165
x={0}
@@ -191,8 +202,8 @@ const BarGraph = props => {
191202
height={bar.height === 0 ? null : bar.height}
192203
width={bar.width}
193204
fill={bar.color}
194-
/* TIP TOOL EVENT HANDLERS */
195-
// Hides tool tip once cursor moves off the current rect.
205+
/* TIP TOOL EVENT HANDLERS */
206+
// Hides tool tip once cursor moves off the current rect.
196207
onMouseLeave={() => {
197208
dispatch(
198209
onHoverExit(data.componentData[bar.key].rtid),
@@ -201,7 +212,7 @@ const BarGraph = props => {
201212
}, 300)),
202213
);
203214
}}
204-
// Cursor position in window updates position of the tool tip.
215+
// Cursor position in window updates position of the tool tip.
205216
onMouseMove={event => {
206217
dispatch(onHover(data.componentData[bar.key].rtid));
207218
if (tooltipTimeout) clearTimeout(tooltipTimeout);

src/app/components/ComponentMap.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ export default function ComponentMap({
193193
// }
194194
// };
195195
// inner(state);
196-
197196
// return result;
198197
// --------------------------------------------------------------------------------------------
199198
return ['stateful'];

src/app/containers/ActionContainer.tsx

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
// @ts-nocheck
2-
import React, { useEffect } from 'react';
2+
import React, { useEffect, useState } from 'react';
33

4+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5+
import {
6+
faToggleOff,
7+
faToggleOn,
8+
} from '@fortawesome/free-solid-svg-icons';
49
import Action from '../components/Action';
510
import SwitchAppDropdown from '../components/SwitchApp';
611
import { emptySnapshots, changeView, changeSlider } from '../actions/actions';
@@ -14,13 +19,15 @@ const resetSlider = () => {
1419
};
1520

1621
function ActionContainer(props): JSX.Element {
17-
const [{ tabs, currentTab }, dispatch] = useStoreContext();
22+
const [{ tabs, currentTab, port }, dispatch] = useStoreContext();
1823
const {
1924
currLocation, hierarchy, sliderIndex, viewIndex, snapshots,
2025
} = tabs[currentTab];
2126
const {
22-
toggleActionContainer, actionView, setActionView
27+
toggleActionContainer, actionView, setActionView,
2328
} = props;
29+
const [recordingActions, setRecordingActions] = useState(true);
30+
2431
let actionsArr = [];
2532
const hierarchyArr: any[] = [];
2633

@@ -125,24 +132,41 @@ function ActionContainer(props): JSX.Element {
125132
setActionView(true);
126133
}, [setActionView]);
127134

135+
// Function sends message to background.js which sends message to the content script
128136
const toggleRecord = () => {
129137
port.postMessage({
130138
action: 'toggleRecord',
139+
tabId: currentTab,
131140
});
132-
// change color of record button or switch svg/img file
141+
// Record button's icon is being togggled on click
142+
setRecordingActions(!recordingActions);
133143
};
134144

135145
// the conditional logic below will cause ActionContainer.test.tsx to fail as it cannot find the Empty button
136146
// UNLESS actionView={true} is passed into <ActionContainer /> in the beforeEach() call in ActionContainer.test.tsx
137147
return (
138148
<div id="action-id" className="action-container">
139-
<div id="arrow">
140-
<aside className="aside">
141-
<a onClick={toggleActionContainer} className="toggle">
142-
<i />
143-
</a>
144-
</aside>
145-
{/* <button className="recordBtn" onClick={toggleRecord}>Record</button> */}
149+
<div className="actionToolContainer">
150+
<div id="arrow">
151+
<aside className="aside">
152+
<a onClick={toggleActionContainer} className="toggle">
153+
<i />
154+
</a>
155+
</aside>
156+
157+
</div>
158+
<a
159+
type="button"
160+
id="recordBtn"
161+
onClick={toggleRecord}
162+
>
163+
<i />
164+
{recordingActions ? (
165+
<FontAwesomeIcon className="fa-regular" icon={faToggleOn} />
166+
) : (
167+
<FontAwesomeIcon className="fa-regular" icon={faToggleOff} />
168+
)}
169+
</a>
146170
</div>
147171
{actionView ? (
148172
<div className="action-button-wrapper">

src/app/containers/MainContainer.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,21 @@ function MainContainer(): any {
3030
setActionView(!actionView);
3131
const toggleElem = document.querySelector('aside');
3232
toggleElem.classList.toggle('no-aside');
33+
// hides the record toggle button from Actions Container in Time Jump sidebar view
34+
const recordBtn = document.getElementById('recordBtn');
35+
if (recordBtn.style.display === 'none') {
36+
recordBtn.style.display = 'flex';
37+
} else {
38+
recordBtn.style.display = 'none';
39+
}
3340
};
34-
41+
// let port;
3542
useEffect(() => {
3643
// only open port once
3744
if (currentPort) return;
3845

3946
// open long-lived connection with background script
4047
const port = chrome.runtime.connect();
41-
4248
// listen for a message containing snapshots from the background script
4349
port.onMessage.addListener(
4450
(message: {
@@ -209,4 +215,4 @@ function MainContainer(): any {
209215
);
210216
}
211217

212-
export default MainContainer;
218+
export default MainContainer;

src/app/styles/components/_buttons.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,15 @@
321321

322322
/* sidebar button open and closing functionality */
323323
aside {
324-
width: 250px;
324+
// width: 250px;
325325
background: #242529;
326326
color: #fff;
327327
transition: width 1s;
328328
}
329329

330330
.no-aside {
331331
width: 30px;
332+
margin-right: 15px;
332333
}
333334

334335
.toggle {
@@ -352,8 +353,8 @@ aside {
352353
}
353354

354355
.toggle i {
355-
top: 46%;
356-
left: 4%;
356+
top: 8px;
357+
left: 9px;
357358
display: block;
358359
background: $blue-brand;
359360
}

src/app/styles/components/_performanceVisx.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
justify-content: center;
44
}
55

6-
.MuiSwitch-colorPrimary.Mui-checked {
6+
.MuiSwitch-colorPrimary.Mui-checked {
77
color: #62d6fb !important;
88
}
99

1010
.MuiSwitch-switchBase {
11-
color: #ff6569 !important;
11+
color: #ff6569 !important;
1212
}
1313

1414
.MuiSwitch-track {
@@ -17,8 +17,11 @@
1717

1818
.MuiTypography-body1 {
1919
font-size: 1em !important;
20-
}
20+
}
2121

2222
.seriesNameInput {
2323
background-color: white;
24+
float: right;
25+
width: 117px;
26+
margin-right: 38px;
2427
}

src/app/styles/layout/_actionContainer.scss

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@
99
color: #fffeff;
1010
}
1111

12-
.recordBtn{
13-
position: relative;
14-
left: 80%;
15-
// visibility: hidden;
12+
#recordBtn{
13+
height: 100%;
14+
display:flex;
15+
}
16+
17+
.actionToolContainer{
18+
display: flex;
19+
justify-content: space-between;
20+
align-items: center;
21+
}
22+
23+
#recordBtn .fa-regular{
24+
height: 100%;
25+
width: 28px;
1626
}

0 commit comments

Comments
 (0)