Skip to content

Conversation

lenaic
Copy link

@lenaic lenaic commented Jan 25, 2023

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

Update the RCTSurfaceTouchHandler to support mouse events on macOS Fabric and convert them to touch events.

Changelog

[macOS] [Added] - Touch events for Fabric

Test Plan

[x] Build RNTester-macOS w/ Fabric
macos-fabric

[x] Click around RNTester-macOS w/ Fabric
https://user-images.githubusercontent.com/151054/214643298-c550a516-2710-40a1-8025-d4f5f9431bdb.mov

[x] Build RNTester - iOS w/ Fabric
ios-fabric

[x] Build RNTester-macOS w/ Paper
macos-paper

[x] Build RNTester - iOS w/ Paper
ios-paper

@lenaic lenaic requested a review from a team as a code owner January 25, 2023 17:55
@Saadnajmi Saadnajmi linked an issue Jan 25, 2023 that may be closed by this pull request
@lenaic
Copy link
Author

lenaic commented Jan 25, 2023

@microsoft-github-policy-service agree [company="Facebook"]

@lenaic
Copy link
Author

lenaic commented Jan 25, 2023

@microsoft-github-policy-service agree company="Facebook"

@Saadnajmi
Copy link
Collaborator

Could you take a look why the CI is falling @lenaic ?

@Saadnajmi Saadnajmi merged commit bbd5cfc into microsoft:main Jan 25, 2023
@lenaic lenaic deleted the fabric/surface-touch-handler branch January 26, 2023 00:26
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Feb 13, 2023
* Add support for z-index to RCTUIView

* Add z-index based hitTest implementation for macOS

* Add reactTag property to RCTComponentViewProtocol and RCTUIView for macOS

* Add macOS specific fields to Touch event

* Enable mouse event handling in RCTSurfaceTouchHandler

* [Fabric] Fix macOS tags

* Remove component view descriptor tag property

Co-authored-by: Nick <lefever@meta.com>
Co-authored-by: Shawn Dempsey <shawndempsey@fb.com>
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Mar 10, 2023
* Add support for z-index to RCTUIView

* Add z-index based hitTest implementation for macOS

* Add reactTag property to RCTComponentViewProtocol and RCTUIView for macOS

* Add macOS specific fields to Touch event

* Enable mouse event handling in RCTSurfaceTouchHandler

* [Fabric] Fix macOS tags

* Remove component view descriptor tag property

Co-authored-by: Nick <lefever@meta.com>
Co-authored-by: Shawn Dempsey <shawndempsey@fb.com>
# Conflicts:
#	React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
#	React/Fabric/RCTSurfaceTouchHandler.mm
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Mar 10, 2023
* Add support for z-index to RCTUIView

* Add z-index based hitTest implementation for macOS

* Add reactTag property to RCTComponentViewProtocol and RCTUIView for macOS

* Add macOS specific fields to Touch event

* Enable mouse event handling in RCTSurfaceTouchHandler

* [Fabric] Fix macOS tags

* Remove component view descriptor tag property

Co-authored-by: Nick <lefever@meta.com>
Co-authored-by: Shawn Dempsey <shawndempsey@fb.com>
# Conflicts:
#	React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
#	React/Fabric/RCTSurfaceTouchHandler.mm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RCTSurfaceTouchHandler

2 participants