Skip to content

Commit 81d43dc

Browse files
authored
fix: keyboard overlapping the input element (#6)
* fixes keyboard overlapping the input element * test
1 parent 2008fa1 commit 81d43dc

File tree

14 files changed

+2070
-4909
lines changed

14 files changed

+2070
-4909
lines changed

apps/playground/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ node_modules/
77
.expo/
88
dist/
99
web-build/
10+
expo-env.d.ts
1011

1112
# Native
13+
.kotlin/
1214
*.orig.*
1315
*.jks
1416
*.p8

apps/playground/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node-linker=hoisted

apps/playground/assets/splash.png

-29.1 KB
Loading

apps/playground/babel.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

apps/playground/index.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

apps/playground/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { registerRootComponent } from "expo";
2+
3+
import App from "./src/app";
4+
5+
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
6+
// It also ensures that whether you load the app in Expo Go or in a native build,
7+
// the environment is set up appropriately
8+
registerRootComponent(App);

apps/playground/metro.config.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

apps/playground/package.json

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
11
{
2-
"name": "@formbricks/demo-react-native",
2+
"name": "playground",
33
"version": "1.0.0",
4-
"main": "./index.js",
4+
"main": "index.ts",
55
"scripts": {
6-
"dev": "expo start",
6+
"dev": "expo start --reset-cache",
77
"android": "expo start --android",
88
"ios": "expo start --ios",
9-
"web": "expo start --web",
10-
"eject": "expo eject",
119
"clean": "rimraf .turbo node_modules .expo"
1210
},
1311
"dependencies": {
1412
"@formbricks/react-native": "workspace:*",
15-
"@react-native-async-storage/async-storage": "2.1.0",
16-
"expo": "52.0.28",
17-
"expo-status-bar": "2.0.1",
18-
"react": "18.3.1",
19-
"react-dom": "18.3.1",
20-
"react-native": "0.76.6",
21-
"react-native-webview": "13.12.5"
13+
"@react-native-async-storage/async-storage": "2.1.2",
14+
"expo": "~53.0.13",
15+
"expo-status-bar": "~2.2.3",
16+
"react": "19.0.0",
17+
"react-native": "0.79.4"
2218
},
2319
"devDependencies": {
24-
"@babel/core": "7.26.0",
25-
"@types/react": "18.3.18",
26-
"eslint": "8.57.0",
27-
"typescript": "5.7.2"
20+
"@babel/core": "^7.25.2",
21+
"@types/react": "~19.0.10",
22+
"typescript": "~5.8.3"
2823
},
2924
"private": true
3025
}

apps/playground/src/app.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export default function App(): JSX.Element {
3030
display: "flex",
3131
flexDirection: "column",
3232
gap: 10,
33-
}}>
33+
}}
34+
>
3435
<Button
3536
title="Trigger Code Action"
3637
onPress={() => {
@@ -42,7 +43,7 @@ export default function App(): JSX.Element {
4243
/>
4344

4445
<Button
45-
title="Set User Id"
46+
title="Set userId"
4647
onPress={() => {
4748
setUserId("random-user-id").catch((error: unknown) => {
4849
// eslint-disable-next-line no-console -- logging is allowed in demo apps
@@ -69,10 +70,12 @@ export default function App(): JSX.Element {
6970
<Button
7071
title="Set User Attributes (single)"
7172
onPress={() => {
72-
setAttribute("testSingleAttr", "testSingleAttr").catch((error: unknown) => {
73-
// eslint-disable-next-line no-console -- logging is allowed in demo apps
74-
console.error("Error setting user attributes:", error);
75-
});
73+
setAttribute("testSingleAttr", "testSingleAttr").catch(
74+
(error: unknown) => {
75+
// eslint-disable-next-line no-console -- logging is allowed in demo apps
76+
console.error("Error setting user attributes:", error);
77+
}
78+
);
7679
}}
7780
/>
7881

@@ -101,7 +104,9 @@ export default function App(): JSX.Element {
101104

102105
<Formbricks
103106
appUrl={process.env.EXPO_PUBLIC_APP_URL as string}
104-
environmentId={process.env.EXPO_PUBLIC_FORMBRICKS_ENVIRONMENT_ID as string}
107+
environmentId={
108+
process.env.EXPO_PUBLIC_FORMBRICKS_ENVIRONMENT_ID as string
109+
}
105110
/>
106111
</View>
107112
);

apps/playground/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2+
"extends": "expo/tsconfig.base",
23
"compilerOptions": {
34
"strict": true
4-
},
5-
"extends": "expo/tsconfig.base"
5+
}
66
}

0 commit comments

Comments
 (0)