Skip to content

Commit af455dd

Browse files
authored
Merge pull request #338 from powersync-ja/chore/demo-improvements
Demo improvements
2 parents 2b0466f + 42df8f7 commit af455dd

File tree

16 files changed

+271
-113
lines changed

16 files changed

+271
-113
lines changed

demos/react-native-supabase-todolist/android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3838
# your application. You should enable this flag either if you want
3939
# to write custom TurboModules/Fabric components OR use libraries that
4040
# are providing them.
41-
newArchEnabled=false
41+
newArchEnabled=true
4242

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

demos/react-native-supabase-todolist/app.config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ const config: ExpoConfig = {
5959
{
6060
ios: {
6161
deploymentTarget: '13.4',
62-
newArchEnabled: false
62+
newArchEnabled: true
6363
},
6464
android: {
6565
minSdkVersion: 23,
6666
compileSdkVersion: 34,
6767
targetSdkVersion: 34,
6868
buildToolsVersion: '34.0.0',
69-
newArchEnabled: false
69+
newArchEnabled: true
7070
}
7171
}
7272
],

demos/react-native-supabase-todolist/app/index.tsx

+11-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ import { useSystem } from '../library/powersync/system';
55
import { router } from 'expo-router';
66
import Logger from 'js-logger';
77

8+
import { ThemeProvider, createTheme } from '@rneui/themed';
9+
10+
const theme = createTheme({
11+
mode: 'light'
12+
});
13+
814
/**
915
* This is the entry point when the app loads.
1016
* Checks for a Supabase session.
@@ -32,9 +38,11 @@ const App: React.FC = () => {
3238
}, []);
3339

3440
return (
35-
<View key={`loader`} style={{ flex: 1, flexGrow: 1, alignContent: 'center', justifyContent: 'center' }}>
36-
<ActivityIndicator />
37-
</View>
41+
<ThemeProvider theme={theme}>
42+
<View key={`loader`} style={{ flex: 1, flexGrow: 1, alignContent: 'center', justifyContent: 'center' }}>
43+
<ActivityIndicator />
44+
</View>
45+
</ThemeProvider>
3846
);
3947
};
4048

demos/react-native-supabase-todolist/app/register.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { router } from 'expo-router';
66
import { useSystem } from '../library/powersync/system';
77
import { TextInputWidget } from '../library/widgets/TextInputWidget';
88
import { SignInStyles } from './signin';
9-
import { Icon } from 'react-native-elements';
9+
import { Icon } from '@rneui/themed';
1010

1111
export default function Register() {
1212
const { supabaseConnector } = useSystem();

demos/react-native-supabase-todolist/app/signin.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { router } from 'expo-router';
55
import { useSystem } from '../library/powersync/system';
66
import { Button } from 'react-native';
77
import { TextInputWidget } from '../library/widgets/TextInputWidget';
8-
import { Icon } from 'react-native-elements';
8+
import { Icon } from '@rneui/themed';
99

1010
export default function Signin() {
1111
const { supabaseConnector } = useSystem();

demos/react-native-supabase-todolist/app/views/todos/edit/[id].tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { CameraCapturedPicture } from 'expo-camera';
44
import _ from 'lodash';
55
import * as React from 'react';
66
import { StatusBar } from 'expo-status-bar';
7-
import { ScrollView, View, Text } from 'react-native';
8-
import { FAB } from 'react-native-elements';
7+
import { ScrollView, View } from 'react-native';
8+
import { FAB, Text } from '@rneui/themed';
99
import { Stack, useLocalSearchParams } from 'expo-router';
1010
import prompt from 'react-native-prompt-android';
1111
import { TODO_TABLE, TodoRecord, LIST_TABLE } from '../../../../library/powersync/AppSchema';
@@ -136,6 +136,7 @@ const TodoView: React.FC = () => {
136136
<FAB
137137
style={{ zIndex: 99, bottom: 0 }}
138138
icon={{ name: 'add', color: 'white' }}
139+
color="#aa00ff"
139140
size="small"
140141
placement="right"
141142
onPress={() => {

demos/react-native-supabase-todolist/app/views/todos/lists.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { StatusBar } from 'expo-status-bar';
33
import { ScrollView, View } from 'react-native';
4-
import { FAB, Text } from 'react-native-elements';
4+
import { FAB, Text } from '@rneui/themed';
55
import prompt from 'react-native-prompt-android';
66

77
import { router, Stack } from 'expo-router';
@@ -61,6 +61,7 @@ const ListsViewWidget: React.FC = () => {
6161
<FAB
6262
style={{ zIndex: 99, bottom: 0 }}
6363
icon={{ name: 'add', color: 'white' }}
64+
color="#aa00ff"
6465
size="small"
6566
placement="right"
6667
onPress={() => {

demos/react-native-supabase-todolist/ios/Podfile.lock

+76-14
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,71 @@ PODS:
10301030
- ReactCommon/turbomodule/core
10311031
- Yoga
10321032
- react-native-safe-area-context (4.10.5):
1033+
- DoubleConversion
1034+
- glog
1035+
- hermes-engine
1036+
- RCT-Folly (= 2024.01.01.00)
1037+
- RCTRequired
1038+
- RCTTypeSafety
1039+
- React-Codegen
1040+
- React-Core
1041+
- React-debug
1042+
- React-Fabric
1043+
- React-featureflags
1044+
- React-graphics
1045+
- React-ImageManager
1046+
- react-native-safe-area-context/common (= 4.10.5)
1047+
- react-native-safe-area-context/fabric (= 4.10.5)
1048+
- React-NativeModulesApple
1049+
- React-RCTFabric
1050+
- React-rendererdebug
1051+
- React-utils
1052+
- ReactCommon/turbomodule/bridging
1053+
- ReactCommon/turbomodule/core
1054+
- Yoga
1055+
- react-native-safe-area-context/common (4.10.5):
1056+
- DoubleConversion
1057+
- glog
1058+
- hermes-engine
1059+
- RCT-Folly (= 2024.01.01.00)
1060+
- RCTRequired
1061+
- RCTTypeSafety
1062+
- React-Codegen
1063+
- React-Core
1064+
- React-debug
1065+
- React-Fabric
1066+
- React-featureflags
1067+
- React-graphics
1068+
- React-ImageManager
1069+
- React-NativeModulesApple
1070+
- React-RCTFabric
1071+
- React-rendererdebug
1072+
- React-utils
1073+
- ReactCommon/turbomodule/bridging
1074+
- ReactCommon/turbomodule/core
1075+
- Yoga
1076+
- react-native-safe-area-context/fabric (4.10.5):
1077+
- DoubleConversion
1078+
- glog
1079+
- hermes-engine
1080+
- RCT-Folly (= 2024.01.01.00)
1081+
- RCTRequired
1082+
- RCTTypeSafety
1083+
- React-Codegen
10331084
- React-Core
1085+
- React-debug
1086+
- React-Fabric
1087+
- React-featureflags
1088+
- React-graphics
1089+
- React-ImageManager
1090+
- react-native-safe-area-context/common
1091+
- React-NativeModulesApple
1092+
- React-RCTFabric
1093+
- React-rendererdebug
1094+
- React-utils
1095+
- ReactCommon/turbomodule/bridging
1096+
- ReactCommon/turbomodule/core
1097+
- Yoga
10341098
- React-nativeconfig (0.74.5)
10351099
- React-NativeModulesApple (0.74.5):
10361100
- glog
@@ -1325,8 +1389,9 @@ PODS:
13251389
- React-utils
13261390
- ReactCommon/turbomodule/bridging
13271391
- ReactCommon/turbomodule/core
1392+
- RNScreens/common (= 3.31.1)
13281393
- Yoga
1329-
- RNVectorIcons (10.2.0):
1394+
- RNScreens/common (3.31.1):
13301395
- DoubleConversion
13311396
- glog
13321397
- hermes-engine
@@ -1342,6 +1407,7 @@ PODS:
13421407
- React-ImageManager
13431408
- React-NativeModulesApple
13441409
- React-RCTFabric
1410+
- React-RCTImage
13451411
- React-rendererdebug
13461412
- React-utils
13471413
- ReactCommon/turbomodule/bridging
@@ -1430,7 +1496,6 @@ DEPENDENCIES:
14301496
- RNGestureHandler (from `../../../node_modules/react-native-gesture-handler`)
14311497
- RNReanimated (from `../../../node_modules/react-native-reanimated`)
14321498
- RNScreens (from `../../../node_modules/react-native-screens`)
1433-
- RNVectorIcons (from `../../../node_modules/react-native-vector-icons`)
14341499
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
14351500

14361501
SPEC REPOS:
@@ -1585,8 +1650,6 @@ EXTERNAL SOURCES:
15851650
:path: "../../../node_modules/react-native-reanimated"
15861651
RNScreens:
15871652
:path: "../../../node_modules/react-native-screens"
1588-
RNVectorIcons:
1589-
:path: "../../../node_modules/react-native-vector-icons"
15901653
Yoga:
15911654
:path: "../node_modules/react-native/ReactCommon/yoga"
15921655

@@ -1602,9 +1665,9 @@ SPEC CHECKSUMS:
16021665
ExpoFont: 00756e6c796d8f7ee8d211e29c8b619e75cbf238
16031666
ExpoHead: fcb28a68ed4ba28f177394d2dfb8a0a8824cd103
16041667
ExpoKeepAwake: 3b8815d9dd1d419ee474df004021c69fdd316d08
1605-
ExpoModulesCore: 0e7d4d5c13169bbbd53496721d811adbcc5d600a
1668+
ExpoModulesCore: 260ee156852434da26e782bbb993093186c5aade
16061669
ExpoSecureStore: 060cebcb956b80ddae09821610ac1aa9e1ac74cd
1607-
EXSplashScreen: 17a656c08a0095be15b620c52e61dfdb665863d2
1670+
EXSplashScreen: 10b116117c9bb6a272ba782706f21dadc23f44d9
16081671
FBLazyVector: ac12dc084d1c8ec4cc4d7b3cf1b0ebda6dab85af
16091672
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
16101673
glog: fdfdfe5479092de0c4bdbebedd9056951f092c4f
@@ -1635,16 +1698,16 @@ SPEC CHECKSUMS:
16351698
React-logger: 257858bd55f3a4e1bc0cf07ddc8fb9faba6f8c7c
16361699
React-Mapbuffer: 6c1cacdbf40b531f549eba249e531a7d0bfd8e7f
16371700
react-native-encrypted-storage: db300a3f2f0aba1e818417c1c0a6be549038deb7
1638-
react-native-quick-sqlite: 9244f46798e83dd5526a5bcc303b5fceaea4c8e4
1639-
react-native-safe-area-context: a240ad4b683349e48b1d51fed1611138d1bdad97
1701+
react-native-quick-sqlite: 32a5687a042a40f9c820605fe4dc06dfa3bd31e9
1702+
react-native-safe-area-context: afa5d614d6b1b73b743c9261985876606560d128
16401703
React-nativeconfig: ba9a2e54e2f0882cf7882698825052793ed4c851
16411704
React-NativeModulesApple: 8d11ff8955181540585c944cf48e9e7236952697
16421705
React-perflogger: ed4e0c65781521e0424f2e5e40b40cc7879d737e
16431706
React-RCTActionSheet: 49d53ff03bb5688ca4606c55859053a0cd129ea5
16441707
React-RCTAnimation: 07b4923885c52c397c4ec103924bf6e53b42c73e
1645-
React-RCTAppDelegate: 316e295076734baf9bdf1bfac7d92ab647aed930
1708+
React-RCTAppDelegate: fc766c91b215650b9dd0dc7e19cb846165662d9f
16461709
React-RCTBlob: 85c57b0d5e667ff8a472163ba3af0628171a64bb
1647-
React-RCTFabric: 97c1465ded4dc92841f5376a39e43e1b2c455f40
1710+
React-RCTFabric: 7058f9ea5584364af58ba384312c7c3880631d28
16481711
React-RCTImage: b965c85bec820e2a9c154b1fb00a2ecdd59a9c92
16491712
React-RCTLinking: 75f04a5f27c26c4e73a39c50df470820d219df79
16501713
React-RCTNetwork: c1a9143f4d5778efc92da40d83969d03912ccc24
@@ -1661,10 +1724,9 @@ SPEC CHECKSUMS:
16611724
React-utils: f242eb7e7889419d979ca0e1c02ccc0ea6e43b29
16621725
ReactCommon: f7da14a8827b72704169a48c929bcde802698361
16631726
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
1664-
RNGestureHandler: 2282cfbcf86c360d29f44ace393203afd5c6cff7
1665-
RNReanimated: 35f9ac9c3ac42d0497ebd1cce5c39d7687a8493e
1666-
RNScreens: b32a9ff15bea7fcdbe5dff6477bc503f792b1208
1667-
RNVectorIcons: 845eda5c7819bd29699cafd0fc98c9d4afe28c96
1727+
RNGestureHandler: 156548e18203327173a764c6932a3f52e90cb9cd
1728+
RNReanimated: 58a768c2c17a5589ef732fa6bd8d7ed0eb6df1c1
1729+
RNScreens: 63fe8222c172a79f5c30dd1aefaeb369c6eb57b6
16681730
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
16691731
Yoga: 950bbfd7e6f04790fdb51149ed51df41f329fcc8
16701732
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5

demos/react-native-supabase-todolist/ios/Podfile.properties.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"expo.jsEngine": "hermes",
33
"EX_DEV_CLIENT_NETWORK_INSPECTOR": "true",
44
"ios.deploymentTarget": "13.4",
5-
"newArchEnabled": "false",
5+
"newArchEnabled": "true",
66
"apple.extraPods": "[]",
77
"apple.ccacheEnabled": "false",
88
"apple.privacyManifestAggregationEnabled": "true"

demos/react-native-supabase-todolist/ios/powersyncexample.xcodeproj/project.pbxproj

-38
Original file line numberDiff line numberDiff line change
@@ -296,51 +296,13 @@
296296
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
297297
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/ExpoConstants_privacy.bundle",
298298
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle",
299-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf",
300-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf",
301-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf",
302-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/Feather.ttf",
303-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf",
304-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf",
305-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf",
306-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf",
307-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/FontAwesome6_Brands.ttf",
308-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/FontAwesome6_Regular.ttf",
309-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/FontAwesome6_Solid.ttf",
310-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf",
311-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf",
312-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf",
313-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf",
314-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf",
315-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf",
316-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf",
317-
"${PODS_ROOT}/../../../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf",
318299
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
319300
);
320301
name = "[CP] Copy Pods Resources";
321302
outputPaths = (
322303
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
323304
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoConstants_privacy.bundle",
324305
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle",
325-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf",
326-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf",
327-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf",
328-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf",
329-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf",
330-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf",
331-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf",
332-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf",
333-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome6_Brands.ttf",
334-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome6_Regular.ttf",
335-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome6_Solid.ttf",
336-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf",
337-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf",
338-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf",
339-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf",
340-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf",
341-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf",
342-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf",
343-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf",
344306
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
345307
);
346308
runOnlyForDeploymentPostprocessing = 0;

0 commit comments

Comments
 (0)