Commit Graph

15 Commits

Author SHA1 Message Date
Jakub Grzywacz
b3b175a7fb feat: move examples to ./apps (#2507)
# Summary

Due to the large number of example apps in the repository, I decided to
change the structure and move all applications into an "apps" folder to
maintain a clear structure.
2024-10-25 16:12:23 +02:00
Jakub Grzywacz
3aebbb22fd chore: improve ci workflow (#2499)
# Summary
2024-10-23 10:02:46 +02:00
Bohdan Artiukhov
2b56bb4d03 chore: update iOS workflows (#2467)
# Summary

Update iOS workflows.
2024-10-03 08:30:17 +02:00
Bohdan Artiukhov
7c1602e291 feat: change folders structure (#2319)
# Summary
extract the shared example and use it in example and fabric-example, macos-example

## Test Plan

Run those apps manually.
2024-07-05 13:00:13 +02:00
Wojciech Lewicki
138c23ba10 feat: add needed changes for RN 0.74 (#2231)
PR bringing support for RN 0.74 and bridgeless mode to the library.
2024-03-05 12:52:09 +01:00
Wojciech Lewicki
615f0c68d1 Update ios-build-test.yml (#2207)
PR bumping github action for building iOS and macOS
2024-01-15 15:56:50 +01:00
Wojciech Lewicki
03ca039497 feat: add support for RN 73 (#2181)
PR bumping the library code to compile on new arch on RN 0.73.x and restoring the proper configuration of Image component on new arch on Android.

Also bumping the FabricExample to check if the code works correctly.
2023-12-01 11:58:49 +01:00
Wojciech Lewicki
1beacf1be2 feat: make pointer events work on both platforms (#1879)
PR adding proper handling of pointerEvents in the library. Based on the comment by @RSNara :

> For all Android components, static ViewConfigs are generated from the components types + BaseVIewConfig.android.js. The BaseViewConfig for all android components is facebook/react-native@c5217f1/Libraries/NativeComponent/BaseViewConfig.android.js#L288-L297, which doesn't contain the pointerEvents validAttribute. So, React Native SVG components must re-declare the pointerEvents validAttribute. Otherwise, the pointerEvents validAttribute won't be in the static ViewConfig, which means React won't pass that prop to native with Static ViewConfigs.

We needed a way to trick codegen since we added our own pointerEvents with string type, and such prop is already present in ViewProps from react-native, but as a union of strings, so their types did not match. As codegen parses string literals, we include changed ViewProps type, without pointerEvents prop, so we satisfy both codegen and TS.

As for how pointerEvents are handled now:

iOS:
Paper: prop is passed in RCTViewManager but it looks like it does not matter what you pass there, since even if you set none, resulting in view.userInteractionEnabled = NO; (facebook/react-native@065db68/React/Views/RCTViewManager.m#L256), custom implementation of hitTest will not take it into account anyhow.

Fabric: we don’t use pointerEvents prop but it is not a problem since it is not used in the implementation of neither SvgView and RCTViewComponentView (it is used in hitTest method there, but we override it)

Android:
Paper: the prop was passed through ReactViewManager and was set on the view directly. But the setter for pointerEvents is not visible outside of ReactViewGroup . After adding Fabric integration for both platforms: BaseViewManager does not implement setter for pointerEvents so we have to add the prop by ourselves. Still, we cannot call the setter from ReactViewGroup since it is not visible, so all the logic for pointerEvents should be migrated to SvgView unfortunately or we should use reflection to get that method.

Despite that, it seems that behavior differs on Android and iOS since setting pointerEvents to none on Android makes the view not clickable, whereas on iOS it does not change anything.
2022-09-30 14:24:34 +02:00
Wojciech Lewicki
e7395b41c0 feat: improve ios ci job (#1878)
PR based on software-mansion/react-native-reanimated#3448 which should improve the caches of iOS CI jobs resulting in smaller build time.

Co-authored-by: Tomek Zawadzki <tomekzawadzki98@gmail.com>
2022-09-22 12:51:09 +02:00
Wojciech Lewicki
8f1bda4856 feat: add Fabric on iOS without ComponentViews (#1821)
Version of #1754 without usage of ComponentViews. It seems like a more proper way, but introduces the necessity of clearing whole state of each component on recycling for it not to be used when view is recycled.

Still known problems:

We stringify props of type NumberProp since codegen only accepts props of a single type. It is the fastest way of dealing with it, but maybe there could be a better way to handle it.
Image resolving should be probably handled the same as in RN core
SvgView needs to set opaque = NO so it is does not have black background (it comes from the fact that RCTViewComponentView overrides backgroundColor setter which in turn somehow messes with the view being opaque). All other svg components do it already so maybe it is not such an issue.
transform prop won't work when set natively since it is not parsed in Fabric
2022-08-11 14:08:11 +02:00
Wojciech Lewicki
7a773654b1 feat: change ios CI (#1831)
Added improved iOS CI jobs
2022-08-10 11:54:21 +02:00
Wojciech Lewicki
cf808ae79d fix: change ci jobs to main (#1715)
PR changing CI jobs target to main branch since it was changed from develop.
2022-03-02 13:38:23 +01:00
Wojciech Lewicki
bcc9e1dd5f fix: add newlines at the end of files 2022-02-21 17:53:33 +01:00
Wojciech Lewicki
29fbc517b4 fix: change ios to apple 2022-02-21 17:49:07 +01:00
Wojciech Lewicki
eb5543b3e5 feat: add example build workflows 2022-02-21 16:33:40 +01:00