Skip to content

Commit a4e514f

Browse files
christinaorAndyB909d28601581OzairGh
committed
Add comments for added Components graph in PerformanceVisx.tsx
Co-authored-by: Khanh Bui <[email protected]> Co-authored-by: Peng Dong <[email protected]> Co-authored-by: Ozair Ghulam <[email protected]>
1 parent bcdee9b commit a4e514f

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

src/app/components/BarGraph.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ const BarGraph = props => {
140140
}
141141
});
142142

143+
// CURRENTLY DOES NOT SAVE
143144
const saveSeriesClickHandler = () => {
144145
if (tabs[currentTab].seriesSavedStatus === 'inputBoxOpen') {
145146
const actionNames = document.getElementsByClassName('actionname');
@@ -153,7 +154,7 @@ const BarGraph = props => {
153154
dispatch(save(toStorage));
154155
};
155156

156-
// FTRI9 note - need to ensure text box is not empty before saving
157+
// Need to change so textbox isn't empty before saving
157158
const textbox = tabs[currentTab].seriesSavedStatus === 'inputBoxOpen' ? <input type="text" id="seriesname" placeholder="Enter Series Name" onChange={e => setSeriesNameInput(e.target.value)} /> : null;
158159
return (
159160
<div className="bargraph-position">

src/app/components/PerformanceVisx.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,15 +254,14 @@ const PerformanceVisx = (props: BarStackProps) => {
254254
data.barStack = filteredSnapshots;
255255
}
256256

257-
if (snapshot !== 'All Snapshots') {
258-
// filter barStack to make it equal to an array of length 1 with object matching snapshot ID
259257

258+
if (snapshot !== 'All Snapshots') {
259+
// filter barStack to make it equal to an array of length 1 with object matching snapshot ID to mirror the data.barStack object's shape
260260
const checkData = [data.barStack.find(comp => comp.snapshotId === snapshot)];
261261
const holdData = [];
262262
// maxheight is referring to the max height in render time to choose the scaling size for graph
263263
let maxHeight = 0;
264-
/* looping through checkData which is composed of a single snapshot
265-
while pushing key/values to a new object and setting maxHeight */
264+
// looping through checkData which is composed of a single snapshot while pushing key/values to a new object and setting maxHeight
266265
for (const key in checkData[0]) {
267266
if (key !== 'route' && key !== 'snapshotId') {
268267
if (maxHeight < checkData[0][key]) maxHeight = checkData[0][key];
@@ -273,6 +272,8 @@ const PerformanceVisx = (props: BarStackProps) => {
273272
holdData[holdData.length - 1].snapshotId = key;
274273
}
275274
}
275+
// maxTotalRender height of bar is aligned to y-axis
276+
// 1.15 adjusts the numbers on the y-axis so the max bar's true height never reaches the max of the y-axis
276277
data.maxTotalRender = maxHeight * 1.15;
277278
if (holdData) data.barStack = holdData;
278279
}

src/extension/build/panel.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<<<<<<< HEAD
43
<head>
54
<meta charset="UTF-8" />
65
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
76
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
87
<title>Reactime 15.0</title>
98
</head>
10-
=======
11-
<head>
12-
<meta charset="UTF-8" />
13-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
14-
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
15-
<title>Reactime 15.0</title>
16-
</head>
17-
>>>>>>> pocke
189

1910
<body>
2011
<div id="root"></div>

0 commit comments

Comments
 (0)