Please sign in to comment.
Improve touchable debugging
Summary:Set `Touchable.TOUCH_TARGET_DEBUG` to see colored borders/text to all touchables. Different touchable types are color-coded differently. If there is `hitSlop`, it will be rendered with an extra view with a dashed border of the same color (not visible on Android because `overflow: 'hidden'`). `Text` with `onPress` directly set is just colored. Added some extra checks to `TouchableWithoutFeedback` since it could silently break if the child is not a native component. Also added better error output for `ensureComponentIsNative` so it's easier to track down issues. I really wish there was a cleaner way to get the component and owner names consistently, it would help make good debug messages way easier to write. Reviewed By: ericvicenti Differential Revision: D3149865 fb-gh-sync-id: 602fc3474ae7636e32af529eb7ac52ac5b858030 fbshipit-source-id: 602fc3474ae7636e32af529eb7ac52ac5b858030
- Loading branch information...
Showing with 106 additions and 22 deletions.
- +50 −6 Libraries/Components/Touchable/Touchable.js
- +1 −0 Libraries/Components/Touchable/TouchableBounce.js
- +1 −0 Libraries/Components/Touchable/TouchableHighlight.js
- +10 −2 Libraries/Components/Touchable/TouchableNativeFeedback.android.js
- +1 −0 Libraries/Components/Touchable/TouchableOpacity.js
- +31 −12 Libraries/Components/Touchable/TouchableWithoutFeedback.js
- +5 −0 Libraries/Inspector/InspectorPanel.js
- +7 −2 Libraries/Text/Text.js