Skip to content

fix(fabric): cherry-pick some View related fixes - #2281

Merged
Saad Najmi (Saadnajmi) merged 3 commits into
microsoft:mainfrom
Saadnajmi:fabric/interop
Nov 15, 2024
Merged

fix(fabric): cherry-pick some View related fixes#2281
Saad Najmi (Saadnajmi) merged 3 commits into
microsoft:mainfrom
Saadnajmi:fabric/interop

Conversation

@Saadnajmi

Copy link
Copy Markdown
Collaborator

Summary:

This is part of a series of PRs where we are cherry-picking fixes from #2117 to update our Fabric implementation on macOS.

These particular fixes looked to be easy low hanging fruit.

Test Plan:

CI should pass

Nick Lefever added 2 commits November 14, 2024 21:03
…Component
Summary:
Hit testing in RN macOS uses the view coordinate space instead of the macOS superview coordinate space. The RCTView hitTest implementation gets called from Fabric when Paper components are loaded through the `LegacyViewManagerInteropComponent`.
When the Paper component has Fabric child components, the hitTest implementation would treat those as native macOS views.
This diff adds a selector check to detect Fabric RCTViewComponentView instances and apply the right point conversion. The selector check allows to have the right behavior without having to import Fabric classes in Paper code.
Test Plan:
- Run Workplace Chat with Fabric enabled
- Click on a thread title in the thread list
- With the fix, the thread gets selected
Reviewers: shawndempsey, ericroz, chpurrer, #rn-desktop
Reviewed By: shawndempsey, ericroz
Differential Revision: https://phabricator.intern.facebook.com/D49083593
Tasks: T163162857
Summary: This diff conditionally sets the CALayer masksToBounds based on the clipsToBounds RN property so that the content of the view would be clipped by the view border.
Test Plan:
- Run Zeratul with Fabric enabled
- Check that the profile pictures with no status indicator are clipped by the half size border radius set on the parent view.
| Before | After |
|--|
| {F1090251649} | {F1090249259} |
Reviewers: shawndempsey, chpurrer, #rn-desktop
Reviewed By: chpurrer
Differential Revision: https://phabricator.intern.facebook.com/D49239973
@Saadnajmi
Saad Najmi (Saadnajmi) requested a review from a team as a code ownerNovember 15, 2024 03:08
…er components
Summary: The tag value is stored in the `reactTag` property on macOS. The adapter used by the RCTLegacyViewManagerInteropComponentView was being provided the `tag` property value which set all interceptors to tag -1 leading to incorrect event dispatching on the JS side.
Test Plan:
- Open the settings pane in Zeratul and select the appearance tab.
- Toggle the theme PopUpButton
With the fix, the theme changes while before the zoom would change.
https://pxl.cl/3vZRd
Reviewers: shawndempsey, #rn-desktop
Reviewed By: shawndempsey
Differential Revision: https://phabricator.intern.facebook.com/D49897662
@SaadnajmiSaad Najmi (Saadnajmi) changed the title fix(fabric): cherry-pick fixes related to RCTView / RCTComponentView / RCTLegacyViewManagerInteropComponentViewfix(fabric): cherry-pick some view related fixesNov 15, 2024
@SaadnajmiSaad Najmi (Saadnajmi) changed the title fix(fabric): cherry-pick some view related fixesfix(fabric): cherry-pick some View related fixesNov 15, 2024
@Saadnajmi
Saad Najmi (Saadnajmi) merged commit 57fc114 into microsoft:mainNov 15, 2024
@Saadnajmi
Saad Najmi (Saadnajmi) deleted the fabric/interop branch November 15, 2024 22:54
Sign up for freeto 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.

2 participants

@Saadnajmi@JunielKatarn