Commit Graph

24 Commits

Author SHA1 Message Date
Brian Vaughn cb3fb42129 Patch console to append component stacks (#348)
* Patch console.warn and console.error to auto-append owners-only component stacks.

This setting is enabled by default and will work for React Native even if no front-end DevTools shell is being used. The setting can be disabled via a new, persisted user preference though.
2019-07-17 11:12:39 -07:00
Brian Vaughn 0f2fb5badf Standalone NPM packages and React Native support (#335)
* Add version 4 react-devtools and react-devtools-core packages which support both React Native and e.g. Safari or iframe DOM usage.
* Replaces typed operations arrays with regular arrays in order to support Hermes. This is unfortunate, since in theory a typed array buffer could be more efficiently transferred between frontend and backend for the web extension, but this never actually worked properly in v8, only Spidermonkey, and it fails entirely in Hermes so for the time being- it's been removed.
* Adds support for React Native (paper renderer)
* Adds a style editor for react-native and react-native-web
2019-07-13 10:05:04 -07:00
Brian Vaughn 4f1d347c04 Custom filters are applied by default after extension reload 2019-05-08 14:22:06 -07:00
Brian Vaughn 8850a9a64a Merge branch '232-clear-profiling-data-for-unmounted-root' of https://github.com/sompylasar/react-devtools-experimental into sompylasar-232-clear-profiling-data-for-unmounted-root 2019-05-03 09:24:58 -07:00
Brian Vaughn 435e22ad1b Fixed deploy script 2019-05-03 08:55:31 -07:00
Dan Abramov b9ae9393b9 Use WebpackDevServer for local testing 2019-05-01 17:19:26 +01:00
Ivan Babak c6c71ef8f9 Fix profiling screenshots data structure to map rootID to commitIndex
Propagate `rootID` throughout the code for `captureScreenshot`.

Rename private profiling maps of `store` to make relations more clear.

Fix missing cleanup for screenshots data in `set importedProfilingData` of `store`.
2019-05-01 01:07:36 -07:00
Brian Vaughn 5204ae87bc Merge pull request #229 from sompylasar/217-workaround-disconnected-port-error
Fix for 'Attempting to use a disconnected port object'
2019-04-30 09:15:52 -07:00
Ivan Babak 1b5f043e01 Fix for 'Attempting to use a disconnected port object'
Fixes https://github.com/bvaughn/react-devtools-experimental/issues/217

The error reproduces with any two React websites, e.g. `https://reactjs.org` and `https://nextjs.org`, by keeping the DevTools Components tab open and switching between these websites in the same browser tab.

There are several issues with the code that contribute to this:
1. `Bridge` leaves behind a dangling timer that fires `_flush` after the bridge has been abandoned ("shutdown").
2. `bridge.send('shutdown')` is asynchronous, so the event handlers do not get unsubscribed in time.
3. `port.onDisconnect` does not trigger on in-tab navigation like new URL or back/forward navigation.
4. State management design of the code that uses shared variables and callbacks makes it hard to handle race conditions originating from the browser.

This commit cleans up some of the lacking symmetry when using `addListener`/`removeListener`, but the code in `shells/browser/shared/src/main.js` is hard to reason about with regards to race conditions, and there are many possible race conditions originating from the browser, so maybe there could be a better design paradigm (like a formal state machine) to manage the state changes in response to sequences of events than plain old event listeners, callbacks, and shared variables.

Unrelated, but clicking Chrome Back/Forward/Back/Forward very fast makes the browser and the DevTools and the DevTools of DevTools stall and become unresponsive for some time, then recovers but the Back/Forward/Stop/Refresh button and favicon loading indicator may remain broken. Looks like a Chrome bug, some kind of a temporary deadlock in handling the browser history.
2019-04-28 04:45:57 -07:00
Ivan Babak 0b817777b4 Remove Agent addBridge: there can only be one bridge, add in constructor
Let's make impossible states truly impossible, and fix Flow types, too.

All three usages of Agent called addBridge right after constructing it.
Agent has one field `_bridge` which is force-typed as not-null despite
there's a temporary zone between the constructor end and addBridge start
where `_bridge` is null.
2019-04-28 04:03:28 -07:00
Brian Vaughn ed6e34da8e Added option to disable screenshot capturing while profiling 2019-04-03 14:32:16 -07:00
Sriram Thiagarajan 3118dae375 fix import file name 2019-03-09 07:03:42 +05:30
Brian Vaughn 89df0a6363 Yarn upgrade 2019-02-24 18:32:29 -08:00
Brian Vaughn 15c5396169 Re-added "Settings" panel to browser extension and (hopefully) fixed a lot of sources of error 2019-02-14 11:45:11 -08:00
Brian Vaughn aed1713154 Added NOW config file for dev shell 2019-02-12 21:09:50 -05:00
Brian Vaughn d203ebf165 Added new tabs UI and theme/display-density preferences 2019-02-12 20:41:39 -05:00
Brian Vaughn e723ec82bc Added $r support 2019-02-05 13:19:08 +00:00
Brian Vaughn bdfaeede6d Fixed potential race cases in bridge/store/backend initialization 2019-01-31 14:27:16 -08:00
Brian Vaughn a60c8e139a Renamed app.js to App.js for consistency 2019-01-30 10:49:50 -08:00
Brian Vaughn fdfadef928 Refactored bridge to support transferrables (e.g. typed array buffers) and added transferable param to postMessage for op codes 2019-01-29 13:17:37 -08:00
Brian Vaughn b7cbd38214 Misc updates to better handle tearing and add some future TODOs 2019-01-27 07:58:09 -08:00
Brian Vaughn d57ec69561 Added initial Chrome/Firefox shells 2019-01-23 18:06:21 -08:00
Brian Vaughn f881c32304 Added Prettier (and formatted code) 2019-01-23 08:45:19 -08:00
Brian Vaughn 5e0dfdac54 Initial commit 2019-01-22 11:04:37 -08:00