Commit Graph

11 Commits

Author SHA1 Message Date
Wojciech Lewicki
416ccc8a86 fix: bump packages, eslint, tsconfig, prettier and resolve all conflicts (#2114)
PR bumping packages, eslint, tsconfig, prettier and resolving all conflicts connected to it.
2023-08-07 17:44:58 +02:00
Wojciech Lewicki
91f6bd1fa9 chore: bump Examples to 0.72 (#2084)
Bump Example and FabricExample to RN 0.72
2023-07-05 22:46:42 +02:00
Wojciech Lewicki
a917baf2ec fix: remove unnecessary methods provided by superclasses for accessibility (#2013)
PR removing methods that seem unnecessary for the accessibility props since they are provided by superclasses. It was necessary to update fabric updateProps method though, since we don't call super there. Also added proper type definitions and removed unnecessary casts.
2023-03-27 15:18:59 +02:00
Wojciech Lewicki
cb87e7510f feat: update FabricExample to 0.71.0-rc.6 (#1962)
PR bumping examples to RN 0.71. For now web Example seems not to load code properly.
2023-01-13 14:19:17 +01:00
dependabot[bot]
a21e47d3a1 chore(deps): bump json5 from 2.2.1 to 2.2.3 (#1955)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-04 16:25:45 +01:00
Wojciech Lewicki
1a2e8c74ed chore: update RN versions to 0.70.5 (#1910)
PR bumping example apps to RN 0.70.5 since previous version will cause CI to fail due to bug in RN.
2022-11-07 16:58:25 +01:00
Wojciech Lewicki
1126079425 feat: use codegenNativeComponent to import native views (#1847)
Changed `requireNativeComponent` to `codegenNativeComponent` so that upcoming changes (Static View Configs, Bridgeless Mode and idk what more) in `react-native` are available in the library. Also, types and native components are now taken directly from `fabric` folder to make sure the values passed to the native components are the ones defined in props. It should work on all supported versions since `codegenNativeComponent` function exists from RN v. 0.61.0. Suggested by @RSNara and @cipolleschi

Reason for [`5394bbb` (#1847)](5394bbbced): 
- on `Paper`, `Animated` uses `setNativeProps` method when we set `useNativeDriver`  to `false`, and does not rerender the component. Therefore, new transform lands only in `SvgView` and is parsed in `RCTViewManager.m` .
- on `Fabric`, the same code makes the components rerender. Due to this, information about new transform is passed to the `SvgView` child: `G` , making it apply translations from the transform in its `updateProps` method.
- other than `Animated` use-case, on both archs, if we just passed `transform` prop to `Svg` component, it would end up in double transformations now as well. All of those changes are due to https://github.com/software-mansion/react-native-svg/pull/1895, which added proper parsing of RN style `transform` prop (array of transformations objects) therefore making `G` properly handle `transform` prop passed from `Svg`.

Reason for [`19bcb24` (#1847)](19bcb2464b): Same as https://github.com/software-mansion/react-native-screens/pull/1624
2022-11-03 15:47:29 +01:00
Wojciech Lewicki
992cf19a68 chore: bump examples to rn 0.70 (#1858)
PR bumping Example and FabricExample apps to rn 0.70.
2022-09-06 15:32:00 +02:00
Wojciech Lewicki
0a26639532 chore: bump library and examples to rn 0.70-rc3 (#1837)
PR bumping library to RN 0.70-rc3, which might make it not compatible with earlier versions of RN on Fabric. It should come with the same change in other libraries.

In this PR, I had to remove macos code from Example since it breaks @react-native-community/cli resolution. Hopefully we can bring it back soon.
2022-08-17 14:24:50 +02:00
Wojciech Lewicki
77267be5fc feat: support Fabric on Android (#1804)
Most of Android changes for Fabric and bump of FabricExample to RN 0.69.2. iOS and JS changes are available in #1821.
The most notable change on Android is adding methods to components that accept String values of each NumberProp instead of Dynamic. Another change is changed structure of RenderableViewManager.java since we needed to abstract methods that belong only to components inheriting from VirtualView in order to be able to properly override them in their children.
2022-08-12 11:42:44 +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