Skip to content

Commit d1113a0

Browse files
authored
Merge pull request #10 from oslabs-beta/louis/new-feature
Re-organized structure of components
2 parents 51366b0 + bfc2923 commit d1113a0

File tree

12 files changed

+30
-30
lines changed

12 files changed

+30
-30
lines changed

src/app/components/ComponentMap.tsx renamed to src/app/components/StateRoute/ComponentMap/ComponentMap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import {
1818
} from '@visx/tooltip';
1919
import LinkControls from './LinkControls';
2020
import getLinkComponent from './getLinkComponent';
21-
import { toggleExpanded, setCurrentTabInApp } from '../actions/actions';
22-
import { useStoreContext } from '../store';
21+
import { toggleExpanded, setCurrentTabInApp } from '../../../actions/actions';
22+
import { useStoreContext } from '../../../store';
2323

2424
const exclude = ['childExpirationTime', 'staticContext', '_debugSource', 'actualDuration', 'actualStartTime', 'treeBaseDuration', '_debugID', '_debugIsCurrentlyTiming', 'selfBaseDuration', 'expirationTime', 'effectTag', 'alternate', '_owner', '_store', 'get key', 'ref', '_self', '_source', 'firstBaseUpdate', 'updateQueue', 'lastBaseUpdate', 'shared', 'responders', 'pending', 'lanes', 'childLanes', 'effects', 'memoizedState', 'pendingProps', 'lastEffect', 'firstEffect', 'tag', 'baseState', 'baseQueue', 'dependencies', 'Consumer', 'context', '_currentRenderer', '_currentRenderer2', 'mode', 'flags', 'nextEffect', 'sibling', 'create', 'deps', 'next', 'destroy', 'parentSub', 'child', 'key', 'return', 'children', '$$typeof', '_threadCount', '_calculateChangedBits', '_currentValue', '_currentValue2', 'Provider', '_context', 'stateNode', 'elementType', 'type'];
2525

File renamed without changes.
File renamed without changes.

src/app/components/History.tsx renamed to src/app/components/StateRoute/History.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import React, { useEffect } from 'react';
55
import { diff, formatters } from 'jsondiffpatch';
66
import * as d3 from 'd3';
77

8-
import { changeView, changeSlider, setCurrentTabInApp } from '../actions/actions';
9-
import { useStoreContext } from '../store';
8+
import { changeView, changeSlider, setCurrentTabInApp } from '../../actions/actions';
9+
import { useStoreContext } from '../../store';
1010

1111
interface defaultMargin {
1212
top: number,

src/app/components/BarGraph.tsx renamed to src/app/components/StateRoute/PerformanceVisx/BarGraph.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { scaleBand, scaleLinear, scaleOrdinal } from '@visx/scale';
99
import { useTooltip, useTooltipInPortal, defaultStyles } from '@visx/tooltip';
1010
import { Text } from '@visx/text';
1111
import { schemeSet3 } from 'd3-scale-chromatic';
12-
import { onHover, onHoverExit, save } from '../actions/actions';
13-
import { useStoreContext } from '../store';
12+
import { onHover, onHoverExit, save } from '../../../actions/actions';
13+
import { useStoreContext } from '../../../store';
1414

1515
/* TYPESCRIPT */
1616

src/app/components/BarGraphComparison.tsx renamed to src/app/components/StateRoute/PerformanceVisx/BarGraphComparison.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { makeStyles } from '@material-ui/core/styles';
1313
import Select from '@material-ui/core/Select';
1414
import MenuItem from '@material-ui/core/MenuItem';
1515
import FormControl from '@material-ui/core/FormControl';
16-
import { onHover, onHoverExit, deleteSeries, setCurrentTabInApp } from '../actions/actions';
17-
import { useStoreContext } from '../store';
16+
import { onHover, onHoverExit, deleteSeries, setCurrentTabInApp } from '../../../actions/actions';
17+
import { useStoreContext } from '../../../store';
1818

1919
/* TYPESCRIPT */
2020

@@ -53,7 +53,7 @@ interface BarGraphComparisonProps {
5353
setSeries: () => void,
5454
series: unknown,
5555
setAction: () => void,
56-
}
56+
}
5757

5858
/* DEFAULTS */
5959
const margin = {
@@ -293,7 +293,7 @@ const BarGraphComparison = (props: BarGraphComparisonProps): unknown => {
293293
</div>
294294

295295
<svg ref={containerRef} width={width} height={height}>
296-
{}
296+
{ }
297297
<rect
298298
x={0}
299299
y={0}
@@ -341,8 +341,8 @@ const BarGraphComparison = (props: BarGraphComparisonProps): unknown => {
341341
height={bar.height === 0 ? null : bar.height}
342342
width={bar.width}
343343
fill={bar.color}
344-
/* TIP TOOL EVENT HANDLERS */
345-
// Hides tool tip once cursor moves off the current rect
344+
/* TIP TOOL EVENT HANDLERS */
345+
// Hides tool tip once cursor moves off the current rect
346346
onMouseLeave={() => {
347347
dispatch(
348348
onHoverExit(data.componentData[bar.key].rtid),
@@ -351,7 +351,7 @@ const BarGraphComparison = (props: BarGraphComparisonProps): unknown => {
351351
}, 300)),
352352
);
353353
}}
354-
// Cursor position in window updates position of the tool tip
354+
// Cursor position in window updates position of the tool tip
355355
onMouseMove={event => {
356356
dispatch(onHover(data.componentData[bar.key].rtid));
357357
if (tooltipTimeout) clearTimeout(tooltipTimeout);
@@ -399,8 +399,8 @@ const BarGraphComparison = (props: BarGraphComparisonProps): unknown => {
399399
height={bar.height === 0 ? null : bar.height}
400400
width={bar.width}
401401
fill={bar.color}
402-
/* TIP TOOL EVENT HANDLERS */
403-
// Hides tool tip once cursor moves off the current rect
402+
/* TIP TOOL EVENT HANDLERS */
403+
// Hides tool tip once cursor moves off the current rect
404404
onMouseLeave={() => {
405405
dispatch(
406406
onHoverExit(data.componentData[bar.key].rtid),
@@ -409,7 +409,7 @@ const BarGraphComparison = (props: BarGraphComparisonProps): unknown => {
409409
}, 300)),
410410
);
411411
}}
412-
// Cursor position in window updates position of the tool tip
412+
// Cursor position in window updates position of the tool tip
413413
onMouseMove={event => {
414414
dispatch(onHover(data.componentData[bar.key].rtid));
415415
if (tooltipTimeout) clearTimeout(tooltipTimeout);

src/app/components/BarGraphComparisonActions.tsx renamed to src/app/components/StateRoute/PerformanceVisx/BarGraphComparisonActions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { makeStyles } from '@material-ui/core/styles';
1313
import Select from '@material-ui/core/Select';
1414
import MenuItem from '@material-ui/core/MenuItem';
1515
import FormControl from '@material-ui/core/FormControl';
16-
import { deleteSeries, setCurrentTabInApp } from '../actions/actions';
17-
import { useStoreContext } from '../store';
16+
import { deleteSeries, setCurrentTabInApp } from '../../../actions/actions';
17+
import { useStoreContext } from '../../../store';
1818

1919
/* TYPESCRIPT */
2020

src/app/components/PerformanceVisx.tsx renamed to src/app/components/StateRoute/PerformanceVisx/PerformanceVisx.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import RenderingFrequency from './RenderingFrequency';
1313
import BarGraph from './BarGraph';
1414
import BarGraphComparison from './BarGraphComparison';
1515
import BarGraphComparisonActions from './BarGraphComparisonActions';
16-
import { useStoreContext } from '../store';
17-
import { setCurrentTabInApp } from '../actions/actions';
16+
import { useStoreContext } from '../../../store';
17+
import { setCurrentTabInApp } from '../../../actions/actions';
1818

1919

2020
interface BarStackProps {

src/app/components/RenderingFrequency.tsx renamed to src/app/components/StateRoute/PerformanceVisx/RenderingFrequency.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/* eslint-disable jsx-a11y/no-static-element-interactions */
33
/* eslint-disable react/prop-types */
44
import React, { useState, useEffect } from 'react';
5-
import { onHover, onHoverExit, setCurrentTabInApp } from '../actions/actions';
6-
import { useStoreContext } from '../store';
5+
import { onHover, onHoverExit, setCurrentTabInApp } from '../../../actions/actions';
6+
import { useStoreContext } from '../../../store';
77

88
const RenderingFrequency = props => {
99
const perfData = props.data;

src/app/components/StateRoute.tsx renamed to src/app/components/StateRoute/StateRoute.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ import {
1414
} from 'react-router-dom';
1515
import { ParentSize } from '@visx/responsive';
1616
import Tree from './Tree';
17-
import ComponentMap from './ComponentMap';
18-
import { changeView, changeSlider } from '../actions/actions';
19-
import { useStoreContext } from '../store';
20-
import PerformanceVisx from './PerformanceVisx';
21-
import WebMetrics from './WebMetrics';
17+
import ComponentMap from './ComponentMap/ComponentMap';
18+
import { changeView, changeSlider } from '../../actions/actions';
19+
import { useStoreContext } from '../../store';
20+
import PerformanceVisx from './PerformanceVisx/PerformanceVisx';
21+
import WebMetrics from '../WebMetrics';
2222

2323
const History = require('./History').default;
2424

0 commit comments

Comments
 (0)