diff --git a/README.md b/README.md index 459fae261..114e05d7a 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,11 @@ How To Use • Features • Website • Read More
-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. +Currently, Reactime supports React apps using stateful components and Hooks, with beta support for Recoil and Context API and frameworks like Gatsby and Next.js. -Reactime version 9.0 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 version 11.0 implements full compatibility with React Hooks. Additionally, hover functionality was added to all of the nodes that populate in the history tab, allowing developers to more easily view the state at that snapshot. -Reactime 9.0 fixes previous version bugs and incorporates improved user experience for saved snapshot series. +Reactime 11.0 fixes existing bugs while also improving the user experience for information tooltips. After installing Reactime, you can test its functionalities with your React application in development mode. @@ -152,6 +152,8 @@ After cloning this repository, developers can simply run `npm run docs` at the r - [React Fiber and Reactime](https://medium.com/@aquinojardim/react-fiber-reactime-4-0-f200f02e7fa8) - [Meet Reactime - a time-traveling State Debugger for React](https://medium.com/@yujinkay/meet-reactime-a-time-traveling-state-debugger-for-react-24f0fce96802) - [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) +- [Time-Traveling Through React State with Reactime 9.0](https://rxlina.medium.com/time-traveling-through-react-state-with-reactime-9-0-371dbdc99319) +- [What time is it? Reactime!](https://medium.com/@liuedar/what-time-is-it-reactime-fd7267b9eb89) ## Authors - **Harry Fox** - [@StackOverFlowWhereArtThou](https://github.com/StackOverFlowWhereArtThou) @@ -201,6 +203,11 @@ After cloning this repository, developers can simply run `npm run docs` at the r - **Andy Tsou** - [@andytsou19](https://github.com/andytsou19) - **Feiyi Wu** - [@FreyaWu](https://github.com/FreyaWu) - **Viet Nguyen** - [@vnguyen95](https://github.com/vnguyen95) +- **Alex Gomez** - [@alexgomez9](https://github.com/alexgomez9) +- **Edar Liu** - [@liuedar](https://github.com/liuedar) +- **Kristina Wallen** - [@kristinawallen](https://github.com/kristinawallen) +- **Quan Le** - [@blachfog](https://github.com/Blachfog) +- **Robert Maeda** - [@robmaeda](https://github.com/robmaeda) ## License diff --git a/src/app/components/Action.tsx b/src/app/components/Action.tsx index 6501781ab..76a8fbe36 100644 --- a/src/app/components/Action.tsx +++ b/src/app/components/Action.tsx @@ -5,6 +5,7 @@ import React from 'react'; import ReactHover, { Trigger, Hover } from 'react-hover'; import { changeView, changeSlider } from '../actions/actions'; +import snapshots from './snapshots'; /** * @template ActionProps Props for the action component @@ -148,8 +149,8 @@ const Action = (props: ActionProps): JSX.Element => {{logChangedState(index)}
+{(logChangedState(index))}
{props.name}
diff --git a/src/app/containers/ActionContainer.tsx b/src/app/containers/ActionContainer.tsx index 1fa8c6a8b..34b669aa0 100644 --- a/src/app/containers/ActionContainer.tsx +++ b/src/app/containers/ActionContainer.tsx @@ -24,6 +24,7 @@ function ActionContainer(props) { let actionsArr = []; const hierarchyArr: any[] = []; + function findDiff(index) { const statelessCleanning = (obj: { name?: string; @@ -154,7 +155,6 @@ function ActionContainer(props) { } // Sort by index. hierarchyArr.sort((a, b) => a.index - b.index); - actionsArr = hierarchyArr.map( ( snapshot: { diff --git a/src/app/containers/MainContainer.tsx b/src/app/containers/MainContainer.tsx index 7e29ad73e..cbce2946f 100644 --- a/src/app/containers/MainContainer.tsx +++ b/src/app/containers/MainContainer.tsx @@ -18,7 +18,6 @@ const mixpanel = require('mixpanel').init('12fa2800ccbf44a5c36c37bc9776e4c0', { debug: false, protocol: 'https', }); - function MainContainer(): any { const [store, dispatch] = useStoreContext(); const { tabs, currentTab, port: currentPort } = store; diff --git a/src/app/containers/StateContainer.tsx b/src/app/containers/StateContainer.tsx index ec6a0a409..2b630e734 100644 --- a/src/app/containers/StateContainer.tsx +++ b/src/app/containers/StateContainer.tsx @@ -41,6 +41,8 @@ const StateContainer = (props: StateContainerProps): JSX.Element => { viewIndex, webMetrics, currLocation, + // added snapshots, Rob 11/4 + snapshots, } = props; return ( diff --git a/src/app/reducers/mainReducer.js b/src/app/reducers/mainReducer.js index ef6c2af47..1ea0c068b 100644 --- a/src/app/reducers/mainReducer.js +++ b/src/app/reducers/mainReducer.js @@ -1,4 +1,5 @@ import { produce, original } from 'immer'; +import { debuglog } from 'util'; import * as types from '../constants/actionTypes.ts'; @@ -11,25 +12,27 @@ export default (state, action) => produce(state, draft => { // eslint-disable-next-line max-len // function that finds the index in the hierarchy and extracts the name of the equivalent index to add to the post message // eslint-disable-next-line consistent-return + + // (action.payload, hierarchy) const findName = (index, obj) => { // eslint-disable-next-line eqeqeq if (obj && obj.index == index) { return obj.name; } - const objChildArray = []; if (obj) { + // eslint-disable-next-line no-restricted-syntax for (const objChild of obj.children) { objChildArray.push(findName(index, objChild)); } } + // eslint-disable-next-line no-restricted-syntax for (const objChildName of objChildArray) { if (objChildName) { return objChildName; } } }; - switch (action.type) { // Save case will store the series user wants to save to the chrome local storage case types.SAVE: { @@ -76,11 +79,12 @@ export default (state, action) => produce(state, draft => { } case types.MOVE_BACKWARD: { - if (snapshots.length > 0 && sliderIndex > 0) { + if (sliderIndex > 0) { const newIndex = sliderIndex - 1; // eslint-disable-next-line max-len // finds the name by the newIndex parsing through the hierarchy to send to background.js the current name in the jump action const nameFromIndex = findName(newIndex, hierarchy); + port.postMessage({ action: 'jumpToSnap', payload: snapshots[newIndex], @@ -105,9 +109,9 @@ export default (state, action) => produce(state, draft => { port.postMessage({ action: 'jumpToSnap', + payload: snapshots[newIndex], index: newIndex, name: nameFromIndex, - payload: snapshots[newIndex], tabId: currentTab, }); @@ -146,7 +150,8 @@ export default (state, action) => produce(state, draft => { // eslint-disable-next-line max-len // finds the name by the action.payload parsing through the hierarchy to send to background.js the current name in the jump action const nameFromIndex = findName(action.payload, hierarchy); - + // nameFromIndex is a number based on which jump button is pushed + port.postMessage({ action: 'jumpToSnap', payload: snapshots[action.payload], diff --git a/src/app/store.tsx b/src/app/store.tsx index 0241cca82..541f39610 100644 --- a/src/app/store.tsx +++ b/src/app/store.tsx @@ -3,4 +3,4 @@ import React, { useContext } from 'react'; export const StoreContext = React.createContext(); -export const useStoreContext:any = () => useContext(StoreContext); +export const useStoreContext:any = () => useContext(StoreContext); \ No newline at end of file diff --git a/src/app/styles/components/d3graph.css b/src/app/styles/components/d3graph.css index d2ee6aa4b..15f2174c2 100644 --- a/src/app/styles/components/d3graph.css +++ b/src/app/styles/components/d3graph.css @@ -30,17 +30,18 @@ body { div.tooltip { position: absolute; - text-align: center; - display: inline; - max-width: 250px; - overflow-wrap: break-word; - padding: 6px; - color: #2b2f39; + /* text-align: center; */ + /* display: inline; */ + max-width: 150px; + /* overflow-wrap: break-word; */ + padding: 0.5rem 1rem; + /* padding: 6px; */ + color: white; font-size: 12px; - font-family: 'Overpass Mono', monospace; - background: #679dca; - border-radius: 8px; - pointer-events: none; + font-family: 'Roboto', sans-serif; + background: #51565e; + border-radius: 5px; + /* pointer-events: none; */ } .d3-tip { diff --git a/src/app/styles/components/diff.css b/src/app/styles/components/diff.css index 26efa4689..cb74dd16f 100644 --- a/src/app/styles/components/diff.css +++ b/src/app/styles/components/diff.css @@ -38,7 +38,7 @@ ul.jsondiffpatch-delta { } .jsondiffpatch-unchanged, .jsondiffpatch-movedestination { - color: gray; + color: white; } .jsondiffpatch-unchanged, .jsondiffpatch-movedestination > .jsondiffpatch-value { diff --git a/src/app/styles/layout/_stateContainer.scss b/src/app/styles/layout/_stateContainer.scss index ef195152d..2608411af 100644 --- a/src/app/styles/layout/_stateContainer.scss +++ b/src/app/styles/layout/_stateContainer.scss @@ -209,6 +209,7 @@ max-width: 150px; background-color: #51565e; border-radius: 5px; + color: white; } .bargraph-position { diff --git a/src/app/styles/main.scss b/src/app/styles/main.scss index a6c84ce39..029440139 100644 --- a/src/app/styles/main.scss +++ b/src/app/styles/main.scss @@ -64,4 +64,5 @@ } .props p{ line-height:1; -} \ No newline at end of file +} + diff --git a/src/backend/helpers.ts b/src/backend/helpers.ts index 5ee41be8b..b42ac9b83 100644 --- a/src/backend/helpers.ts +++ b/src/backend/helpers.ts @@ -111,6 +111,8 @@ export const getHooksNames = (elementType: string): Array