-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fabric] Clean up hit testing now that RCTUIView extends RCTPlatformView #1814
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A note: Someone recently pointed out to me that I'm their own custom native components, they need to make sure to flip the y coordinate (as we do in RCTView's hit test) because of macOS's inverted coordinate system. Do we need to do that here too?
RCTUIView overrides The effect of this is that components that were originally intended to run on macOS are built with the assumption that the Y-axis is not flipped and so axis flipping might be required to work with React Native. |
…iew (microsoft#1814) * Clean up surface touch handler now that RCTUIView extends RCTPlatformView. * Fix the iOS build. --------- Co-authored-by: Nick <[email protected]>
* [Fabric] Return active touch identifiers in surface touch handler on mouse up. (#1815) Co-authored-by: Nick <[email protected]> * [Fabric] Add mandatory color space conversion for macOS. (#1813) Co-authored-by: Nick <[email protected]> * [Fabric] Clean up hit testing now that RCTUIView extends RCTPlatformView (#1814) * Clean up surface touch handler now that RCTUIView extends RCTPlatformView. * Fix the iOS build. --------- Co-authored-by: Nick <[email protected]> * [Fabric] Use the layout metrics to get the scale factor in component views. (#1816) * Use the layout metrics to get the scale factor in component views. * Use layout metrics pointScaleFactor instead of RCTScreenScale on iOS. --------- Co-authored-by: Nick <[email protected]> * Fix RNTester content not resizing with window. (#1818) Co-authored-by: Nick <[email protected]> * Fix wrong text offset when a line height is set. (#1819) Co-authored-by: Nick <[email protected]> * [Fabric] Fix scroll views hiding content underneath them in Fabric. (#1820) * Fix scroll views hiding content underneath them in Fabric. * Clean up Paper scroll view after shim scroll view fix. --------- Co-authored-by: Nick <[email protected]> * [Fabric] Add support for image content mode and tint features (#1828) * Add RCTUIImageView to RCTUIKit to support iOS features on macOS. * Add support for tint and resize mode to Image on Fabric. * Clean up logging and add macOS tag. * Fix code style to match the style guide. --------- Co-authored-by: Nick <[email protected]> * [Fabric] Fix text input rendering crashing by using layout metrics pixelScaleFactor (#1817) * Use layout metrics to assign the active scale factor to RCTUITextField. * Use layout metrics to assign the active scale factor to RCTUITextView. --------- Co-authored-by: Nick <[email protected]> * [Fabric] Tint images using CIFilter fixing wrong tinted image size (#1843) * Tint images using CIFilter to fix wrong image size when enabling tinting. * Initialize the CIFilter input values with default values. --------- Co-authored-by: Nick <[email protected]> --------- Co-authored-by: Nick <[email protected]>
Please select one of the following
Summary
The RCTUIView extends RCTPlatformView now which allows to remove the macOS specific hit testing logic that was added for the implementation of the RCTSurfaceTouchHandler in fabric.
The only macOS specific part that is still required is the implementation of a
- (RCTPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
method to support the iOS-style hit test calls coming from the betterHitTest implementation.
Changelog
[macOS] [REMOVED] - Removed custom hit test implementation used for macOS fabric
Test Plan
Tested by running RNTester on macOS with fabric (
RCT_NEW_ARCH_ENABLED=1
) and clicking around the app to check that hit testing works as expected.Screen.Recording.2023-05-04.at.16.26.33.mov