Skip to content

Commit 4e0b42b

Browse files
fix(mobile): skills library issues list uses LegendList
The upstream merge added a lint rule that restricts FlatList, which failed main's full-repository validation. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent e293a11 commit 4e0b42b

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎apps/mobile/src/features/settings/SkillsLibrarySettings.test.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ vi.mock("../../components/ui/EmptyState", () => ({ EmptyState: () => null }));
3535
vi.mock("../../components/ui/AppActivityIndicator", () => ({ AppActivityIndicator: () => null }));
3636
vi.mock("../../state/environments", () => ({ useEnvironments: () => ({ environments: [] }) }));
3737
vi.mock("../pull-requests/PullRequestSearchSheet", () => ({ PullRequestSearchSheet: () => null }));
38+
vi.mock("@legendapp/list/react-native", () => ({ LegendList: () => null }));
39+
vi.mock("../../native/NativeScrollViewMarker", () => ({ NativeScrollView: () => null }));
3840
vi.mock("../../components/ui/ListRow", () => ({
3941
ListRow: (props: { label: string; description?: string; onPress: () => void }) => (
4042
<button onClick={props.onPress}>

‎apps/mobile/src/features/settings/SkillsLibrarySettings.tsx‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { LegendList } from "@legendapp/list/react-native";
2+
import { NativeScrollView } from "../../native/NativeScrollViewMarker";
13
import { useAtomValue } from "@effect/atom-react";
24
import { useNavigation, type StaticScreenProps } from "@react-navigation/native";
35
import {
@@ -13,7 +15,7 @@ import {
1315
type SkillsLibraryIssue,
1416
} from "@t3tools/client-runtime/skills-library-issues";
1517
import { useState } from "react";
16-
import { FlatList, Platform, View } from "react-native";
18+
import { Platform, View } from "react-native";
1719

1820
import { AppActivityIndicator } from "../../components/ui/AppActivityIndicator";
1921
import { AppText as Text } from "../../components/ui/AppText";
@@ -149,10 +151,12 @@ export function SkillsLibraryIssuesRouteScreen({
149151
onQueryChange={setQuery}
150152
>
151153
{({ paddingBottom }) => (
152-
<FlatList
154+
<LegendList
155+
renderScrollComponent={NativeScrollView}
153156
data={issues}
154157
keyExtractor={(issue) => issue.key}
155-
extraData={openKey}
158+
extraData={{ openKey, count: issues.length }}
159+
estimatedItemSize={72}
156160
className="flex-1"
157161
contentInsetAdjustmentBehavior="automatic"
158162
automaticallyAdjustKeyboardInsets={Platform.OS === "ios"}

0 commit comments

Comments
 (0)