Skip to content

Commit f1dde71

Browse files
committed
merging
1 parent c2923d9 commit f1dde71

File tree

8 files changed

+9224
-8720
lines changed

8 files changed

+9224
-8720
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@
166166
"acorn-jsx": "^5.2.0",
167167
"apexcharts": "^3.23.1",
168168
"chai": "^4.2.0",
169-
"d3": "^5.16.0",
170-
"d3-scale-chromatic": "^2.0.0",
169+
"d3": "^7.6.1",
170+
"d3-scale-chromatic": "^3.0.0",
171171
"d3-shape": "^2.0.0",
172-
"d3-zoom": "^1.8.3",
172+
"d3-zoom": "^3.0.0",
173173
"immer": "^9.0.12",
174174
"intro.js": "^5.0.0",
175175
"intro.js-react": "^0.6.0",

src/app/components/Diff.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ interface DiffProps {
1313
* @param props props from maincontainer
1414
* @returns a diff tree or a string stating no state changes have happened
1515
*/
16-
function Diff(props: DiffProps) {
16+
// LL added Record<string, unknown> for return statement on function
17+
function Diff(props: DiffProps): Record<string, unknown> {
1718
const { snapshot, show } = props;
1819
const [mainState] = useStoreContext();
1920
const { currentTab, tabs } = mainState; // k/v pairs of mainstate store object being created
@@ -28,7 +29,7 @@ function Diff(props: DiffProps) {
2829
}
2930

3031
// cleaning preview from stateless data
31-
const statelessCleanning = (obj:{name?:string; componentData?:object; state?:string|any;stateSnaphot?:object; children?:any[]}) => {
32+
const statelessCleanning = (obj:{name?:string; componentData?:object; state?:string|any; stateSnaphot?:object; children?:any[]}) => {
3233
const newObj = { ...obj };
3334
if (newObj.name === 'nameless') {
3435
delete newObj.name;

src/app/containers/MainContainer.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function MainContainer(): any {
2828
// this function handles Time Jump sidebar view
2929
const toggleActionContainer = () => {
3030
setActionView(!actionView);
31+
// aside is like an added text that appears "on the side" aside some text.
3132
const toggleElem = document.querySelector('aside');
3233
toggleElem.classList.toggle('no-aside');
3334
// hides the record toggle button from Actions Container in Time Jump sidebar view
@@ -47,6 +48,7 @@ function MainContainer(): any {
4748
const currentPort = chrome.runtime.connect();
4849
// listen for a message containing snapshots from the background script
4950
currentPort.onMessage.addListener(
51+
// parameter message is an object with following type script properties
5052
(message: {
5153
action: string;
5254
payload: Record<string, unknown>;

src/app/containers/StateContainer.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// @ts-nocheck
22
import React, { useState } from 'react';
3+
/* <Router> that keeps the history of your “URL” in memory (does not read/write to the address bar)
4+
Useful in tests and non-browser environments like React Native.
5+
*/
36
import {
47
MemoryRouter as Router,
58
Route,
@@ -8,6 +11,7 @@ import {
811
} from 'react-router-dom';
912
import StateRoute from '../components/StateRoute';
1013
import DiffRoute from '../components/DiffRoute';
14+
1115
interface StateContainerProps {
1216
snapshot: Record<
1317
number,

src/backend/helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export const getHooksNames = (elementType: string): Array<string> => {
8080
return ['unknown'];
8181
}
8282

83+
// hookNames will contain an object with methods (functions)
8384
const hooksNames: any = {};
8485

8586
// Begin search for hook names, only if ast has a body property.

src/backend/linkFiber.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,9 @@ function createTree(
547547
* linkFiber contains core module functionality, exported as an anonymous function.
548548
*/
549549
export default (snap: Snapshot, mode: Mode): (() => void) => {
550+
// checks for visiblity of document
550551
function onVisibilityChange(): void {
552+
// hidden property = background tab/minimized window
551553
doWork = !document.hidden;
552554
}
553555
return () => {
@@ -559,7 +561,7 @@ export default (snap: Snapshot, mode: Mode): (() => void) => {
559561
action: 'devToolsInstalled',
560562
payload: 'devToolsInstalled'
561563
}, '*');
562-
// reactInstance returns an object of the react
564+
// reactInstance returns an object of the react, 1st element in map
563565
const reactInstance = devTools.renderers.get(1);
564566
// if no React Instance found then target is not a compatible app
565567
if (!reactInstance) { return; }

src/backend/tree.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ class Tree {
127127
circularComponentTable.clear();
128128
}
129129
// creates copy of present node
130-
let copy: Tree = new Tree(this.state, this.name, this.componentData, this.rtid, this.recoilDomNode);
130+
let copy: Tree = new Tree(this.state, this.name, this.componentData, this.
131+
\, this.recoilDomNode);
131132
delete copy.parent;
132133
circularComponentTable.add(this);
133134
copy = scrubUnserializableMembers(copy);

yarn.lock

Lines changed: 9206 additions & 8713 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)