Skip to content

Commit a420615

Browse files
committed
already for launch version
2 parents 0475eb3 + c79f904 commit a420615

File tree

37,283 files changed

+24
-3465556
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

37,283 files changed

+24
-3465556
lines changed

src/app/components/PerfView.tsx

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable object-curly-newline */
12
/* eslint-disable react-hooks/exhaustive-deps */
23
/* eslint-disable max-len */
34
/* eslint-disable @typescript-eslint/ban-types */
@@ -6,25 +7,20 @@
67
/* eslint-disable @typescript-eslint/no-unused-vars */
78
/* eslint-disable no-use-before-define */
89
/* eslint-disable react/no-this-in-sfc */
9-
/* eslint-disable no-unused-vars */
1010
/* eslint-disable react/prop-types */
1111
/* eslint-disable arrow-body-style */
1212
/* eslint-disable no-plusplus */
1313
/* eslint-disable func-names */
1414
/* eslint-disable no-shadow */
1515
/* eslint-disable newline-per-chained-call */
16-
/* eslint-disable object-curly-newline */
1716
/* eslint-disable object-property-newline */
1817
/* eslint-disable class-methods-use-this */
1918
// eslint-disable-next-line object-curly-newline
2019
/* eslint-disable indent */
21-
/* eslint-disable no-console */
2220

2321
import React, { useEffect, useState, useRef, useCallback } from 'react';
2422
import * as d3 from 'd3';
25-
import { schemeSet1 as colorScheme } from 'd3';
26-
27-
// import { addNewSnapshots } from '../actions/actions.ts';
23+
// import { schemeSet1 as colorScheme } from 'd3';
2824

2925
interface PerfViewProps {
3026
snapshots:any[];
@@ -54,10 +50,13 @@ const PerfView = (props:PerfViewProps) => {
5450
const packFunc = useCallback((data:object) => {
5551
return d3.pack()
5652
.size([adjustedSize, adjustedSize])
57-
// .radius(d => { return d.r; })
5853
.padding(3)(d3.hierarchy(data)
59-
.sum((d:{componentData?:{actualDuration?:number}}) => { return d.componentData.actualDuration || 0; })
60-
.sort((a:{value:number}, b:{value:number}) => { return b.value - a.value; }));
54+
.sum((d:{componentData?:{actualDuration?:number}}) => {
55+
return d.componentData.actualDuration || 0;
56+
})
57+
.sort((a:{value:number}, b:{value:number}) => {
58+
return b.value - a.value;
59+
}));
6160
}, [adjustedSize]);
6261

6362
function handleNoRenderData(isNoRenderData) {
@@ -118,7 +117,9 @@ const PerfView = (props:PerfViewProps) => {
118117
node.exit().remove();
119118

120119
// Zoom size of nodes and labels to focus view on root node
121-
if ((!Number.isNaN(packedRoot.x)) && (!Number.isNaN(packedRoot.y)) && (!Number.isNaN(packedRoot.r))) {
120+
if ((!Number.isNaN(packedRoot.x))
121+
&& (!Number.isNaN(packedRoot.y))
122+
&& (!Number.isNaN(packedRoot.r))) {
122123
zoomViewArea([packedRoot.x, packedRoot.y, packedRoot.r * 2]);
123124
}
124125

@@ -142,11 +143,17 @@ const PerfView = (props:PerfViewProps) => {
142143

143144
// Grab all nodes that were previously displayed, or who's parent is the new target newFocus
144145
// Transition their labels to visible or not
145-
label.filter(function (d:{parent:object}) { return d.parent === newFocus || this.style.display === 'inline'; })
146+
label.filter(function (d:{parent:object}) {
147+
return d.parent === newFocus || this.style.display === 'inline';
148+
})
146149
.transition(transition)
147150
.style('fill-opacity', (d:{parent:object}) => (d.parent === newFocus ? 1 : 0))
148-
.on('start', function (d:{parent:object}) { if (d.parent === newFocus) this.style.display = 'inline'; })
149-
.on('end', function (d:{parent:object}) { if (d.parent !== newFocus) this.style.display = 'none'; });
151+
.on('start', function (d:{parent:object}) {
152+
if (d.parent === newFocus) this.style.display = 'inline';
153+
})
154+
.on('end', function (d:{parent:object}) {
155+
if (d.parent !== newFocus) this.style.display = 'none';
156+
});
150157

151158
curFocus = newFocus;
152159
}
@@ -155,7 +162,6 @@ const PerfView = (props:PerfViewProps) => {
155162
return (
156163
<div className="perf-d3-container">
157164
<svg className="perf-d3-svg" ref={svgRef} />
158-
{/* <span>TEST</span> */}
159165
</div>
160166
);
161167
};

src/app/styles/components/d3graph.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ div.tooltip {
106106
/* flex-direction: column; */
107107
/* justify-content: space-between; */
108108
height: calc(100% - 70px);
109-
/* border: 2px solid red; */
110109
}
111110

112111
.perf-d3-svg {
@@ -115,10 +114,8 @@ div.tooltip {
115114

116115
.perf-chart-labels {
117116
font: 1.3em sans-serif;
118-
font-weight: bold;
119-
/* font-size: calc(12px + .8vw); */
120-
/* color: white; */
121-
/* fill: rgb(231, 231, 231); */
117+
/* font-size: min(max(16px, 4vw), 22px); */
118+
/* font-family: monaco, Consolas, 'Lucida Console', monospace, Arial, sans-serif; */
122119
fill: #2a2f3a;
123120
pointer-events: none;
124121
text-anchor: middle;

src/app/styles/layout/_stateContainer.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@
4040
@extend %disable-highlight
4141
}
4242

43-
4443
.no-data-message {
45-
font: 1.2em sans-serif;
46-
color: white;
44+
color: $text-color;
45+
font: normal 13px $text-font-stack;
4746
padding: 10px;
4847
}
4948

tests/automated-tests/node_modules/reactime/assets/readme-logo-svg.svg

Lines changed: 0 additions & 38 deletions
This file was deleted.

tests/automated-tests/node_modules/reactime/astParser.js

Lines changed: 0 additions & 41 deletions
This file was deleted.
Binary file not shown.

tests/automated-tests/node_modules/reactime/index.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)