Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): handle long multi-select user input forms #5118

Closedthuongtin(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/5118/headopened View on GitHub

Showing 7 changed files with 74 additions and 57 deletions (loading 6).

x
0 of 7 viewed, 7 left
74 additions and 57 deletionsapps/mobile/src/features/threads/PendingUserInputCard.tsxModified
View file
@@ -1,18 +1,23 @@
-import type { ApprovalRequestId } from "@t3tools/contracts";
-import { Pressable, View } from "react-native";
+import type { ApprovalRequestId, UserInputQuestion } from "@t3tools/contracts";
+import { Pressable, ScrollView, View } from "react-native";
​
import { AppText as Text, AppTextInput as TextInput } from "../../components/AppText";
import { cn } from "../../lib/cn";
-import type { PendingUserInput, PendingUserInputDraftAnswer } from "../../lib/threadActivity";
+import {
+ isPendingUserInputOptionSelected,
+ type PendingUserInput,
+ type PendingUserInputDraftAnswer,
+} from "../../lib/threadActivity";
​
export interface PendingUserInputCardProps {
readonly pendingUserInput: PendingUserInput;
+ readonly maxHeight: number;
readonly drafts: Record<string, PendingUserInputDraftAnswer>;
- readonly answers: Record<string, string> | null;
+ readonly answers: Record<string, string | ReadonlyArray<string>> | null;
readonly respondingUserInputId: ApprovalRequestId | null;
readonly onSelectOption: (
requestId: ApprovalRequestId,
- questionId: string,
+ question: UserInputQuestion,
label: string,
) => void;
readonly onChangeCustomAnswer: (
@@ -28,69 +33,81 @@