fix(app): theme pull request empty state

The empty-state text inherited the platform default color, making it unreadable on dark surfaces. Use the app foreground tokens so it follows the active theme.
This commit is contained in:
Mohamed Boudra
2026-08-17 22:55:46 +02:00
parent 3948bf4fd6
commit 7a61a642a9
+19 -12
View File
@@ -1,6 +1,7 @@
import { useCallback, useEffect } from "react"; import { useCallback, useEffect } from "react";
import { Text, View } from "react-native"; import { Text, View } from "react-native";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { StyleSheet } from "react-native-unistyles";
import { buildWorkspaceAttachmentScopeKey } from "@/attachments/workspace-attachments-store"; import { buildWorkspaceAttachmentScopeKey } from "@/attachments/workspace-attachments-store";
import { useToast } from "@/contexts/toast-context"; import { useToast } from "@/contexts/toast-context";
import { useCheckoutGitActionsStore } from "@/git/actions-store"; import { useCheckoutGitActionsStore } from "@/git/actions-store";
@@ -75,9 +76,9 @@ export function PullRequestContent(input: {
return <PullRequestPaneSkeleton />; return <PullRequestPaneSkeleton />;
} }
return ( return (
<View style={EMPTY_STYLE} testID="pull-request-empty-state"> <View style={styles.empty} testID="pull-request-empty-state">
<Text style={EMPTY_TITLE_STYLE}>{t("panels.pullRequest.emptyTitle")}</Text> <Text style={styles.emptyTitle}>{t("panels.pullRequest.emptyTitle")}</Text>
<Text>{t("panels.pullRequest.emptyDescription")}</Text> <Text style={styles.emptyDescription}>{t("panels.pullRequest.emptyDescription")}</Text>
</View> </View>
); );
} }
@@ -91,12 +92,18 @@ export function usePullRequestData(input: {
return usePrPaneData(input); return usePrPaneData(input);
} }
const EMPTY_STYLE = { const styles = StyleSheet.create((theme) => ({
flex: 1, empty: {
alignItems: "center", flex: 1,
justifyContent: "center", alignItems: "center",
gap: 8, justifyContent: "center",
padding: 24, gap: 8,
} as const; padding: 24,
},
const EMPTY_TITLE_STYLE = { fontWeight: "600" } as const; emptyTitle: {
color: theme.colors.foreground,
},
emptyDescription: {
color: theme.colors.foregroundMuted,
},
}));