Skip to content

Commit 197343f

Browse files
committed
fix(mobile): keep thread title rows evenly sized and aligned
1 parent e2d3ded commit 197343f

1 file changed

Lines changed: 14 additions & 16 deletions

File tree

‎apps/mobile/src/features/threads/thread-list-v2-items.tsx‎

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ import { PullRequestGlyph } from "../pull-requests/pullRequestGlyphs";
6969
import { pullRequestStatus } from "../pull-requests/pullRequestStatus";
7070

7171
const TITLE_FAVICON_SIZE = 15;
72-
// Centers the favicon on the first line of the text-base title.
73-
const TITLE_FAVICON_OFFSET = 4;
7472
// Lines below the title start where the title text does.
7573
const TITLE_TEXT_INSET = TITLE_FAVICON_SIZE + 8;
7674

@@ -1004,18 +1002,16 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
10041002
const titleTextInset = props.project ? TITLE_TEXT_INSET : 0;
10051003
const cardContent = (
10061004
<>
1007-
<View className="flex-row items-start gap-2">
1005+
<View className="flex-row items-center gap-2">
10081006
{props.project ? (
1009-
<View style={{ marginTop: TITLE_FAVICON_OFFSET }}>
1010-
<ProjectFavicon
1011-
environmentId={thread.environmentId}
1012-
faviconPath={props.project.faviconPath}
1013-
projectIcon={props.project.projectIcon}
1014-
size={TITLE_FAVICON_SIZE}
1015-
projectTitle={props.project.title}
1016-
workspaceRoot={props.project.workspaceRoot}
1017-
/>
1018-
</View>
1007+
<ProjectFavicon
1008+
environmentId={thread.environmentId}
1009+
faviconPath={props.project.faviconPath}
1010+
projectIcon={props.project.projectIcon}
1011+
size={TITLE_FAVICON_SIZE}
1012+
projectTitle={props.project.title}
1013+
workspaceRoot={props.project.workspaceRoot}
1014+
/>
10191015
) : null}
10201016
<Text
10211017
className={cn(
@@ -1025,11 +1021,11 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
10251021
? selectedThreadRowColors.foregroundClassName
10261022
: rowAppearance.foregroundClassName,
10271023
)}
1028-
numberOfLines={2}
1024+
numberOfLines={1}
10291025
>
10301026
{thread.title}
10311027
</Text>
1032-
<View className="flex-row items-center gap-1.5" style={{ marginTop: 3 }}>
1028+
<View className="flex-row items-center gap-1.5">
10331029
{props.hasQueuedMessages ? <QueuedMessageIcon selected={selected} /> : null}
10341030
{pinnedRow ? (
10351031
<SymbolView
@@ -1161,7 +1157,9 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
11611157
</Text>
11621158
</View>
11631159
) : (
1164-
<View className="flex-1" />
1160+
<Text accessible={false} className="flex-1 text-xs">
1161+
{" "}
1162+
</Text>
11651163
)}
11661164
{pr ? (
11671165
<Pressable

0 commit comments

Comments
 (0)