react-native-macos/Libraries/Inspector
Rick Hanlon 21396bb380 Enable inspector for Fabric
Summary:
## Overview
This diff refactors the Inspector, moving logic to look up view data for a touched view inside the renderer as `getInspectorDataForViewAtPoint`. We then implement that same function for Fabric in order to support the inspector in that renderer.

Requires https://github.com/facebook/react/pull/18388

## Motivation

Reason one for this refactor is that, previously, the inspector held all of the logic to look up view data for a given x,y touch coordinate. To do this, it would take the React tag and coordinates, look up the native view tag, measure it, and then ask React internals for the Fiber information of that tag. All of this is deeply coupled to React internals, yet the logic is outside of React core in the Inspector.

Reason two is that, for Fabric, the logic for getting the view data is different than Paper. In Fabric, we pass the x,y coordinates to native directly, which returns an instance handle. That handle can be used to measure the ShadowNode, or retrieve the Fiber information.

By moving the logic into the renderer in React core, we decouple the implementation details of looking up view data for a tapped point and allow ourselves the ability to add and change renderer-specific code for the actual lookup without impacting outsiders like the Inspector.

Changelog: [Internal]

Reviewed By: TheSavior

Differential Revision: D20291710

fbshipit-source-id: a125223f2e44a6483120c41dc6146ad75a0e3e68
2020-03-30 14:05:27 -07:00
..
BorderBox.js xplat/js/react-native-github 2019-08-09 10:11:15 -07:00
BoxInspector.js xplat/js/react-native-github 2019-08-09 10:11:15 -07:00
ElementBox.js Exact-by-default codemod for react-native-github 2019-11-21 09:42:57 -08:00
ElementProperties.js Back out "Upgrade Prettier from 1.17 to 2.0.2." 2020-03-24 21:47:35 -07:00
Inspector.js Enable inspector for Fabric 2020-03-30 14:05:27 -07:00
InspectorOverlay.js Enable inspector for Fabric 2020-03-30 14:05:27 -07:00
InspectorPanel.js Back out "Upgrade Prettier from 1.17 to 2.0.2." 2020-03-24 21:47:35 -07:00
NetworkOverlay.js Back out "Upgrade Prettier from 1.17 to 2.0.2." 2020-03-24 21:47:35 -07:00
PerformanceOverlay.js Exact-by-default codemod for react-native-github 2019-11-21 09:42:57 -08:00
StyleInspector.js Back out "Upgrade Prettier from 1.17 to 2.0.2." 2020-03-24 21:47:35 -07:00
resolveBoxStyle.js add spec for I18nManager (#24908) 2019-05-31 19:56:37 -07:00