Skip to content

Commit 4e79d09

Browse files
authored
Merge pull request #16 from christinaor/c-feature-branch
Add comments for added Components graph in PerformanceVisx.tsx
2 parents c09d5d4 + a4e514f commit 4e79d09

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
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: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
7-
<title>Reactime 15.0</title>
8-
</head>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
7+
<title>Reactime 15.0</title>
8+
</head>
99

10-
<body>
11-
<div id="root"></div>
12-
<script type="text/javascript" src="bundles/app.bundle.js"></script>
13-
</body>
10+
<body>
11+
<div id="root"></div>
12+
<script type="text/javascript" src="bundles/app.bundle.js"></script>
13+
</body>
1414
</html>

0 commit comments

Comments
 (0)