Skip to content

Commit 0640840

Browse files
MarkTeetsjasnoominzo-kimyuanjackie1
committed
Removed non-functional split feature
Co-authored-by: Jasmine Noor <[email protected]> Co-authored-by: Minzo Kim <[email protected]> Co-authored-by: Jackie Yuan <[email protected]>
1 parent 7a8cde1 commit 0640840

File tree

7 files changed

+19
-81
lines changed

7 files changed

+19
-81
lines changed

src/app/actions/actions.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ export const save = (newSeries, newSeriesName) => ({
55
type: types.SAVE,
66
payload: { newSeries, newSeriesName },
77
});
8+
89
export const deleteSeries = () => ({
910
type: types.DELETE_SERIES,
1011
});
12+
1113
export const toggleMode = (mode) => ({
1214
type: types.TOGGLE_MODE,
1315
payload: mode,
@@ -86,10 +88,6 @@ export const noDev = (tab) => ({
8688
payload: tab,
8789
});
8890

89-
export const toggleSplit = () => ({
90-
type: types.TOGGLE_SPLIT,
91-
});
92-
9391
export const toggleExpanded = (node) => ({
9492
type: types.TOGGLE_EXPANDED,
9593
payload: node,

src/app/components/App.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ const initialState: {
1313
port: null | number;
1414
currentTab: null | number;
1515
currentTitle: null | string;
16-
split: null | boolean;
1716
tabs: unknown;
1817
currentTabInApp: null | string;
1918
} = {
2019
port: null,
2120
currentTab: null,
2221
currentTitle: 'No Target',
23-
split: false,
2422
tabs: {},
2523
currentTabInApp: null,
2624
};

src/app/components/Tutorial.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,6 @@ export default class Tutorial extends React.Component<tutorialProps, tutorialSta
134134
"<ul><li>Use button to lock Reactime to the target application's tab in the Chrome Browser</li></ul>",
135135
position: 'top',
136136
},
137-
{
138-
title: 'Split Button',
139-
element: '.split-button',
140-
intro:
141-
'<ul> <li>Use button to split Reactime into two windows in order to view multiple tabs simultaneously</li> </ul>',
142-
position: 'top',
143-
},
144137
{
145138
title: 'Download Button',
146139
element: '.export-button',
@@ -281,7 +274,7 @@ export default class Tutorial extends React.Component<tutorialProps, tutorialSta
281274
ref={(steps) => (this.steps = steps)}
282275
/>
283276
<button className='howToUse-button' type='button' onClick={() => startIntro()}>
284-
<FontAwesomeIcon icon={faQuestion} /> How to use
277+
<FontAwesomeIcon icon={faQuestion} /> Tutorial
285278
</button>
286279
</>
287280
);

src/app/constants/actionTypes.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export const NEW_SNAPSHOTS = 'NEW_SNAPSHOTS';
1313
export const SET_TAB = 'SET_TAB';
1414
export const DELETE_TAB = 'DELETE_TAB';
1515
export const NO_DEV = 'NO_DEV';
16-
export const TOGGLE_SPLIT = 'TOGGLE_SPLIT';
1716
export const TOGGLE_EXPANDED = 'TOGGLE_EXPANDED';
1817
export const LAUNCH_CONTENT = 'LAUNCH_CONTENT';
1918
export const SLIDER_ZERO = 'SLIDER_ZERO';

src/app/containers/ButtonsContainer.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
faUnlock,
99
faLock,
1010
} from '@fortawesome/free-solid-svg-icons';
11-
import { importSnapshots, toggleMode, toggleSplit } from '../actions/actions';
11+
import { importSnapshots, toggleMode } from '../actions/actions';
1212
import { useStoreContext } from '../store';
1313

1414
import Tutorial from '../components/Tutorial';
@@ -53,7 +53,7 @@ function importHandler(dispatch: (a: unknown) => void) {
5353
}
5454

5555
function ButtonsContainer(): JSX.Element {
56-
const [{ tabs, currentTab, split, currentTabInApp }, dispatch] = useStoreContext();
56+
const [{ tabs, currentTab, currentTabInApp }, dispatch] = useStoreContext();
5757
const {
5858
snapshots,
5959
mode: { paused },
@@ -62,15 +62,9 @@ function ButtonsContainer(): JSX.Element {
6262
return (
6363
<div className='buttons-container'>
6464
<button className='pause-button' type='button' onClick={() => dispatch(toggleMode('paused'))}>
65-
{paused ? <FontAwesomeIcon icon={faUnlock} /> : <FontAwesomeIcon icon={faLock} />}
66-
{paused ? 'Unlock' : 'Lock'}
65+
{paused ? <FontAwesomeIcon icon={faLock} /> : <FontAwesomeIcon icon={faUnlock} />}
66+
{paused ? 'Locked' : 'Unlocked'}
6767
</button>
68-
69-
<button className='split-button' type='button' onClick={() => dispatch(toggleSplit())}>
70-
{split ? <FontAwesomeIcon icon={faSquare} /> : <FontAwesomeIcon icon={faColumns} />}
71-
{split ? 'Unsplit' : 'Split'}
72-
</button>
73-
7468
<button className='export-button' type='button' onClick={() => exportHandler(snapshots)}>
7569
<FontAwesomeIcon icon={faDownload} />
7670
Download

src/app/containers/MainContainer.tsx

Lines changed: 12 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ import {
1717
} from '../actions/actions';
1818
import { useStoreContext } from '../store';
1919

20-
//Must be required in. This enables compatibility with TS. If imported in, throws ts error of not rendering steps as a class component correctly.
21-
const Split = require('react-split');
2220

2321
function MainContainer(): JSX.Element {
2422
const [store, dispatch] = useStoreContext();
25-
const { tabs, currentTab, port, split } = store;
23+
const { tabs, currentTab, port } = store;
2624
const [actionView, setActionView] = useState(true);
2725
// this function handles Time Jump sidebar view
2826
const toggleActionContainer = () => {
@@ -148,54 +146,6 @@ function MainContainer(): JSX.Element {
148146
const snapshotDisplay = statelessCleaning(snapshotView);
149147
const hierarchyDisplay = statelessCleaning(hierarchy);
150148

151-
function handleSplit(currentSplitMode: boolean): JSX.Element {
152-
if (!currentSplitMode) {
153-
return (
154-
<div className='state-container-container'>
155-
<StateContainer
156-
webMetrics={webMetrics}
157-
viewIndex={viewIndex}
158-
snapshot={snapshotDisplay}
159-
hierarchy={hierarchyDisplay}
160-
snapshots={snapshots}
161-
currLocation={currLocation}
162-
/>
163-
</div>
164-
);
165-
}
166-
return (
167-
<Split
168-
sizes={[50, 50]}
169-
minSize={200}
170-
snapOffset={1}
171-
className='split'
172-
gutterStyle={function () {
173-
return {
174-
backgroundColor: 'dimgrey',
175-
width: '8px',
176-
};
177-
}}
178-
>
179-
<StateContainer
180-
webMetrics={webMetrics}
181-
viewIndex={viewIndex}
182-
snapshot={snapshotDisplay}
183-
hierarchy={hierarchyDisplay}
184-
snapshots={snapshots}
185-
currLocation={currLocation}
186-
/>
187-
<StateContainer
188-
webMetrics={webMetrics}
189-
viewIndex={viewIndex}
190-
snapshot={snapshotDisplay}
191-
hierarchy={hierarchyDisplay}
192-
snapshots={snapshots}
193-
currLocation={currLocation}
194-
/>
195-
</Split>
196-
);
197-
}
198-
199149
return (
200150
<div className='main-container'>
201151
<div id='bodyContainer' className='body-container'>
@@ -204,7 +154,17 @@ function MainContainer(): JSX.Element {
204154
setActionView={setActionView}
205155
toggleActionContainer={toggleActionContainer}
206156
/>
207-
{snapshots.length ? handleSplit(split) : null}
157+
{snapshots.length ?
158+
<div className='state-container-container'>
159+
<StateContainer
160+
webMetrics={webMetrics}
161+
viewIndex={viewIndex}
162+
snapshot={snapshotDisplay}
163+
hierarchy={hierarchyDisplay}
164+
snapshots={snapshots}
165+
currLocation={currLocation}
166+
/>
167+
</div> : null}
208168
<TravelContainer snapshotsLength={snapshots.length} />
209169
<ButtonsContainer />
210170
</div>

src/app/reducers/mainReducer.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,6 @@ export default (state, action) =>
328328
}
329329
break;
330330
}
331-
case types.TOGGLE_SPLIT: {
332-
draft.split = !draft.split;
333-
break;
334-
}
335331
case types.TOGGLE_EXPANDED: {
336332
// find correct node from currLocation and toggle isExpanded
337333
const checkChildren = (node) => {

0 commit comments

Comments
 (0)