Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
535ef07
changed 'empty' button text to 'clear'
BagelEnthusiast Mar 23, 2021
e7dbe79
Merge pull request #1 from BagelEnthusiast/sandbox
josephiswhere Mar 23, 2021
03535f3
changed script injection in background.js to append ID's to chrome ta…
dangitbobbeh Mar 25, 2021
c292448
Merge pull request #2 from dangitbobbeh/master
dangitbobbeh Mar 25, 2021
799f399
added tests to show snapshot data
BagelEnthusiast Mar 25, 2021
5d9ed2d
added more console.logs
BagelEnthusiast Mar 25, 2021
fad441f
Merge branch 'master' into sandbox
josephiswhere Mar 25, 2021
ee197eb
Merge pull request #3 from BagelEnthusiast/sandbox
josephiswhere Mar 25, 2021
2bad0ab
series selector interaction added
dangitbobbeh Mar 28, 2021
5cf46af
Merge pull request #4 from oslabs-beta/DBBRanch
dangitbobbeh Mar 28, 2021
606aedc
Updates to main
hfox0290 Mar 29, 2021
0e06736
Merge branch 'master' of https://github.com/oslabs-beta/reactime
hfox0290 Mar 29, 2021
a334831
early edits to comparison screen to allow greater flexibility in ser…
dangitbobbeh Mar 30, 2021
de5fbb5
Merge pull request #5 from oslabs-beta/DBBRanch
dangitbobbeh Mar 30, 2021
4860a8c
Merge branch 'master' of https://github.com/oslabs-beta/reactime
hfox0290 Mar 30, 2021
7fc201f
added in delta functions in actionContainer
BagelEnthusiast Mar 30, 2021
669e926
Merge pull request #6 from BagelEnthusiast/master
BagelEnthusiast Mar 30, 2021
da176f4
set up clicks on snapshoots to trigger findDiff
josephiswhere Mar 30, 2021
962fd0e
Merge pull request #7 from josephiswhere/master
josephiswhere Mar 31, 2021
3bcdacc
Updated save series button
hfox0290 Apr 1, 2021
f40e533
nice
josephiswhere Apr 1, 2021
cacbdfb
got hover working
josephiswhere Apr 1, 2021
4757290
Merge pull request #8 from josephiswhere/master
dangitbobbeh Apr 1, 2021
3071e51
Merge pull request #9 from StackOverFlowWhereArtThou/fixSaveButton
josephiswhere Apr 1, 2021
c033a5b
reversion
dangitbobbeh Apr 1, 2021
2a8eb9b
Merge pull request #10 from oslabs-beta/revert
dangitbobbeh Apr 1, 2021
d024871
more reversion
dangitbobbeh Apr 1, 2021
a1f7db9
Merge pull request #11 from oslabs-beta/revert
dangitbobbeh Apr 1, 2021
971a494
cleaned up logs throughout app
BagelEnthusiast Apr 15, 2021
1201960
Merge pull request #12 from BagelEnthusiast/master
BagelEnthusiast Apr 15, 2021
57dc810
Updates to ReadMe and Manifest
hfox0290 Apr 15, 2021
3dd2515
Merge pull request #13 from StackOverFlowWhereArtThou/updateReadMe
StackOverFlowWhereArtThou Apr 15, 2021
95c7d9f
Updates to linkFiber.ts
hfox0290 Apr 15, 2021
88008e4
Merge pull request #14 from StackOverFlowWhereArtThou/fixingLinkFiber…
StackOverFlowWhereArtThou Apr 15, 2021
f945b80
Updated test metrics
hfox0290 Apr 16, 2021
2fd8ad1
Updated tests to reflect changes to implement
hfox0290 Apr 16, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@

Currently, Reactime supports React apps using stateful components and Hooks, including frameworks like Gatsby and Next.js, with beta support for Recoil and Context API.

<b>Reactime version 8.0</b> allows you to run A/B testing on your application by storing a "series" of state data snapshots. At any stage in the dev cycle, devs could run Reactime again and select any past series to do an A/B test with the current series of snapshots. With Save Series, developers have access to view trends in their App's component render times during development by comparing the previous series of snapshots.
<b>Reactime version 9.0</b> allows you to run A/B testing on your application by storing a "series" of state data snapshots. At any stage in the dev cycle, devs could run Reactime again and select any past series to do an A/B test with the current series of snapshots. With Save Series, developers have access to view trends in their App's component render times during development by comparing the previous series of snapshots.

Reactime 8.0 fixes previous version bugs and incorporates improved visualizations for component relationships. Reactime 8.0 includes expanded [typedoc](https://typedoc.org/api/) documentation for developers looking to contribute to the source code.
Reactime 9.0 fixes previous version bugs and incorporates improved user experience for saved snapshot series.

After installing Reactime, you can test its functionalities with your React application in development mode.

Expand Down Expand Up @@ -152,6 +152,10 @@ After cloning this repository, developers can simply run `npm run docs` at the r
- [Deep in Weeds with Reactime, Concurrent React_fiberRoot, and Browser History Caching](https://itnext.io/deep-in-the-weeds-with-reactime-concurrent-react-fiberroot-and-browser-history-caching-7ce9d7300abb)

## <b>Authors</b>
- **Harry Fox** - [@StackOverFlowWhereArtThou](https://github.com/StackOverFlowWhereArtThou)
- **Nathan Richardson** - [@BagelEnthusiast](https://github.com/BagelEnthusiast)
- **David Bernstein** - [@dangitbobbeh](https://github.com/dangitbobbeh)
- **Joseph Stern** - [@josephiswhere](https://github.com/josephiswhere)
- **Dennis Lopez** - [@DennisLpz](https://github.com/DennisLpz)
- **Cole Styron** - [@colestyron](https://github.com/C-STYR)
- **Ali Rahman** - [@CourageWolf](https://github.com/CourageWolf)
Expand Down
3 changes: 2 additions & 1 deletion src/app/__tests__/action.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Action = require('../components/Action').default;

configure({ adapter: new (Adapter as any)() });

describe('unit testing for Action.jsx', () => {
describe('unit testing for Action.tsx', () => {
let wrapper;
const props = {
key: 'actions2',
Expand All @@ -22,6 +22,7 @@ describe('unit testing for Action.jsx', () => {
dispatch: jest.fn(),
displayName: '3.0',
componentName: 'App',
logChangedState: jest.fn(),
componentData: {
actualDuration: 3.5,
},
Expand Down
86 changes: 57 additions & 29 deletions src/app/components/Action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/* eslint-disable react/no-unused-prop-types */

import React from 'react';
import ReactHover, { Trigger, Hover } from 'react-hover';
import { changeView, changeSlider } from '../actions/actions';

/**
Expand All @@ -15,13 +16,14 @@ interface ActionProps {
last: boolean;
index: number;
sliderIndex: number;
dispatch: (a:any) => void;
dispatch: (a: any) => void;
displayName: string;
componentName: string;
componentData: {actualDuration: number}|undefined;
componentData: { actualDuration: number } | undefined;
state?: Record<string, unknown>;
viewIndex: number;
handleOnkeyDown: (e: any, i: number) => void;
handleOnkeyDown: (e: any, i: number) => any;
logChangedState: (index: number) => any;
}

/**
Expand All @@ -42,8 +44,17 @@ interface ActionProps {
// viewIndex and handleonkeyDown added to props
const Action = (props: ActionProps): JSX.Element => {
const {
selected, last, index, sliderIndex, dispatch, displayName, componentName,
componentData, viewIndex, handleOnkeyDown,
selected,
last,
index,
sliderIndex,
dispatch,
displayName,
componentName,
componentData,
viewIndex,
handleOnkeyDown,
logChangedState,
} = props;

/**
Expand All @@ -54,7 +65,7 @@ const Action = (props: ActionProps): JSX.Element => {
if (!componentData || !componentData.actualDuration) {
return 'NO TIME';
}
let seconds:number| string;
let seconds: number | string;
let miliseconds: any = componentData.actualDuration;
if (Math.floor(componentData.actualDuration) > 60) {
seconds = Math.floor(componentData.actualDuration / 60);
Expand All @@ -78,39 +89,56 @@ const Action = (props: ActionProps): JSX.Element => {
};
const displayTime = cleanTime();

const optionsCursorTrueWithMargin = {
followCursor: true,
shiftX: 20,
shiftY: 0,
};

return (
<div
// Invoking keyboard functionality; functionality is in ActionContainer;
onKeyDown={(e) => handleOnkeyDown(e, viewIndex)}
className={selected || last ? 'action-component selected' : 'action-component'}
className={
selected || last ? 'action-component selected' : 'action-component'
}
onClick={() => {
dispatch(changeView(index));
}}
role="presentation"
role='presentation'
style={index > sliderIndex ? { color: '#5f6369' } : {}}
tabIndex={index}
>
<div className="action-component-text">
{`${displayName}: ${componentName !== 'nameless' ? componentName : ''} `}
</div>
<button
className="time-button"
type="button"
>
{displayTime}
</button>
<button
className="jump-button"
onClick={(e: any): void => {
e.stopPropagation();
dispatch(changeSlider(index));
dispatch(changeView(index));
}}
tabIndex={index}
type="button"
>
Jump
</button>
<ReactHover options={optionsCursorTrueWithMargin}>
<Trigger type='trigger'>
<div className='action-component-trigger' style={index > sliderIndex ? { color: '#5f6369' } : {}}>
<div className='action-component-text'>
{`${displayName}: ${componentName !== 'nameless' ? componentName : ''} `}
{/* {`displayName: ${displayName}`} */}
</div>
<button className='time-button' type='button'>
{displayTime}
</button>
<button
className='jump-button'
onClick={(e: any): void => {
e.stopPropagation();
dispatch(changeSlider(index));
dispatch(changeView(index));
}}
tabIndex={index}
type='button'
>
Jump
</button>
</div>
</Trigger>
<Hover type='hover'>
<div style={{ padding: '0.5rem 1rem' }} id='hover-box'>
<p>{logChangedState(index)}</p>
</div>
</Hover>
</ReactHover>
</div>
);
};
Expand Down
28 changes: 14 additions & 14 deletions src/app/components/BarGraph.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-nocheck
import React from 'react';
import React, { useEffect } from 'react';
import { BarStack } from '@visx/shape';
import { SeriesPoint } from '@visx/shape/lib/types';
import { Group } from '@visx/group';
Expand Down Expand Up @@ -109,19 +109,19 @@ const BarGraph = (props) => {
data,
};

const animateButton = function (e) {
e.preventDefault;
e.target.classList.add('animate');
e.target.innerHTML = 'Saved!';
setTimeout(function () {
e.target.innerHTML = 'Save Series';
e.target.classList.remove('animate');
}, 1000);
};
const classname = document.getElementsByClassName('save-series-button');
for (let i = 0; i < classname.length; i++) {
classname[i].addEventListener('click', animateButton, false);
}
// use this to animate the save series button. It
useEffect(() => {
const saveButtons = document.getElementsByClassName('save-series-button');
for (let i = 0; i < saveButtons.length; i++) {
if (tabs[currentTab].seriesSavedStatus) {
saveButtons[i].classList.add('animate');
saveButtons[i].innerHTML = 'Saved!';
} else {
saveButtons[i].innerHTML = 'Save Series';
saveButtons[i].classList.remove('animate');
};
};
});
return (
<div className='bargraph-position'>
<button
Expand Down
Loading