Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
8552e6e
fixed black screen on reload bug
Joseph-S-Young Feb 2, 2022
2526d9b
returned the React App not found to original wording to pass test
Joseph-S-Young Feb 2, 2022
211b22f
Merge pull request #1 from oslabs-beta/Loader
Joseph-S-Young Feb 3, 2022
eb93ef2
done for night post module
Joseph-S-Young Feb 5, 2022
12df2ef
small maifest change
Joseph-S-Young Feb 7, 2022
14bbff3
made right click popout opening compatible with V3 (#3)
Joseph-S-Young Feb 7, 2022
e4d5d99
mostly done with dev tool checker
Joseph-S-Young Feb 8, 2022
2379b21
nearly done with react dev tools checker
Joseph-S-Young Feb 8, 2022
132b2d3
foo
Joseph-S-Young Feb 9, 2022
403db96
checkout main
Joseph-S-Young Feb 12, 2022
1868857
fixed self introduced slider error
Joseph-S-Young Feb 12, 2022
892c00a
third done with error page and added lock button functionality
Joseph-S-Young Feb 13, 2022
daec17b
added all active tabInfo on every tab change. ToDo finish error page
Joseph-S-Young Feb 13, 2022
f7a578b
hello
Feb 14, 2022
30c9f46
Removing all tracking done through cookies.
jessehall3 Feb 14, 2022
7f74204
Merge pull request #5 from oslabs-beta/remove-cookies
Joseph-S-Young Feb 14, 2022
5dd42fb
Resolves critically vulnerable dependencies.
jessehall3 Feb 14, 2022
848852a
Merge pull request #6 from oslabs-beta/crictial-vulnerabilities
Joseph-S-Young Feb 14, 2022
2336ecf
pausing for unit
Joseph-S-Young Feb 15, 2022
559c6c4
removed unnecessary console.logs/comments
wtaylor9691 Feb 17, 2022
7f76186
UI Hover Changes
wtaylor9691 Feb 17, 2022
75e2d33
Merge branch 'master' of https://github.com/oslabs-beta/reactime into…
wtaylor9691 Feb 17, 2022
e8246f3
Merge pull request #7 from oslabs-beta/winslow2
wtaylor9691 Feb 17, 2022
3a17da0
ending for the night
Joseph-S-Young Feb 18, 2022
b5ae82a
nearly done with error page
Joseph-S-Young Feb 18, 2022
242c956
almost done with launch content script button
Joseph-S-Young Feb 18, 2022
26b36a9
finished with launch button for V2 manifest
Joseph-S-Young Feb 18, 2022
74407f5
cleaned up for merge
Joseph-S-Young Feb 18, 2022
0a9a18d
merged main into errorPage
Joseph-S-Young Feb 18, 2022
b94d34f
small change error page
Joseph-S-Young Feb 18, 2022
6a1152d
finished with erroPage, ensured test compliance
Joseph-S-Young Feb 18, 2022
f512b2f
Merge pull request #8 from oslabs-beta/errorPage
Joseph-S-Young Feb 18, 2022
721db49
Cant figure out split
Feb 23, 2022
00fea6c
split function
Feb 23, 2022
b98e45e
merging split view
Joseph-S-Young Feb 23, 2022
ace52c2
split view working, no working button
Joseph-S-Young Feb 23, 2022
bc497af
done with split viewgit add .!
Joseph-S-Young Feb 23, 2022
0c0b41b
dinner
Joseph-S-Young Feb 24, 2022
a9e2cd7
modified height of slider and buttons
Joseph-S-Young Feb 24, 2022
7e4aa15
changed test
Joseph-S-Young Feb 24, 2022
4f96881
updated style for launch content script
Joseph-S-Young Feb 24, 2022
8835758
Merge pull request #9 from oslabs-beta/SplitView
Joseph-S-Young Feb 24, 2022
7373009
modfied Loader icons
Joseph-S-Young Feb 24, 2022
aee234f
ts test
Joseph-S-Young Feb 24, 2022
af3a795
ts test2
Joseph-S-Young Feb 24, 2022
e85fc26
fixed tooltips in component map and history map, cleaned
Joseph-S-Young Feb 24, 2022
84ce79c
solved clear bug, TODO remove all refrences to empty mode
Joseph-S-Young Feb 24, 2022
f7b0e2e
deep cleaned background, removed onReload case, done for now
Joseph-S-Young Feb 24, 2022
cdac49b
adding the abilty to close a component
Joseph-S-Young Feb 24, 2022
e6d4841
fixed component map expansion UI issue
Joseph-S-Young Feb 26, 2022
12f7b8c
updated data diagram
Joseph-S-Young Mar 1, 2022
cdab1e6
Merge branch 'master' into master
Joseph-S-Young Mar 1, 2022
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
Binary file added assets/DataFlowDiagram.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"@types/chrome": "^0.0.119",
"@types/d3-scale-chromatic": "^2.0.0",
"@types/jest": "^26.0.4",
"@types/lodash.isequal": "^4.5.5",
"@types/node": "^12.19.6",
"@typescript-eslint/eslint-plugin": "^3.6.1",
"@typescript-eslint/parser": "^3.6.1",
Expand Down Expand Up @@ -162,6 +163,7 @@
"jest-runner": "^26.1.0",
"jscharting": "^3.0.2",
"jsondiffpatch": "^0.3.11",
"lodash": "^4.17.21",
"prop-types": "^15.7.2",
"rc-slider": "^8.7.1",
"rc-tooltip": "^3.7.3",
Expand All @@ -176,6 +178,7 @@
"react-spinners": "^0.11.0",
"react-split": "^2.0.14",
"recoil": "0.0.10",
"util": "^0.12.4",
"web-vitals": "^1.1.0"
}
}
42 changes: 21 additions & 21 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Our mission at Reactime is to maintain and iterate constantly, but never at the

## File Structure

In the *src* folder, there are three directories we care about: *app*, *backend*, and *extension*.
In the *src* folder, there are three directories we care about: *app*, *backend*, and *extension*.
```
src/
├── app/ # Frontend code
Expand All @@ -19,18 +19,18 @@ src/
│   ├── containers/ # More React components
│   ├── reducers/ # Redux mechanism for updating state
│   ├── styles/ #
│   ├── index.tsx # Starting point for root App component
│   ├── index.tsx # Starting point for root App component
│   ├── module.d.ts #
│   └── store.tsx #
├── backend/ # "Backend" code (injected into target app)
│   │ # Focus especially on linkFiber, timeJump, tree, and helpers
│   ├── __tests__/ #
│   ├── types/ # Typescript interfaces
│   ├── helpers.js #
│   ├── index.ts # Starting point for backend functionality
│   ├── index.d.ts #
│   ├── linkFiber.ts #
│   ├── helpers.js #
│   ├── index.ts # Starting point for backend functionality
│   ├── index.d.ts #
│   ├── linkFiber.ts #
│   ├── masterState.js # Component action record interface
│   ├── module.d.ts #
│   ├── package.json #
Expand All @@ -46,7 +46,7 @@ src/
└──
```

1. The *app* folder is responsible for the Single Page Application that you see when you open the chrome dev tools under the Reactime tab.
1. The *app* folder is responsible for the Single Page Application that you see when you open the chrome dev tools under the Reactime tab.

![FRONTEND DATA FLOW](../assets/frontend.png)

Expand All @@ -55,7 +55,7 @@ src/

![BACKEND DATA FLOW](../assets/backend.png)

3. The *extension* folder is where the `contentScript.js` and `background.js` are located.
3. The *extension* folder is where the `contentScript.js` and `background.js` are located.
- Like regular web apps, Chrome Extensions are event-based. The background script is where one typically monitors for browser triggers (e.g. events like closing a tab, for example). The content script is what allows us to read or write to our target web application, usually as a result of [messages passed](https://developer.chrome.com/extensions/messaging) from the background script.
- These two files help us handle requests both from the web browser and from the Reactime extension itself

Expand All @@ -66,7 +66,7 @@ All the diagrams of data flows are avaliable on [MIRO](https://miro.com/app/boar

The general flow of data is described in the following steps:

![GENERAL DATA FLOW](../assets/dataflow.jpg)
![GENERAL DATA FLOW](../assets/DataFlowDiagram.PNG)

1. When the background bundle is loaded by the browser, it executes a script injection into the dom. (see section on *backend*). This script uses a technique called [throttle](https://medium.com/@bitupon.211/debounce-and-throttle-160affa5457b) to send state data from the app to the content script every specified milliseconds (in our case, this interval is 70ms).
<!-- CHECK LINE 496 IN LINKFIBER.TS -->
Expand All @@ -82,21 +82,21 @@ The general flow of data is described in the following steps:
Navigation between different console.log panels can be confusing when running Reactime. We created a short instruction where you can find the results for your console.log

### <b> /src/extension </b>
Console.logs from the Extension folder you can find here:
Console.logs from the Extension folder you can find here:
- Chrome Extension (Developer mode)
- Background page
- Background page

![extension](../assets/extension-console.gif)
![extension](../assets/extension-console.gif)

### <b> /src/app </b>
Console.logs from the App folder you can find here:
Console.logs from the App folder you can find here:
- Chrome Browser
- Inspect

![frontend](../assets/console.gif)

### <b> /src/backend </b>
Console.logs from the App folder you can find here:
Console.logs from the App folder you can find here:
- Open the Reactime extension in Chrome
- Click "Inspect" on Reactime

Expand All @@ -105,15 +105,15 @@ Console.logs from the App folder you can find here:
## Chrome Developer Resources
Still unsure about what content scripts and background scripts do for Reactime, or for a chrome extensions in general?
- The implementation details [can be found](./extension/background.js) [in the source files](./extension/contentScript.ts) themselves.
- We also encourage you to dive into [the official Chrome Developer Docs](https://developer.chrome.com/home).
- We also encourage you to dive into [the official Chrome Developer Docs](https://developer.chrome.com/home).

Some relevant sections are reproduced below:

> Content scripts are files that run in the context of web pages.
> Content scripts are files that run in the context of web pages.
>
> By using the standard Document Object Model (DOM), they are able to **read** details of the web pages the browser visits, **make changes** to them and **pass information back** to their parent extension. ([Source](https://developer.chrome.com/extensions/content_scripts))

- One helpful way to remember a content script's role in the Chrome ecosystem is to think: a *content* script is used to read and modify a target web page's rendered *content*.
- One helpful way to remember a content script's role in the Chrome ecosystem is to think: a *content* script is used to read and modify a target web page's rendered *content*.

>A background page is loaded when it is needed, and unloaded when it goes idle.
>
Expand All @@ -122,12 +122,12 @@ Still unsure about what content scripts and background scripts do for Reactime,
>The background page was listening for an event, and the event is dispatched.
>A content script or other extension sends a message.
>Another view in the extension, such as a popup, calls `runtime.getBackgroundPage`.
>
>
>Once it has been loaded, a background page will stay running as long as it is performing an action, such as calling a Chrome API or issuing a network request.
>
> Additionally, the background page will not unload until all visible views and all message ports are closed. Note that opening a view does not cause the event page to load, but only prevents it from closing once loaded. ([Source](https://developer.chrome.com/extensions/background_pages))

- You can think of background scripts serving a purpose analogous to that of a **server** in the client/server paradigm. Much like a server, our `background.js` listens constantly for messages (i.e. requests) from two main places:
1. The content script
2. The chrome extension "front-end" **(*NOT* the interface of the browser, this is an important distinction.)**
- In other words, a background script works as a sort of middleman, directly maintaining connection with its parent extension, and acting as a proxy enabling communication between it and the content script.
2. The chrome extension "front-end" **(*NOT* the interface of the browser, this is an important distinction.)**
- In other words, a background script works as a sort of middleman, directly maintaining connection with its parent extension, and acting as a proxy enabling communication between it and the content script.
7 changes: 6 additions & 1 deletion src/app/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const save = (tabsObj) => ({
});
export const deleteSeries = () => ({
type: types.DELETE_SERIES,
})
});
export const toggleMode = (mode) => ({
type: types.TOGGLE_MODE,
payload: mode,
Expand Down Expand Up @@ -90,6 +90,11 @@ export const toggleSplit = () => ({
type: types.TOGGLE_SPLIT,
});

export const toggleExpanded = (node) => ({
type: types.TOGGLE_EXPANDED,
payload: node,
});

export const launchContentScript = (tab) => ({
type: types.LAUNCH_CONTENT,
payload: tab,
Expand Down
Loading