Skip to content

Commit d7f9593

Browse files
committed
Merge branch 'reactime7' of https://github.com/caitlinchan23/reactime into reactime7
2 parents 755d7e1 + ddeb918 commit d7f9593

File tree

12 files changed

+23
-37
lines changed

12 files changed

+23
-37
lines changed

src/app/components/LinkControls.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const controlStyles = {
77
};
88

99
const dropDownStyle = {
10-
margin: '0.5em',
10+
margin: '0.5em',
1111
fontSize: '12px',
1212
borderRadius: '4px',
1313
backgroundColor: 'rgb(231, 231, 231)'

src/app/components/PerformanceVisx.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ const PerformanceVisx = (props: BarStackProps) => {
217217
key={`bar-stack-${barStack.index}-${bar.index}`}
218218
x={bar.x}
219219
y={bar.y}
220-
height={bar.height === 0 ? idx + 1 : bar.height}
220+
height={bar.height === 0 ? null : bar.height}
221221
width={bar.width}
222222
fill={bar.color}
223223
/* TIP TOOL EVENT HANDLERS */

src/app/components/SwitchApp.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,21 @@ const SwitchAppDropdown = () => {
1818
label: tabs[currentTab].title,
1919
};
2020

21+
const customStyles = {
22+
menu: (provided, state) => {
23+
const outline = state.isSelected ? 'transparent' : 'transparent';
24+
const margin = 0;
25+
26+
return {...provided, outline, margin};
27+
}
28+
}
29+
2130
return (
2231
<Select
2332
className="tab-select-container"
2433
classNamePrefix="tab-select"
2534
value={currTab}
35+
styles={customStyles}
2636
onChange={e => {
2737
dispatch(setTab(parseInt(e.value, 10)));
2838
}}

src/app/containers/ButtonsContainer.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function ButtonsContainer() {
5555
const [{ tabs, currentTab }, dispatch] = useStoreContext();
5656
const {
5757
snapshots,
58-
mode: { paused, locked, persist },
58+
mode: { paused, persist },
5959
} = tabs[currentTab];
6060

6161
return (
@@ -68,13 +68,6 @@ function ButtonsContainer() {
6868
{paused? <FontAwesomeIcon icon={faUnlock} /> : <FontAwesomeIcon icon={faLock} />}
6969
{paused ? 'Unlock' : 'Lock'}
7070
</button>
71-
{/* <button
72-
className="lock-button"
73-
type="button"
74-
onClick={() => dispatch(toggleMode('locked'))}
75-
>
76-
{locked ? 'Unlocked': 'Locked'}
77-
</button> */}
7871
<button
7972
className="persist-button"
8073
type="button"

src/app/reducers/mainReducer.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,6 @@ export default (state, action) => produce(state, draft => {
185185
case 'paused':
186186
actionText = 'setPause';
187187
break;
188-
case 'locked':
189-
actionText = 'setLock';
190-
break;
191188
case 'persist':
192189
actionText = 'setPersist';
193190
break;

src/app/styles/components/_buttons.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
font: 300 14px 'Roboto', sans-serif;
1515
font-size: $button-text-size;
1616
width: 120px;
17-
background-color: transparent;
17+
background: linear-gradient(145deg, #ff6569, #e65558);
1818
}
1919
.empty-button:hover {
2020
color: black;
21-
background: linear-gradient(145deg, #ff6569, #e65558);
2221
box-shadow: inset 5px 5px 10px #d95053, inset -5px -5px 10px #ff6c71;
2322
}
2423

@@ -128,7 +127,6 @@
128127
.import-button,
129128
.howToUse-button,
130129
.export-button,
131-
.lock-button,
132130
.pause-button,
133131
.persist-button {
134132
@extend %button-shared;
@@ -139,7 +137,6 @@
139137
.import-button:hover,
140138
.howToUse-button:hover,
141139
.export-button:hover,
142-
.lock-button:hover,
143140
.pause-button:hover,
144141
.persist-button:hover {
145142
@extend %button-shared;

src/backend/__tests__/linkFiber.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ describe('unit test for linkFiber', () => {
6969
mode = {
7070
jumping: false,
7171
paused: false,
72-
locked: false,
7372
};
7473
linkFiber = linkFiberStart(snapShot, mode);
7574

src/backend/index.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const snapShot: Snapshot = {
2424
const mode: Mode = {
2525
jumping: false,
2626
paused: false,
27-
locked: false,
2827
};
2928
// console.log("linkFiberStart in index.ts:" + linkFiberStart);
3029
const linkFiber = linkFiberStart(snapShot, mode);
@@ -54,9 +53,6 @@ window.addEventListener('message', ({ data: { action, payload } }: MsgData) => {
5453
// try to modify workInProgress tree from here
5554
// window.history.pushState('', '', getRouteURL(payload));
5655
break;
57-
case 'setLock':
58-
mode.locked = payload;
59-
break;
6056
case 'setPause':
6157
mode.paused = payload;
6258
break;
@@ -72,7 +68,7 @@ window.addEventListener('message', ({ data: { action, payload } }: MsgData) => {
7268
}
7369
}
7470
} else {
75-
let element = document.querySelector(`.${payload}`);
71+
let element: HTMLElement = document.querySelector(`.${payload}`);
7672
// console.log("element: ", element);
7773
if (element !== null) {
7874
// console.log("element style: ", element.style)
@@ -83,13 +79,13 @@ window.addEventListener('message', ({ data: { action, payload } }: MsgData) => {
8379
case 'onHoverExit':
8480
if(Array.isArray(payload)){
8581
for (let i=0; i<payload.length;i++){
86-
let element = document.querySelector(`.${payload}`);
82+
let element: HTMLElement = document.querySelector(`.${payload}`);
8783
if (element !== null) {
8884
element.style.backgroundColor = '';
8985
}
9086
}
9187
} else {
92-
let element = document.querySelector(`.${payload}`);
88+
let element: HTMLElement = document.querySelector(`.${payload}`);
9389
// console.log("element style: ", element.style)
9490
if (element !== null) {
9591
element.style.backgroundColor = '';

src/backend/linkFiber.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414

1515
//tree
1616
Snapshot,
17-
//jump, pause, lock
17+
//jump, pause
1818
Mode,
1919
ComponentData,
2020
// array of state and component
@@ -75,7 +75,7 @@ function getRecoilState(): any {
7575
/**
7676
* @method sendSnapshot
7777
* @param snap The current snapshot
78-
* @param mode The current mode (i.e. jumping, time-traveling, locked, or paused)
78+
* @param mode The current mode (i.e. jumping, time-traveling, or paused)
7979
* @return Nothing.
8080
*
8181
* Middleware: Gets a copy of the current snap.tree and posts a recordSnap message to the window
@@ -109,11 +109,11 @@ function sendSnapshot(snap: Snapshot, mode: Mode): void {
109109
/**
110110
* @function updateSnapShotTree
111111
* @param snap The current snapshot
112-
* @param mode The current mode (i.e. jumping, time-traveling, locked, or paused)
112+
* @param mode The current mode (i.e. jumping, time-traveling, or paused)
113113
* Middleware: Updates snap object with latest snapshot, using @sendSnapshot
114114
*/
115115

116-
//updating tree depending on current mode on the panel (pause, locked etc)
116+
//updating tree depending on current mode on the panel (pause, etc)
117117
function updateSnapShotTree(snap: Snapshot, mode: Mode): void {
118118
// this is the currently active root fiber(the mutable root of the tree)
119119

@@ -486,7 +486,7 @@ function createTree(
486486
/**
487487
* @method linkFiber
488488
* @param snap The current snapshot
489-
* @param mode The current mode (i.e. jumping, time-traveling, locked, or paused)
489+
* @param mode The current mode (i.e. jumping, time-traveling, or paused)
490490
* @return a function to be invoked by index.js that initiates snapshot monitoring
491491
* linkFiber contains core module functionality, exported as an anonymous function.
492492
*/

src/backend/timeJump.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Console } from 'console';
88
* It exports an anonymous
99
* @function timeJump
1010
* @param origin The latest snapshot, linked to the fiber (changes to origin will change app)
11-
* @param mode The current mode (i.e. jumping, time-traveling, locked, or paused)
11+
* @param mode The current mode (i.e. jumping, time-traveling, or paused)
1212
* @returns A function that takes a target snapshot and a boolean flag checking for firstCall, then invokes `jump` on that target snapshot
1313
*
1414
* The target snapshot portrays some past state we want to travel to.

0 commit comments

Comments
 (0)