Tim Yung and Facebook GitHub Bot
494c47360f
RN: Sort Imports via ESLint
...
Summary:
Applies the autofix from the newly introduced `lint/sort-imports` ESLint rule.
Changelog:
[Internal]
Reviewed By: cortinico, skinsshark
Differential Revision: D39907798
fbshipit-source-id: 17f5f11b08a5b4bb66286816b78eb26e07e829b8
2022-09-30 14:28:48 -07:00
Eric Edouard and Facebook GitHub Bot
8993ffc82e
Added border curve style prop ("Squircle" effect - iOS only) ( #33783 )
...
Summary:
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
NOTE: PR is based on https://github.com/facebook/react-native/pull/32017 which went stale for quite a long time but can now safely be closed

Since iOS 13+, it is possible to change the corner curve property on iOS in order to smoothen border radius and make it more "rounded" (also called "squircle")
Here's an [article](https://medium.com/arthurofbabylon/a-smooth-corner-radius-in-ios-54b80aa2d372 ) explaining in details what it is.
This property is also built in figma, but currently there is no way to implement this directly with react-native despite it being available natively on iOS.
Many open source react-native libraries were created in order to simulate this behaviour:
[react-native-super-ellipse-mask](https://github.com/everdrone/react-native-super-ellipse-mask )
[react-native-squircle-view](https://github.com/everdrone/react-native-squircle-view )
[react-native-figma-squircle](https://github.com/tienphaw/react-native-figma-squircle )
But they rely on creating an SVG shape with the smoothed corners and masking the view behind. This makes it not very performant (flickering on mounting was a common side-effect)
This PR aims at implementing the property natively.
PR for the docs update: https://github.com/facebook/react-native-website/pull/2785
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[iOS] [Added] - Added `borderCurve` style prop for smooth border radius (squircle effect)
Pull Request resolved: https://github.com/facebook/react-native/pull/33783
Test Plan:
We used the RNTester app and added an example with `cornerCurve ` set to `'continuous'` (only on iOS).
As the difference is quite subtle, we also made some more tests to better illustrate the difference (these are not in the RN-tester app):

We overlapped two views with `position: absolute`, the one in the background has a red background and has `cornerRadius` set to `false`, and the one in the foreground is set to `true`. We can clearly see where the borders differs on the corners.
Reviewed By: sammy-SC
Differential Revision: D37883631
Pulled By: cipolleschi
fbshipit-source-id: 09f06de9628fa326323eba63875de30102c4a59e
2022-07-21 04:11:30 -07:00
Luna Wei and Facebook GitHub Bot
8be49e8746
PointerEvents: Remove '2' suffix
...
Summary: Changelog: [Internal] - We can now remove the '2' suffix as we had an internal implementation that was not truly aligned with W3C pointers but used the same name. We have aligned the internal types to match w3c so we can now remove the suffix that differentiates them.
Reviewed By: vincentriemer
Differential Revision: D37545813
fbshipit-source-id: 6f2336ae9e314066c340161113268c1f28621a71
2022-07-05 20:00:42 -07:00
Vincent Riemer and Facebook GitHub Bot
21a4c1f6d6
Add dispatch of pointerover/pointerout events
...
Summary: Changelog: [iOS][Internal] - Add dispatching of pointerover/pointerout events
Reviewed By: lunaleaps
Differential Revision: D36718156
fbshipit-source-id: c2fee2332ac52e617db938e321e3b38fd5c35ad3
2022-06-07 16:08:50 -07:00
Vincent Riemer and Facebook GitHub Bot
a40747e2d8
Add experimental disclaimers to pointer event APIs
...
Summary: Changelog: [Internal] - Add experimental disclaimers to pointer event APIs
Reviewed By: lunaleaps, p-sun
Differential Revision: D35682318
fbshipit-source-id: e85a37a2eb9568df636352e170bd42a3bb30a2f6
2022-04-18 15:47:55 -07:00
Paige Sun and Facebook GitHub Bot
033ad83b29
Refactor the JS base StaticViewConfig to be easier to understand
...
Summary:
Changelog: [Internal][SVC][JS] Refactor the JS base SVC StaticViewConfig to be easier to understand
This diff is a refactor that doesn't change any logic.
# Context
NativeViewConfigs are generated from RCTViewManager in iOS and ViewManager in Android.
StaticViewConfigs are partially generated from JS, and partially handwritten in JS.
We've noticed in at least 2 instances that engineers who add new props to NativeViewConfigs sometimes don't put props in the correct place for StaticViewConfigs, and thus they accidentally break the landblocking jest e2e test that validates the StaticViewConfigs matches the NativeViewConfigs.
The human error is mostly because PlatformBaseViewConfig.js was too nested to be easily understood. This diff refactors PlatformBaseViewConfig.js and adds clarifying comments.
Reviewed By: RSNara
Differential Revision: D35623775
fbshipit-source-id: 498a3daa812fa314821a2e7cb7d6f809900dbe3a
2022-04-14 10:34:55 -07:00