Skip to content

Commit 62c36dc

Browse files
committed
Added tutorial, action comparison functionality, ability to name actions & series, component details also now no longer crashing app
1 parent 66ac1fa commit 62c36dc

File tree

4 files changed

+10
-37
lines changed

4 files changed

+10
-37
lines changed

src/app/components/BarGraphComparison.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ const BarGraphComparison = props => {
163163
const classes = useStyles();
164164

165165
const handleSeriesChange = event => {
166+
if (!event) return
166167
setSeries(event.target.value);
167168
setAction(false);
168169
};
@@ -176,6 +177,7 @@ const BarGraphComparison = props => {
176177
};
177178

178179
const handleActionChange = event => {
180+
if(!event.target.value) return
179181
setAction(event.target.value);
180182
setSeries(false);
181183
};

src/app/components/BarGraphComparisonActions.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ const BarGraphComparisonActions = props => {
156156
const classes = useStyles();
157157

158158
const handleSeriesChange = event => {
159+
if (!event) return
159160
setSeries(event.target.value);
160161
setAction(false);
161162
// setXpoints();
@@ -172,6 +173,7 @@ const BarGraphComparisonActions = props => {
172173
};
173174

174175
const handleActionChange = event => {
176+
if (!event) return
175177
setAction(event.target.value);
176178
setSeries(false);
177179
// setXpoints();
@@ -217,6 +219,8 @@ const BarGraphComparisonActions = props => {
217219
<button
218220
className="delete-button"
219221
onClick={e => {
222+
setAction(false);
223+
setSeries(true);
220224
dispatch(deleteSeries());
221225
}}
222226
>

src/app/components/PerformanceVisx.tsx

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,19 @@
11
/* eslint-disable guard-for-in */
22
/* eslint-disable no-restricted-syntax */
33
// @ts-nocheck
4-
<<<<<<< HEAD
5-
import React, { useState, useEffect } from 'react';
6-
import FormControlLabel from '@material-ui/core/FormControlLabel';
7-
import { ParentSize } from '@visx/responsive';
8-
=======
94
import React, { useState } from 'react';
10-
>>>>>>> Reactime13.0
115
import {
126
MemoryRouter as Router,
137
Route,
148
NavLink,
159
Switch,
1610
useLocation,
1711
} from 'react-router-dom';
18-
<<<<<<< HEAD
19-
import { Component } from 'react';
20-
import { render } from 'react-dom';
21-
import { Component } from 'react';
22-
=======
23-
>>>>>>> Reactime13.0
2412
import RenderingFrequency from './RenderingFrequency';
2513
import BarGraph from './BarGraph';
2614
import BarGraphComparison from './BarGraphComparison';
2715
import BarGraphComparisonActions from './BarGraphComparisonActions';
2816
import { useStoreContext } from '../store';
29-
<<<<<<< HEAD
30-
// import snapshots from './snapshots';
31-
=======
32-
33-
>>>>>>> Reactime13.0
3417
/* NOTES
3518
Issue - Not fully compatible with recoil apps. Reference the recoil-todo-test.
3619
Barstacks display inconsistently...however, almost always displays upon initial test app load or
@@ -97,11 +80,6 @@ const collectNodes = (snaps, componentName) => {
9780
}
9881
}
9982
}
100-
<<<<<<< HEAD
101-
// console.log('componentsResult looks like: ', componentsResult);
102-
return componentsResult;
103-
};
104-
=======
10583

10684
const finalResults = componentsResult.map((e, index) => {
10785
const name = Object.keys(e)[0];
@@ -111,7 +89,6 @@ const collectNodes = (snaps, componentName) => {
11189
return finalResults;
11290
};
11391

114-
>>>>>>> Reactime13.0
11592
/* DATA HANDLING HELPER FUNCTIONS */
11693
const traverse = (snapshot, data, snapshots, currTotalRender = 0) => {
11794
if (!snapshot.children[0]) return;
@@ -159,14 +136,7 @@ const traverse = (snapshot, data, snapshots, currTotalRender = 0) => {
159136

160137
// Retrieve snapshot series data from Chrome's local storage.
161138
const allStorage = () => {
162-
<<<<<<< HEAD
163-
// const values = [];
164-
// const keys = Object.keys(localStorage);
165-
let values = localStorage.getItem('project');
166-
// values === null ? values = [] : values = JSON.parse(values) ;
167-
=======
168139
let values = localStorage.getItem('project')
169-
>>>>>>> Reactime13.0
170140
values = values === null ? [] : JSON.parse(values);
171141
return values;
172142
};
@@ -201,14 +171,7 @@ const getPerfMetrics = (snapshots, snapshotsIds): {} => {
201171
/* EXPORT COMPONENT */
202172
const PerformanceVisx = (props: BarStackProps) => {
203173
// hook used to dispatch onhover action in rect
204-
<<<<<<< HEAD
205-
206-
const {
207-
width, height, snapshots, hierarchy,
208-
} = props;
209-
=======
210174
const { width, height, snapshots, hierarchy, } = props;
211-
>>>>>>> Reactime13.0
212175
const [{ tabs, currentTab }, dispatch] = useStoreContext();
213176
const [detailsView, setDetailsView] = useState('barStack');
214177
const [comparisonView, setComparisonView] = useState('barStack');

src/app/styles/components/_performanceVisx.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@
1818
.MuiTypography-body1 {
1919
font-size: 1em !important;
2020
}
21+
22+
#seriesname {
23+
background-color: white;
24+
}

0 commit comments

Comments
 (0)