react-native/React/Modules
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
..
RCTAlertManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTAlertManager.m [ReactNative] Add prompt to AlertIOS 2015-05-13 13:24:36 -07:00
RCTAppState.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTAppState.m Observing "MemoryWarningNotification" and proxying it up to the DeviceEventEmitter 2015-05-22 13:09:56 -08:00
RCTAsyncLocalStorage.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTAsyncLocalStorage.m Implemented thread control for exported methods 2015-04-18 11:13:39 -08:00
RCTExceptionsManager.h [ReactNative] differentiate fatal and soft exceptions 2015-05-13 13:24:37 -07:00
RCTExceptionsManager.m [ReactNative] differentiate fatal and soft exceptions 2015-05-13 13:24:37 -07:00
RCTSourceCode.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTSourceCode.m [ReactNative] Allow JS know its URL 2015-04-20 14:20:36 -08:00
RCTStatusBarManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTStatusBarManager.m Changed default method queue to a background queue. 2015-04-20 12:02:04 -08:00
RCTTiming.h [ReactNative] Use a single DisplayLink held by the bridge 2015-04-15 07:07:48 -08:00
RCTTiming.m [ReactNative] Create private underlying bridge to prevent retain cycles 2015-05-04 10:36:20 -08:00
RCTUIManager.h Fixed root view background color propagation 2015-05-26 04:18:55 -08:00
RCTUIManager.m [ReactNative] Element Inspector 2015-05-26 11:19:49 -08:00