Skip to content

Commit dfb8cb3

Browse files
RN77 new arch (#3721)
* Upgrade to react native 0.76.9 Some errors in native code that I did not want to commit fixes just yet docuilib has issues (hopefully will be solved in 0.77.2 * RN77 upgrade + new arch Android runs (still need to fix native) | iOS red screen | docuilib still has errors * Remove TextInputDelKeyHandlerPackage (Android) * KeyboardAccessoryView on Android - fix crash (one bug left) Pressing on dismiss (x) only fully works the second time * Pressing on dismiss (x) only fully works the second time - a very complex fix * Remove unused code * HighlighterViewManager - fix (use new API) * Fix gesture handler changed style * Fix images (unrelated) * Fix PanViewScreen (unrelated) * Fix dragging in SortableList and SortableGridList * Update navigation * Change iOS back to Objective-C * Fix screen - border color * Revert to older reanimated and gesture-handler versions * Drawer - fix animation flickering * Remove comment * StackAggregator - several fixes - see #3210 * Drawer - fix color not being shown with multiple buttons (RectButton bug) * Fix * Downgrading reanimated and gesture handler * Fix * Fix iOS (setimmediate) * remove UIManager.setLayoutAnimationEnabledExperimental * Update RNN * Fix snapshot * Fix TS * Fix TS * Fix snapshot * Native lib reorder and fix ios (#3750) * Native lib - reorganize components in folders for convenience + bump version to 5.0.0 * pointing to index * revert naming change * fix api files * rename HighlighterOverlay web * Moving sub components to the parent * fix api file and move KeyboardUtils outside folder * Revert "fix api file and move KeyboardUtils outside folder" This reverts commit ff64327. * fix api json * fix folder name to match component name * remove specs * fix highligther view native registration * fix for SafeAreaSpacerView * fix types * fix for KeyboardTrackingView * trying to fix failed CI build * SafeAreaSpacesView - moving to react implementation using native SafeAreaManager * manager changes * fix safe area * fix SafeAreaSpacerView again * removing logs * Fix highlightViewTag type * Fix TS error * Typescript fixes \ revert * Revert --------- Co-authored-by: Miki Leib <[email protected]> Co-authored-by: M-i-k-e-l <[email protected]> * KeyboardAwareBase - fix error * Fix menu - "native" tag should show all (and only) native components * Update uilib-native to snapshot * Fix tests * Update uilib-native to snapshot * Fix TS error and web type * Change from codegenNativeComponent to requireNativeComponent in order to fix error after transpilation (#3768) * Change from codegenNativeComponent to requireNativeComponent * Update snapshot * Revert, move to specs and publish the typescript vesion (#3769) * Another try * Do not transpile specs * Another one * Update snapshot * SafeAreaSpacerView - fix race condition and a small refactor (#3770) * SafeAreaSpacerView - fix race condition and a small refactor * Update snapshot * Remove extra backgroundColor --------- Co-authored-by: Inbal Tish <[email protected]> Co-authored-by: Inbal Tish <[email protected]>
1 parent 36c8753 commit dfb8cb3

File tree

90 files changed

+1698
-1351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+1698
-1351
lines changed

android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ buildscript {
66
minSdkVersion = 26
77
compileSdkVersion = 35
88
targetSdkVersion = 34
9-
ndkVersion = "26.1.10909125"
10-
RNNKotlinVersion = "1.9.25"
9+
ndkVersion = "27.1.12297006"
10+
kotlinVersion = "2.0.21"
1111
}
1212
repositories {
1313
mavenLocal()
@@ -19,7 +19,7 @@ buildscript {
1919
classpath("com.facebook.react:react-native-gradle-plugin")
2020
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
2121

22-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$RNNKotlinVersion"
22+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
2323
}
2424
}
2525

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
2828
# your application. You should enable this flag either if you want
2929
# to write custom TurboModules/Fabric components OR use libraries that
3030
# are providing them.
31-
newArchEnabled=false
31+
newArchEnabled=true
3232

3333
# Use this property to enable or disable the Hermes JS engine.
3434
# If set to false, you will be using JSC instead.

babel.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
module.exports = {
22
presets: ['module:@react-native/babel-preset'],
3+
env: {
4+
test: {
5+
presets: [
6+
[
7+
'module:@react-native/babel-preset',
8+
{
9+
disableStaticViewConfigsCodegen: true
10+
}
11+
]
12+
]
13+
}
14+
},
315
plugins: [
416
'react-native-reanimated/plugin',
517
[

demo/src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import {UIManager, I18nManager} from 'react-native';
1+
import {I18nManager} from 'react-native';
22
import {navigationData as menuStructure} from './screens/MenuStructure';
33
import {loadDemoConfigurations} from './configurations';
44

5-
UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true); // eslint-disable-line
65
I18nManager.allowRTL(true);
76

87
module.exports = {

demo/src/screens/MenuStructure.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const navigationData = {
8181
screens: [
8282
{title: 'Action Sheet', tags: 'action sheet cross-platform', screen: 'unicorn.components.ActionSheetScreen'},
8383
{title: 'Dialog', tags: 'dialog modal popup alert', screen: 'unicorn.components.DialogScreen'},
84-
{title: 'Feature Highlight', tags: 'feature overlay', screen: 'unicorn.components.FeatureHighlightScreen'},
84+
{title: 'Feature Highlight', tags: 'native feature overlay', screen: 'unicorn.components.FeatureHighlightScreen'},
8585
{title: 'Floating Button', tags: 'floating button', screen: 'unicorn.components.FloatingButtonScreen'},
8686
{title: 'Hint', tags: 'hints tooltip', screen: 'unicorn.components.HintsScreen'},
8787
{title: 'Toast', tags: 'toast top bottom snackbar', screen: 'unicorn.components.ToastsScreen'}
@@ -117,10 +117,10 @@ export const navigationData = {
117117
{title: 'LoadingScreen', tags: 'loading screen', screen: 'unicorn.screens.LoadingScreen'},
118118
{title: 'Modal', tags: 'modal topbar screen', screen: 'unicorn.screens.ModalScreen'},
119119
{title: 'StateScreen', tags: 'empty state screen', screen: 'unicorn.screens.EmptyStateScreen'},
120-
{title: 'TabController', tags: 'tabbar controller native', screen: 'unicorn.components.TabControllerScreen'},
120+
{title: 'TabController', tags: 'tabbar controller', screen: 'unicorn.components.TabControllerScreen'},
121121
{
122122
title: 'TabControllerWithStickyHeader',
123-
tags: 'tabbar controller native sticky header',
123+
tags: 'tabbar controller sticky header',
124124
screen: 'unicorn.components.TabControllerWithStickyHeaderScreen'
125125
},
126126
{title: 'Timeline', tags: 'timeline', screen: 'unicorn.components.TimelineScreen'},
@@ -148,28 +148,28 @@ export const navigationData = {
148148
screens: [
149149
{
150150
title: 'KeyboardAwareScrollView',
151-
tags: 'KeyboardAwareScrollView',
151+
tags: 'native KeyboardAwareScrollView',
152152
screen: 'unicorn.components.KeyboardAwareScrollViewScreen'
153153
},
154154
{
155155
title: 'Dynamic Fonts',
156-
tags: 'dynamic fonts load download',
156+
tags: 'native dynamic fonts load download',
157157
screen: 'unicorn.nativeComponents.DynamicFontsScreen'
158158
},
159159
{
160160
title: 'Highlight Overlay',
161-
tags: 'native overlay',
161+
tags: 'native native overlay',
162162
screen: 'unicorn.nativeComponents.HighlightOverlayViewScreen'
163163
},
164164
{title: 'SafeArea Spacer', tags: 'native safe area', screen: 'unicorn.nativeComponents.SafeAreaSpacerViewScreen'},
165165
{
166166
title: 'KeyboardTracking (iOS)',
167-
tags: 'KeyboardTracking',
167+
tags: 'native KeyboardTracking',
168168
screen: 'unicorn.nativeComponents.KeyboardTrackingViewScreen'
169169
},
170170
{
171171
title: 'KeyboardAccessoryView',
172-
tags: 'KeyboardInput',
172+
tags: 'native KeyboardInput',
173173
screen: 'unicorn.nativeComponents.KeyboardAccessoryViewScreen'
174174
}
175175
]
@@ -193,7 +193,7 @@ export const navigationData = {
193193
screens: [
194194
{title: 'Calendar', tags: 'calendar', screen: 'unicorn.components.IncubatorCalendarScreen'},
195195
{title: 'ChipsInput', tags: 'chips input', screen: 'unicorn.components.ChipsInputScreen'},
196-
{title: 'Native TouchableOpacity', tags: 'touchable native', screen: 'unicorn.incubator.TouchableOpacityScreen'},
196+
{title: 'Native TouchableOpacity', tags: 'native touchable', screen: 'unicorn.incubator.TouchableOpacityScreen'},
197197
{title: 'Toast (New)', tags: 'toast', screen: 'unicorn.components.IncubatorToastScreen'},
198198
{
199199
title: 'ExpandableOverlay',

demo/src/screens/__tests__/__snapshots__/TextFieldScreen.spec.js.snap

Lines changed: 96 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,16 +1522,38 @@ exports[`TextField Screen renders screen 1`] = `
15221522
numberOfLines={1}
15231523
onLayout={[Function]}
15241524
style={
1525-
{
1526-
"backgroundColor": "transparent",
1527-
"color": "#6E7881",
1528-
"fontFamily": "System",
1529-
"fontSize": 16,
1530-
"fontWeight": "400",
1531-
"lineHeight": 24,
1532-
"opacity": 0,
1533-
"writingDirection": "ltr",
1534-
}
1525+
[
1526+
{
1527+
"backgroundColor": "transparent",
1528+
"color": "#20303C",
1529+
"writingDirection": "ltr",
1530+
},
1531+
undefined,
1532+
{
1533+
"color": "#6E7881",
1534+
},
1535+
undefined,
1536+
undefined,
1537+
{},
1538+
undefined,
1539+
undefined,
1540+
undefined,
1541+
[
1542+
{},
1543+
[
1544+
{},
1545+
{
1546+
"fontFamily": "System",
1547+
"fontSize": 16,
1548+
"fontWeight": "400",
1549+
"lineHeight": 24,
1550+
},
1551+
],
1552+
{
1553+
"opacity": 0,
1554+
},
1555+
],
1556+
]
15351557
}
15361558
testID="undefined.floatingPlaceholder"
15371559
>
@@ -2118,16 +2140,38 @@ exports[`TextField Screen renders screen 1`] = `
21182140
numberOfLines={1}
21192141
onLayout={[Function]}
21202142
style={
2121-
{
2122-
"backgroundColor": "transparent",
2123-
"color": "#20303C",
2124-
"fontFamily": "System",
2125-
"fontSize": 16,
2126-
"fontWeight": "400",
2127-
"lineHeight": 24,
2128-
"opacity": 0,
2129-
"writingDirection": "ltr",
2130-
}
2143+
[
2144+
{
2145+
"backgroundColor": "transparent",
2146+
"color": "#20303C",
2147+
"writingDirection": "ltr",
2148+
},
2149+
undefined,
2150+
{
2151+
"color": "#20303C",
2152+
},
2153+
undefined,
2154+
undefined,
2155+
{},
2156+
undefined,
2157+
undefined,
2158+
undefined,
2159+
[
2160+
{},
2161+
[
2162+
{},
2163+
{
2164+
"fontFamily": "System",
2165+
"fontSize": 16,
2166+
"fontWeight": "400",
2167+
"lineHeight": 24,
2168+
},
2169+
],
2170+
{
2171+
"opacity": 0,
2172+
},
2173+
],
2174+
]
21312175
}
21322176
testID="undefined.floatingPlaceholder"
21332177
>
@@ -2433,16 +2477,38 @@ exports[`TextField Screen renders screen 1`] = `
24332477
numberOfLines={1}
24342478
onLayout={[Function]}
24352479
style={
2436-
{
2437-
"backgroundColor": "transparent",
2438-
"color": "#20303C",
2439-
"fontFamily": "System",
2440-
"fontSize": 16,
2441-
"fontWeight": "400",
2442-
"lineHeight": 24,
2443-
"opacity": 0,
2444-
"writingDirection": "ltr",
2445-
}
2480+
[
2481+
{
2482+
"backgroundColor": "transparent",
2483+
"color": "#20303C",
2484+
"writingDirection": "ltr",
2485+
},
2486+
undefined,
2487+
{
2488+
"color": "#20303C",
2489+
},
2490+
undefined,
2491+
undefined,
2492+
{},
2493+
undefined,
2494+
undefined,
2495+
undefined,
2496+
[
2497+
{},
2498+
[
2499+
{},
2500+
{
2501+
"fontFamily": "System",
2502+
"fontSize": 16,
2503+
"fontWeight": "400",
2504+
"lineHeight": 24,
2505+
},
2506+
],
2507+
{
2508+
"opacity": 0,
2509+
},
2510+
],
2511+
]
24462512
}
24472513
testID="undefined.floatingPlaceholder"
24482514
>

demo/src/screens/componentScreens/AnimatedImageScreen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import _ from 'lodash';
44
import {AnimatedImage, Colors} from 'react-native-ui-lib'; //eslint-disable-line
55

66
const SampleImages = [
7-
'https://static.pexels.com/photos/50721/pencils-crayons-colourful-rainbow-50721.jpeg',
8-
'https://static.pexels.com/photos/60628/flower-garden-blue-sky-hokkaido-japan-60628.jpeg'
7+
'https://images.pexels.com/photos/2529146/pexels-photo-2529146.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500',
8+
'https://images.pexels.com/photos/2529158/pexels-photo-2529158.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500'
99
];
1010

1111
export default class AnimatedImageScreen extends Component {

demo/src/screens/componentScreens/PanViewScreen.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, {Component} from 'react';
22
import {StyleSheet, ScrollView} from 'react-native';
3-
import {FlatList} from 'react-native-gesture-handler';
3+
import {FlatList, GestureHandlerRootView} from 'react-native-gesture-handler';
44
import {
55
Assets,
66
View,
@@ -146,7 +146,7 @@ class PanViewScreen extends Component {
146146
render() {
147147
const {showToast, showDialog} = this.state;
148148
return (
149-
<View style={styles.root}>
149+
<GestureHandlerRootView style={styles.root}>
150150
<View marginL-page height={50} centerV>
151151
<Text text50>New Pan View</Text>
152152
</View>
@@ -162,7 +162,7 @@ class PanViewScreen extends Component {
162162
</ScrollView>
163163
{showToast && this.renderToast()}
164164
{showDialog && this.renderDialog()}
165-
</View>
165+
</GestureHandlerRootView>
166166
);
167167
}
168168
}

demo/src/screens/componentScreens/SortableListScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export default SortableListScreen;
129129
const styles = StyleSheet.create({
130130
itemContainer: {
131131
height: 52,
132-
borderColor: Colors.$outlineDefault,
132+
borderBottomColor: Colors.$outlineDefault,
133133
borderBottomWidth: 1
134134
},
135135
selectedItemContainer: {

demo/src/screens/componentScreens/TabControllerScreen/tab3.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Tab2 extends Component {
6262
<Avatar
6363
size={50}
6464
source={{
65-
uri: 'https://static.pexels.com/photos/60628/flower-garden-blue-sky-hokkaido-japan-60628.jpeg'
65+
uri: 'https://images.pexels.com/photos/2529159/pexels-photo-2529159.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500'
6666
}}
6767
/>
6868
<Text text40 marginL-20>

0 commit comments

Comments
 (0)