Commit Graph

20 Commits

Author SHA1 Message Date
Alex Kotliarskyi
cfa4b13472 [ReactNative] Element Inspector
Summary:
This adds new development feature to React Native that provides information
about selected element (see the demo in Test Plan).

This is how it works:

App's root component is rendered to a container that also has a hidden layer called
`<InspectorOverlay/>`. When activated, it shows full screen view and captures all
touches. On every touch we ask UIManager to find a view for given {x,y} coordinates.

Then, we use React's internals to find corresponding React component. `setRootInstance`
is used to remember the top level component to start search from, lmk if you have a
better idea how to do this. Given a component, we can climb up its owners tree
to provice more context on how/where the component is used.

In future we could use the `hierarchy` array to inspect and print their props/state.

Known bugs and limitations:
* InspectorOverlay sometimes receives touches with incorrect coordinates (wtf)
* Not integrated with React Chrome Devtools (maybe in followup diffs)
* Doesn't work with popovers (maybe put the element inspector into an `<Overlay/>`?)

@public

Test Plan:
https://www.facebook.com/pxlcld/mn5k
Works nicely with scrollviews
2015-05-26 11:19:49 -08:00
Tadeu Zagallo
08844e3ddc [ReactNative] Add fps monitor
Summary:
@public

Add basic JS and UI thread FPS monitor

Test Plan: Launch the UIExplorer, open the Dev Menu with cmd+D, and select `Show FPS Monitor`
2015-05-20 18:26:36 -08:00
Harrison Harnisch
babdc21614 WebSocket polyfill
Summary:
- Added as a library in /Libraries/WebSocket
- Drag and drop to add to project (similar to adding Geolocation polyfill)
- Exposed as `window.WebSocket` which conforms with https://developer.mozilla.org/en-US/docs/Web/API/WebSocket specs
Closes https://github.com/facebook/react-native/pull/890
Github Author: Harrison Harnisch <hharnisc@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-14 09:37:02 -08:00
Tadeu Zagallo
d230629e61 [ReactNative] Add test to check RootContentView and BatchedBridge are deallocated 2015-05-13 13:24:36 -07:00
Nick Lockwood
205c22b915 Fixed dev menu loop 2015-05-07 03:55:43 -08:00
Nick Lockwood
790cee6e26 Fixed broken listview header alignment 2015-05-06 10:48:24 -08:00
Nick Lockwood
54974d6333 +[RCTConvert UIFont:] tests 2015-05-05 17:37:59 -08:00
Tadeu Zagallo
3ab4d32538 [ReactNative] Fix DevMenu crash when launching the app with WebView executor 2015-05-05 07:30:55 -08:00
Tadeu Zagallo
132a9170f1 [ReactNative] Create private underlying bridge to prevent retain cycles 2015-05-04 10:36:20 -08:00
Nick Lockwood
c5a6ec5b53 Disable React Native dev menu in release mode 2015-05-03 15:57:26 -08:00
Nick Lockwood
ba501a1bf5 Upgraded dev menu 2015-05-01 06:36:49 -08:00
Nick Lockwood
eb0476074f Improved debug and fixed macros 2015-04-30 09:59:16 -08:00
Tadeu Zagallo
fb1fa12e89 [ReactNative] Better profiling API + Fix overlaping events 2015-04-20 04:57:28 -08:00
Nick Lockwood
0b21df4a34 Improved logging and dev menu 2015-04-19 12:56:22 -08:00
Tadeu Zagallo
1883ba535c [ReactNative] Send batched calls from objc to js every frame + add bridge profiling 2015-04-17 04:01:02 -08:00
Nick Lockwood
26fd24dc50 Cleanup 2015-04-11 14:19:49 -08:00
Nick Lockwood
bf4868edda Added non-class-scanning-based approach fror registering js methods 2015-04-08 05:45:20 -08:00
Tadeu Zagallo
72390239be [ReactNative] Fix and re-add WebView executor 2015-04-07 18:25:38 -08:00
Tadeu Zagallo
f370f9cbc4 [ReactNative] Unfork RKRootView 2015-04-02 07:12:42 -08:00
Tadeu Zagallo
20291a02df [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00