Skip to content
TypeScript

fix(mobile): keep Android project paths on one line (#14178)

wellorbetter5047ee78858b
diff --git a/apps/mobile/src/components/MaterialListRow.tsx b/apps/mobile/src/components/MaterialListRow.tsx
index cef104a02f5..447d192438d 100644
--- a/apps/mobile/src/components/MaterialListRow.tsx
+++ b/apps/mobile/src/components/MaterialListRow.tsx
@@ -12,6 +12,8 @@ export function MaterialListRow({
title,
titleClassName,
subtitle,
+ subtitleNumberOfLines,
+ subtitleEllipsizeMode,
leading,
trailing,
className,
@@ -20,6 +22,8 @@ export function MaterialListRow({
readonly title: string;
readonly titleClassName?: string;
readonly subtitle?: string | null;
+ readonly subtitleNumberOfLines?: ComponentProps<typeof AppText>["numberOfLines"];
+ readonly subtitleEllipsizeMode?: ComponentProps<typeof AppText>["ellipsizeMode"];
readonly leading?: ReactNode;
readonly trailing?: ReactNode;
}) {
@@ -46,7 +50,11 @@ export function MaterialListRow({
{title}
</AppText>
{subtitle ? (
- <AppText className="text-sm text-foreground-muted" numberOfLines={2}>
+ <AppText
+ className="text-sm text-foreground-muted"
+ ellipsizeMode={subtitleEllipsizeMode}
+ numberOfLines={subtitleNumberOfLines ?? 2}
+ >
{subtitle}
</AppText>
) : null}
diff --git a/apps/mobile/src/features/threads/NewTaskRouteScreen.tsx b/apps/mobile/src/features/threads/NewTaskRouteScreen.tsx
index 1a5323281c4..b015b0508bb 100644
--- a/apps/mobile/src/features/threads/NewTaskRouteScreen.tsx
+++ b/apps/mobile/src/features/threads/NewTaskRouteScreen.tsx
@@ -463,6 +463,8 @@ export function NewTaskRouteScreen({ route }: StaticScreenProps<NewTaskRoutePara
? `${scope.projects.length} workspaces`
: selectionTarget.workspaceRoot
}
+ subtitleNumberOfLines={1}
+ subtitleEllipsizeMode="middle"
disabled={reservedDestinationProject !== null}
onPress={() => void selectProject(selectionTarget)}
leading={