Commit Graph

3 Commits

Author SHA1 Message Date
wusuopu 97741af8b9 Fix warnings of StyleInspector
Summary:
Fix issue #5831
Closes https://github.com/facebook/react-native/pull/5832

Reviewed By: svcscm

Differential Revision: D2917760

Pulled By: vjeux

fb-gh-sync-id: 3808d14075b259dd21056a7111205edae1e3eb48
shipit-source-id: 3808d14075b259dd21056a7111205edae1e3eb48
2016-02-10 08:40:39 -08:00
wusuopu 97b8a57bdb Fix inspector for displaying styles' value
Summary:
StyleInspector will occur a error if a style's value is an object, such as transform. Now it converts the value to string before display.

fix issue #5774 .

Now it can display okay.

![simulator screen shot feb 6 2016 12 32 24 am](https://cloud.githubusercontent.com/assets/1478284/12852296/36736966-cc69-11e5-8f28-9e4681585bcb.png)
Closes https://github.com/facebook/react-native/pull/5777

Reviewed By: svcscm

Differential Revision: D2908135

Pulled By: nicklockwood

fb-gh-sync-id: 5914f9e9538f90ae9a38ef7d8dc85b2df84ec43e
2016-02-05 16:30:39 -08:00
Jared Forsyth 51e76fd166 [ReactNative] refactor the inspector
Summary:
The `InspectorOverlay` component was getting unwieldy, so I broke it into three components:

- Inspector
- InspectorOverlay
- InspectorPanel

and added @flow types.

The inspector was also living under the `ReactIOS` directory, and I moved it
up into the `Libraries` directory, as the inspector will soon be usable [on
Android](https://phabricator.fb.com/D2138319).

All features of the inspector should remain functional, with the addition of
one feature:

- you can toggle "touch to inspect" by tapping the "Inspect" button at the
  bottom of the inspection panel. When inspection is disabled, the panel remains, but you can interact with
  the app normally without touches being intercepted

@public

Test Plan:
Open the inspector:

- touch to inspect things, verify that margin, padding, size and position are
  reported correctly, and that the component hierarchy is navigable.
- tap the "Inspect" button, and verify that you can interact with the app
  normally.

{F22548949}

[Video of toggling inspection](https://www.latest.facebook.com/pxlcld/mrs9)
2015-06-12 14:04:28 -07:00