Skip to content

Commit 9c2097d

Browse files
Merge pull request #33 from rtviner/manifest-updates
Package.json updates for Travis CI
2 parents 5818004 + e87e445 commit 9c2097d

File tree

10 files changed

+9
-28
lines changed

10 files changed

+9
-28
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"scripts": {
1616
"build": "webpack --mode production",
1717
"dev": "webpack --mode development --watch",
18-
"test": "jest --verbose --coverage --watchAll --forceExit",
18+
"test": "jest --verbose --coverage",
1919
"docker-test-lint": "eslint --ext .js --ext .jsx src",
2020
"docs": "typedoc --json docs --inputFiles src/app --inputFiles src/backend --readme docs/readme.md"
2121
},

src/app/components/BarGraph.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ const tooltipStyles = {
5656
const BarGraph = (props) => {
5757
const [{ tabs, currentTab }, dispatch] = useStoreContext();
5858
const { width, height, data } = props;
59-
console.log('data: ', data)
6059
const {
6160
tooltipOpen, tooltipLeft, tooltipTop, tooltipData, hideTooltip, showTooltip,
6261
} = useTooltip<TooltipData>();
@@ -92,7 +91,6 @@ const BarGraph = (props) => {
9291
const yMax = height - margin.top - 150;
9392
snapshotIdScale.rangeRound([0, xMax]);
9493
renderingScale.range([yMax, 0]);
95-
console.log("renderingScale range: ", renderingScale.range([yMax, 0]))
9694
return (
9795
<div>
9896
<svg ref={containerRef} width={width} height={height}>
@@ -143,7 +141,6 @@ const BarGraph = (props) => {
143141
/* TIP TOOL EVENT HANDLERS */
144142
// Hides tool tip once cursor moves off the current rect
145143
onMouseLeave={() => {
146-
console.log('bar: ', bar)
147144
dispatch(onHoverExit(data.componentData[bar.key].rtid),
148145
tooltipTimeout = window.setTimeout(() => {
149146
hideTooltip()

src/app/components/ComponentMap.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function ComponentMap({
4242
// imported props to be used to display the dendrogram
4343
width: totalWidth,
4444
height: totalHeight,
45-
margin = defaultMargin,
45+
margin: defaultMargin,
4646
snapshots: snapshots,
4747
}: LinkTypesProps) {
4848

@@ -158,7 +158,6 @@ export default function ComponentMap({
158158
stroke="#ff6569"
159159
onClick={() => {
160160
node.data.isExpanded = !node.data.isExpanded;
161-
// console.log(node);
162161
forceUpdate();
163162
}}
164163
/>
@@ -174,7 +173,7 @@ export default function ComponentMap({
174173
stroke={node.children ? '#62d6fb' : '#161521'}
175174
strokeWidth={1}
176175
strokeDasharray={node.children ? '0' : '2,2'}
177-
strokeOpazcity='1'
176+
strokeOpacity='1'
178177
rx={node.children ? 4 : 10}
179178
onClick={() => {
180179
node.data.isExpanded = !node.data.isExpanded;

src/app/components/legend.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ type snapHierarchy = {};
1010
//type snapHierarchy = {`Record<string, unknown>`};
1111
export default function LegendKey(props: any) {
1212
const { hierarchy } = props;
13-
// console.log('this is the props' + JSON.stringify(Object.entries(props)))
14-
// console.log('this is the props.hierarchy' + JSON.stringify(Object.entries(props.hierarchy)))
1513
// we are sifting through array of displayNames and sorting them into key value pairs in an object, based on the branch they are on:
1614
// { '.0': [1.0, 2.0, 3.0, 4.0], '.1': [1.1, 2.1, 3.1,...], '.2': [....]}
1715
// then we create an array, with each index being strings showing the range of the branch, see below:

src/backend/index.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ const mode: Mode = {
2525
jumping: false,
2626
paused: false,
2727
};
28-
// console.log("linkFiberStart in index.ts:" + linkFiberStart);
28+
2929
const linkFiber = linkFiberStart(snapShot, mode);
30-
// console.log('linkFiber in index.ts: ' + linkFiber);
3130
const timeJump = timeJumpStart(snapShot, mode);
3231

3332
// function getRouteURL(node: SnapshotNode): string {
@@ -44,7 +43,6 @@ const timeJump = timeJumpStart(snapShot, mode);
4443

4544
// * Event listener for time-travel actions
4645
window.addEventListener('message', ({ data: { action, payload } }: MsgData) => {
47-
// console.log('linkFiber in index.ts: ' + linkFiber);
4846
switch (action) {
4947
case 'jumpToSnap':
5048
timeJump(payload, true); // * This sets state with given payload
@@ -57,21 +55,16 @@ window.addEventListener('message', ({ data: { action, payload } }: MsgData) => {
5755
mode.paused = payload;
5856
break;
5957
case 'onHover':
60-
// console.log("curr payload ", payload);
6158
if (Array.isArray(payload)) {
62-
// console.log('inside array is array if block')
6359
for (let i = 0; i < payload.length; i + 1) {
64-
// console.log("current payload value: ", payload[i]);
6560
let element = document.getElementById(payload[i])
6661
if (element !== null) {
6762
element.style.backgroundColor = '#C0D9D9';
6863
}
6964
}
7065
} else {
7166
let element: HTMLElement = document.querySelector(`.${payload}`);
72-
// console.log("element: ", element);
7367
if (element !== null) {
74-
// console.log("element style: ", element.style)
7568
element.style.backgroundColor = '#C0D9D9';
7669
}
7770
}
@@ -86,7 +79,6 @@ window.addEventListener('message', ({ data: { action, payload } }: MsgData) => {
8679
}
8780
} else {
8881
let element: HTMLElement = document.querySelector(`.${payload}`);
89-
// console.log("element style: ", element.style)
9082
if (element !== null) {
9183
element.style.backgroundColor = '';
9284
}

src/backend/linkFiber.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ function createTree(
313313
// We then store them along with the corresponding memoizedState.queue,
314314
// which includes the dispatch() function we use to change their state.
315315
const hooksStates = traverseRecoilHooks(memoizedState, memoizedProps);
316-
// console.log("hookStates: ", hooksStates);
317316
hooksStates.forEach((state, i) => {
318317
hooksIndex = componentActionsRecord.saveNew(
319318
state.state,
@@ -326,8 +325,7 @@ function createTree(
326325

327326
// }
328327
// newState.push(state.state);
329-
// console.log('newState in Recoil: ', newState);
330-
// console.log('state.state: ', state.state);
328+
331329
/* what is this supposed to do??? currently doesn't work?? and makes no sense, newState is an object, how can you push state.state into an object?? */
332330
// if (newState && newState.hooksState) {
333331
// newState.push(state.state);
@@ -416,7 +414,6 @@ function createTree(
416414
// remove existing rtid before adding a new one
417415
if (pointer.stateNode.classList.length > 0) {
418416
let lastClass = pointer.stateNode.classList[pointer.stateNode.classList.length -1];
419-
// console.log("last class: ", lastClass, "linkFiber class? ", lastClass.includes("fromLinkFiber"));
420417
if (lastClass.includes("fromLinkFiber")) {
421418
pointer.stateNode.classList.remove(lastClass);
422419
}
@@ -434,7 +431,6 @@ function createTree(
434431
// remove existing rtid before adding a new one
435432
if (currentFiber.child.stateNode.classList.length > 0) {
436433
let lastClass = currentFiber.child.stateNode.classList[currentFiber.child.stateNode.classList.length -1];
437-
// console.log("lastClass: ", lastClass, "linkFiber class? ", lastClass.includes("fromLinkFiber"));
438434
if (lastClass.includes("fromLinkFiber")) {
439435
currentFiber.child.stateNode.classList.remove(lastClass);
440436
}

src/backend/timeJump.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export default (origin, mode) => {
2626
// Set the state of the origin tree if the component is stateful
2727
function jump(target, firstCall = false) {
2828
if (!target) return;
29-
//console.log("target in jump: ", target)
3029
if (target.state === 'stateless') {
3130
target.children.forEach(child => jump(child));
3231
return;
@@ -35,7 +34,6 @@ export default (origin, mode) => {
3534
const component = componentActionsRecord.getComponentByIndex(
3635
target.componentData.index,
3736
);
38-
// console.log("component in time jump: ", component)
3937
// check if it is a stateful class component
4038
// if yes, find the component by its index and assign it to a variable
4139
// call that components setState method to reset state to the state at the time of the jump snapshot

src/extension/background.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ chrome.runtime.onMessage.addListener((request, sender) => {
185185
const { action, index, name } = request;
186186
let isReactTimeTravel = false;
187187

188+
188189
// Filter out tabs that don't have reactime, tabs that dont use react?
189190
if (
190191
action === 'tabReload' ||

src/extension/build/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
"icons": { "48": "assets/icon48.png", "128": "assets/icon128.png" },
1313
"content_scripts": [
1414
{
15-
"matches": ["<all_urls>"],
15+
"matches": ["http://localhost/*", "https://localhost/*"],
1616
"js": ["bundles/content.bundle.js"]
1717
}
1818
],
1919
"web_accessible_resources" : ["bundles/backend.bundle.js"],
20-
"permissions": ["contextMenus", "tabs", "activeTab", "<all_urls>"]
20+
"permissions": ["contextMenus", "tabs", "activeTab", "http://localhost/*", "https://localhost/*"]
2121

2222
}

src/extension/contentScript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ let firstMessage = true;
55
window.addEventListener('message', msg => { // runs automatically every second
66
// window listener picks up the message it sends, so we should filter
77
// messages sent by contentscript
8-
8+
99
if (firstMessage) {
1010
// one-time request tells the background script that the tab has reloaded
1111
chrome.runtime.sendMessage({ action: 'tabReload' });

0 commit comments

Comments
 (0)