Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix(mobile): keep the comment box and board filter above the Android keyboard

Tin Sever1084aaa70448
diff --git a/apps/mobile/src/app/(app)/board/[projectId].tsx b/apps/mobile/src/app/(app)/board/[projectId].tsx
index efe58e6e7..f12224e16 100644
--- a/apps/mobile/src/app/(app)/board/[projectId].tsx
+++ b/apps/mobile/src/app/(app)/board/[projectId].tsx
@@ -13,6 +13,7 @@ import {
import { useMemo, useRef, useState } from "react";
import {
FlatList,
+ KeyboardAvoidingView,
ScrollView,
TextInput,
useWindowDimensions,
@@ -531,7 +532,8 @@ export default function BoardScreen() {
{header}
<View style={{ flex: 1 }}>{body}</View>
- <View
+ <KeyboardAvoidingView
+ behavior="padding"
style={{ position: "absolute", left: 0, right: 0, bottom: 0 }}
pointerEvents="box-none"
>
@@ -641,7 +643,7 @@ export default function BoardScreen() {
<Plus size={20} color={c.onPrimary} strokeWidth={2} />
</Touch>
</View>
- </View>
+ </KeyboardAvoidingView>
<FilterSheet
visible={filterSheet}
diff --git a/apps/mobile/src/app/(app)/task/[taskId].tsx b/apps/mobile/src/app/(app)/task/[taskId].tsx
index 5884513f9..5e89417c8 100644
--- a/apps/mobile/src/app/(app)/task/[taskId].tsx
+++ b/apps/mobile/src/app/(app)/task/[taskId].tsx
@@ -4,13 +4,7 @@ import { router, useLocalSearchParams } from "expo-router";
import { Ellipsis, Link2 } from "lucide-react-native";
import { useState } from "react";
import { useTranslation } from "react-i18next";
-import {
- KeyboardAvoidingView,
- Platform,
- Share,
- TextInput,
- View,
-} from "react-native";
+import { KeyboardAvoidingView, Share, TextInput, View } from "react-native";
import { MarkdownText } from "@/components/markdown";
import {
@@ -187,7 +181,7 @@ export default function TaskScreen() {
</TopBar>
<KeyboardAvoidingView
- behavior={Platform.OS === "ios" ? "padding" : undefined}
+ behavior="padding"
style={{ flex: 1 }}
keyboardVerticalOffset={0}
>
diff --git a/apps/mobile/src/app/(app)/task/new.tsx b/apps/mobile/src/app/(app)/task/new.tsx
index d692c3968..e8dec2559 100644
--- a/apps/mobile/src/app/(app)/task/new.tsx
+++ b/apps/mobile/src/app/(app)/task/new.tsx
@@ -9,7 +9,6 @@ import {
import { useState, type ReactNode } from "react";
import {
KeyboardAvoidingView,
- Platform,
ScrollView,
TextInput,
View,
@@ -216,10 +215,7 @@ export default function NewTaskScreen() {
return (
<Screen surface>
- <KeyboardAvoidingView
- behavior={Platform.OS === "ios" ? "padding" : undefined}
- style={{ flex: 1 }}
- >
+ <KeyboardAvoidingView behavior="padding" style={{ flex: 1 }}>
<View
style={{
flexDirection: "row",
diff --git a/apps/mobile/src/app/sign-in.tsx b/apps/mobile/src/app/sign-in.tsx
index 3fd84594b..14ed25f72 100644
--- a/apps/mobile/src/app/sign-in.tsx
+++ b/apps/mobile/src/app/sign-in.tsx
@@ -132,10 +132,7 @@ export default function SignInScreen() {
return (
<Screen surface>
- <KeyboardAvoidingView
- behavior={Platform.OS === "ios" ? "padding" : undefined}
- style={{ flex: 1 }}
- >
+ <KeyboardAvoidingView behavior="padding" style={{ flex: 1 }}>
{step !== "start" ? (
<View
style={{ height: 52, justifyContent: "center", paddingLeft: 6 }}