Skip to content

Commit f689071

Browse files
none23claude
andcommitted
fix(mobile): Android PR filter chips no longer crowd the sheet corner
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 812b700 commit f689071

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

‎apps/mobile/src/features/pull-requests/PullRequestListFilters.tsx‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { sortProjectsByGroupOrder } from "@t3tools/client-runtime/state/project-grouping";
22
import { useMemo } from "react";
3-
import { ScrollView } from "react-native";
3+
import { Platform, ScrollView } from "react-native";
44
import type { MenuProps } from "../../components/ui/Menu.types";
55
import { ListFilterMenu } from "../workspace/ListFilterMenu";
66
import { useProjects, useThreadShells } from "../../state/entities";
@@ -24,6 +24,12 @@ const SORTS = {
2424
created: "Newest created",
2525
oldest: "Oldest updated",
2626
} as const;
27+
// On Android the row sits under ScreenContent's 28dp corner. A 12dp inset keeps the
28+
// 16dp chip radius concentric with it (28 - 12 = 16).
29+
const ROW_STYLE =
30+
Platform.OS === "android"
31+
? { paddingHorizontal: 12, paddingTop: 12, paddingBottom: 8, gap: 8 }
32+
: { paddingHorizontal: 16, paddingTop: 2, paddingBottom: 10, gap: 8 };
2733
const id = (field: string, value: string) => JSON.stringify([field, value]);
2834
function choices(field: string, options: Readonly<Record<string, string>>, selected: string) {
2935
return Object.entries(options).map(([value, title]) => ({
@@ -222,11 +228,7 @@ export function PullRequestListFilters(props: {
222228
...new Set([...(author && author !== "me" ? [author] : []), ...props.authors]),
223229
].slice(0, 60);
224230
return (
225-
<ScrollView
226-
horizontal
227-
showsHorizontalScrollIndicator={false}
228-
contentContainerStyle={{ paddingHorizontal: 16, paddingTop: 2, paddingBottom: 10, gap: 8 }}
229-
>
231+
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={ROW_STYLE}>
230232
<ListFilterMenu
231233
label={count ? String(count) : "Filters"}
232234
icon

0 commit comments

Comments
 (0)