Skip to content

Commit 84af888

Browse files
committed
tweak scroll views
1 parent 55c45ed commit 84af888

File tree

16 files changed

+52
-11
lines changed

16 files changed

+52
-11
lines changed

apps/app/src/app/(auth)/login.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default function Login() {
3939
<ModalView title="Login">
4040
<ScrollView
4141
keyboardShouldPersistTaps="handled"
42+
keyboardDismissMode="interactive"
4243
contentContainerStyle={{ paddingBottom: 400 }}
4344
showsHorizontalScrollIndicator={false}
4445
>

apps/app/src/app/(auth)/register.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export default function Register() {
4141
<ModalView title="Register">
4242
<ScrollView
4343
keyboardShouldPersistTaps="handled"
44+
keyboardDismissMode="interactive"
4445
contentContainerStyle={{ paddingBottom: 400 }}
4546
showsHorizontalScrollIndicator={false}
4647
>

apps/app/src/app/(home)/(timeline)/[id]/delete.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ export default function DeleteTask() {
2828

2929
return (
3030
<ModalView title="Delete task">
31-
<ScrollView className="flex-1 space-y-2">
31+
<ScrollView
32+
className="flex-1 space-y-2"
33+
showsVerticalScrollIndicator={false}
34+
keyboardShouldPersistTaps="handled"
35+
keyboardDismissMode="interactive"
36+
>
3237
<Text>Do you want to only delete this task or all future tasks as well?</Text>
3338
<Button
3439
isLoading={deleteTask.isLoading}

apps/app/src/app/(home)/(timeline)/backlog.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default function Backlog() {
2424
<ModalView title="Backlog">
2525
<ScrollView
2626
keyboardShouldPersistTaps="handled"
27+
keyboardDismissMode="interactive"
2728
contentContainerStyle={{ flexGrow: 1, paddingBottom: 200 }}
2829
showsVerticalScrollIndicator={false}
2930
refreshControl={<RefreshControl refreshing={false} onRefresh={refetch} />}

apps/app/src/app/(home)/(timeline)/elements/[elementId]/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ export default function ElementDetail() {
4343
) : (
4444
<ScrollView
4545
className="space-y-4"
46-
keyboardShouldPersistTaps="handled"
4746
contentContainerStyle={{ minHeight: "100%", paddingBottom: 400 }}
4847
showsVerticalScrollIndicator={false}
48+
keyboardShouldPersistTaps="handled"
49+
keyboardDismissMode="interactive"
4950
>
5051
<ElementForm error={error?.data} element={data} onUpdate={mutate} isLoading={updateLoading} />
5152
</ScrollView>

apps/app/src/app/(home)/(timeline)/elements/create.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ export default function CreateElement() {
2323
return (
2424
<ModalView title="Create element">
2525
<ScrollView
26+
showsVerticalScrollIndicator={false}
2627
keyboardShouldPersistTaps="handled"
28+
keyboardDismissMode="interactive"
2729
contentContainerStyle={{ paddingBottom: 100 }}
28-
showsVerticalScrollIndicator={false}
2930
>
3031
<ElementForm error={error?.data} isLoading={isLoading} onCreate={mutate} />
3132
</ScrollView>

apps/app/src/app/(home)/(timeline)/elements/select.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ export default function SelectElement() {
4545
onChangeText={setSearch}
4646
/>
4747
<ScrollView
48-
keyboardShouldPersistTaps="handled"
4948
contentContainerStyle={{ paddingBottom: 100 }}
5049
showsVerticalScrollIndicator={false}
50+
keyboardShouldPersistTaps="handled"
51+
keyboardDismissMode="interactive"
5152
>
5253
<View className="space-y-1 pt-2">
5354
{me && isLoading ? (

apps/app/src/app/(home)/(timeline)/repeat-select.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ export default function RepeatSelect() {
1919

2020
return (
2121
<ModalView title="What period?">
22-
<ScrollView className="flex-1 pt-2">
22+
<ScrollView
23+
className="flex-1 pt-2"
24+
showsVerticalScrollIndicator={false}
25+
keyboardShouldPersistTaps="handled"
26+
keyboardDismissMode="interactive"
27+
>
2328
{Object.entries(TaskRepeatOptions).map(([key, value]) => (
2429
<TouchableOpacity
2530
key={key}

apps/app/src/app/(home)/habits/[id].tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ function EditHabitForm({ habit }: { habit: Habit }) {
4343
return (
4444
<KeyboardAvoidingView behavior="padding" enabled keyboardVerticalOffset={100}>
4545
<ScrollView
46-
keyboardShouldPersistTaps="handled"
4746
contentContainerStyle={{ minHeight: "100%", paddingBottom: 100 }}
4847
showsVerticalScrollIndicator={false}
48+
keyboardShouldPersistTaps="handled"
49+
keyboardDismissMode="interactive"
4950
>
5051
<HabitForm
5152
error={updateHabit.error?.data}

apps/app/src/app/(home)/habits/stats.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ export default function HabitStat() {
4141
/>
4242
</View>
4343
<ScrollView
44-
keyboardShouldPersistTaps="handled"
4544
contentContainerStyle={{ flexGrow: 1, paddingBottom: 200 }}
4645
showsVerticalScrollIndicator={false}
46+
keyboardShouldPersistTaps="handled"
47+
keyboardDismissMode="interactive"
4748
>
4849
{isLoading && !data ? (
4950
<View className="flex items-center justify-center pt-4">

apps/app/src/app/(home)/profile/account.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ export default function Account() {
7878
<ScrollView
7979
className="space-y-2 pt-4"
8080
showsVerticalScrollIndicator={false}
81+
keyboardShouldPersistTaps="handled"
82+
keyboardDismissMode="interactive"
8183
contentContainerStyle={{ paddingBottom: 400 }}
8284
>
8385
<View className="flex w-full items-center justify-center pt-2">

apps/app/src/app/(home)/profile/index.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ export default function Profile() {
5252

5353
return (
5454
<SafeAreaView className="flex-1 px-4 pt-2">
55-
<ScrollView className="flex-1 space-y-6">
55+
<ScrollView
56+
className="flex-1 space-y-6"
57+
showsVerticalScrollIndicator={false}
58+
keyboardShouldPersistTaps="handled"
59+
keyboardDismissMode="interactive"
60+
>
5661
<View className="flex flex-row items-center space-x-4 p-2">
5762
{me?.avatar ? (
5863
<OptimizedImage

apps/app/src/app/(home)/profile/plan.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ export default function Plan() {
1212
const discountedPlanAmount = data?.subscription?.discountPercent ? 4 - (4 * 100) / data.subscription.discountPercent : null
1313
return (
1414
<ScreenView title="Plan">
15-
<ScrollView contentContainerStyle={{ paddingBottom: 200 }}>
15+
<ScrollView
16+
showsVerticalScrollIndicator={false}
17+
keyboardShouldPersistTaps="handled"
18+
keyboardDismissMode="interactive"
19+
contentContainerStyle={{ paddingBottom: 200 }}
20+
>
1621
{isLoading ? (
1722
<View className="flex w-full items-center justify-center pt-4">
1823
<ActivityIndicator />

apps/app/src/app/(home)/profile/settings.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ export function SettingsScreen() {
3232
if (!me) return null
3333
return (
3434
<ScreenView title="Settings">
35-
<ScrollView contentContainerStyle={{ flexGrow: 1 }} showsVerticalScrollIndicator={false}>
35+
<ScrollView
36+
contentContainerStyle={{ flexGrow: 1 }}
37+
showsVerticalScrollIndicator={false}
38+
keyboardShouldPersistTaps="handled"
39+
keyboardDismissMode="interactive"
40+
>
3641
<View className="pb-8">
3742
<Button leftIcon={<Icon icon={AlertCircle} size={16} />} variant="ghost" onPress={deleteAccountModalProps.onOpen}>
3843
Delete account

apps/app/src/components/LoginPlaceholder.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ interface Props {
1313
export function LoginPlaceholder(props: Props) {
1414
const router = useRouter()
1515
return (
16-
<ScrollView contentContainerStyle={{ flexGrow: 1 }}>
16+
<ScrollView
17+
contentContainerStyle={{ flexGrow: 1 }}
18+
showsVerticalScrollIndicator={false}
19+
keyboardShouldPersistTaps="handled"
20+
keyboardDismissMode="interactive"
21+
>
1722
<View className="space-y-4">
1823
<View className="space-y-6">
1924
<Text className="text-lg">{props.text}</Text>

apps/app/src/components/TaskForm.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ export function TaskForm(props: Props) {
135135
contentContainerStyle={{ paddingBottom: 80 }}
136136
className="px-4"
137137
contentInsetAdjustmentBehavior="always"
138+
keyboardDismissMode="interactive"
138139
keyboardShouldPersistTaps="handled"
139140
showsVerticalScrollIndicator={false}
140141
>

0 commit comments

Comments
 (0)