fix(android): Use MD3 loading spinners (#14282)

This commit is contained in:
Alex authored and GitHub committed 2026-10-11 11:35:42 -07:00
1 parent 2e19207b17
commit 8863990fca
32 files changed
+159 -113

No files matched your search

@@ -0,0 +1,49 @@
import { LoadingIndicator, Host } from "@expo/ui/jetpack-compose";
import { size as composeSize } from "@expo/ui/jetpack-compose/modifiers";
import { StyleSheet, View, type ActivityIndicatorProps } from "react-native";
import { useResolveClassNames, withUniwind } from "uniwind";
function AndroidActivityIndicator({
animating = true,
color,
colorClassName: _colorClassName,
className: _className,
hidesWhenStopped: _hidesWhenStopped,
size = "small",
style,
...viewProps
}: ActivityIndicatorProps) {
const { color: primaryColor } = useResolveClassNames("text-primary");
const diameter = typeof size === "number" ? size : size === "large" ? 48 : 20;
return (
<View
accessible={animating}
accessibilityRole="progressbar"
accessibilityState={{ busy: animating }}
{...viewProps}
style={[styles.container, style]}
>
<View
pointerEvents="none"
importantForAccessibility="no-hide-descendants"
style={{ width: diameter, height: diameter }}
>
{animating ? (
<Host ignoreSafeAreaKeyboardInsets style={{ flex: 1 }}>
<LoadingIndicator
color={color ?? primaryColor}
modifiers={[composeSize(diameter, diameter)]}
/>
</Host>
) : null}
</View>
</View>
);
}
export const AppActivityIndicator = withUniwind(AndroidActivityIndicator);
const styles = StyleSheet.create({
container: { alignItems: "center", justifyContent: "center" },
});
@@ -0,0 +1,3 @@
import { ActivityIndicator } from "react-native";
export const AppActivityIndicator = ActivityIndicator;
+3 -2
View File
@@ -1,5 +1,6 @@
import { ActivityIndicator, StatusBar, View } from "react-native";
import { StatusBar, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { AppActivityIndicator } from "./AppActivityIndicator";
import { useAppearancePreferences } from "../features/settings/appearance/AppearancePreferencesProvider";
import { AppText as Text } from "./AppText";
@@ -26,7 +27,7 @@ export function LoadingScreen(props: {
{messagePlacement === "above-spinner" ? (
<Text className="font-t3-bold text-lg text-foreground">{props.message}</Text>
) : null}
<ActivityIndicator size="large" />
<AppActivityIndicator size="large" />
{messagePlacement === "below-spinner" ? (
<Text className="font-t3-bold text-lg text-foreground">{props.message}</Text>
) : null}
@@ -1,7 +1,7 @@
import {
Box,
Button,
CircularProgressIndicator,
LoadingIndicator,
FilledTonalButton,
Host,
Row,
@@ -78,9 +78,8 @@ export function MaterialButton(props: MaterialButtonProps) {
<Row verticalAlignment="center">
{props.loading ? (
<>
<CircularProgressIndicator
<LoadingIndicator
modifiers={[size(mediumIconSize, mediumIconSize)]}
strokeWidth={2}
color={colors["--color-foreground-muted"]}
/>
<Box modifiers={[size(8 * scale, 1)]} />
@@ -2,8 +2,9 @@ import { useIsFocused } from "@react-navigation/native";
import { useEvent } from "expo";
import { useVideoPlayer, VideoView } from "expo-video";
import { useEffect, useEffectEvent, useRef, useState } from "react";
import { ActivityIndicator, AppState, Pressable, View } from "react-native";
import { AppState, Pressable, View } from "react-native";
import { AppActivityIndicator } from "./AppActivityIndicator";
import { AppText } from "./AppText";
import { SymbolView } from "./AppSymbol";
import { VideoThumbnailImage } from "./VideoThumbnailImage";
@@ -96,7 +97,7 @@ function LoadedMediaVideo(props: {
</View>
) : loadState === "pending" || status === "loading" ? (
<View pointerEvents="none" className="absolute inset-0 items-center justify-center">
<ActivityIndicator color="#ffffff" accessibilityLabel="Loading video" />
<AppActivityIndicator color="#ffffff" accessibilityLabel="Loading video" />
</View>
) : null}
</View>
@@ -160,7 +161,7 @@ function MediaVideoPlayerContent(props: MediaVideoPlayerProps) {
{props.unavailable ? (
<AppText className="text-sm text-white/80">Video unavailable</AppText>
) : props.uri === null ? (
<ActivityIndicator color="#ffffff" accessibilityLabel="Loading video" />
<AppActivityIndicator color="#ffffff" accessibilityLabel="Loading video" />
) : (
<View className="size-12 items-center justify-center rounded-full bg-black/60">
<SymbolView name="play" size={28} tintColor="#ffffff" type="monochrome" />
@@ -3,8 +3,9 @@ import {
projectCloneProgressSummary,
type ProjectCloneSnapshot,
} from "@t3tools/contracts";
import { ActivityIndicator, Pressable, View } from "react-native";
import { Pressable, View } from "react-native";
import { AppActivityIndicator } from "./AppActivityIndicator";
import { cn } from "../lib/cn";
import { AppText as Text } from "./AppText";
@@ -24,7 +25,7 @@ export function ProjectCloneBanner(props: {
if (clone.phase === "running") {
return (
<View className="flex-row items-center gap-3 rounded-2xl border border-border bg-card px-3.5 py-3">
<ActivityIndicator size="small" />
<AppActivityIndicator size="small" />
<View className="min-w-0 flex-1">
<Text className="font-t3-medium text-sm" numberOfLines={1}>
Cloning {name}
@@ -1,9 +1,10 @@
import { useIsFocused } from "@react-navigation/native";
import { videoMimeType } from "@t3tools/shared/video";
import { useEffect, useRef, useState } from "react";
import { ActivityIndicator, Keyboard, Modal, Pressable, View } from "react-native";
import { Keyboard, Modal, Pressable, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { AppActivityIndicator } from "./AppActivityIndicator";
import { loadLocalAttachmentPreview } from "../lib/localAttachmentPreview";
import { useMediaActions } from "../state/mediaActions";
import { type MediaActionsSource } from "../lib/mediaActionsSource";
@@ -165,7 +166,7 @@ function OpenVideoPreviewModal(props: {
<MediaSourceCaption source={mediaActions.title} />
{playback.uri === null && !playback.unavailable ? (
<View className="flex-1 items-center justify-center gap-3 px-6">
<ActivityIndicator color="#ffffff" />
<AppActivityIndicator color="#ffffff" />
<AppText className="text-sm text-white/80">Loading video...</AppText>
</View>
) : (
@@ -10,17 +10,11 @@ import {
resolveEnvironmentMachineKind,
} from "@t3tools/contracts";
import { useNavigation } from "@react-navigation/native";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { ScreenHeader } from "../../components/ScreenHeader";
import { SymbolView } from "../../components/AppSymbol";
import { useCallback, useMemo, useRef, type ComponentProps } from "react";
import {
ActivityIndicator,
Platform,
Pressable,
RefreshControl,
useWindowDimensions,
View,
} from "react-native";
import { Platform, Pressable, RefreshControl, useWindowDimensions, View } from "react-native";
import { GestureDetector, useNativeGesture } from "react-native-gesture-handler";
import type { SwipeableMethods } from "react-native-gesture-handler/ReanimatedSwipeable";
@@ -399,7 +393,7 @@ export function ArchivedThreadsScreen(props: {
if (isInitialLoad) {
return (
<View className="items-center py-16">
<ActivityIndicator colorClassName="accent-icon" />
<AppActivityIndicator colorClassName="accent-icon" />
<Text className="mt-3 text-sm text-foreground-muted">Loading archive...</Text>
</View>
);
@@ -7,16 +7,9 @@ import type { MenuAction } from "@react-native-menu/menu";
import type { EnvironmentId } from "@t3tools/contracts";
import type { RelayClientEnvironmentRecord } from "@t3tools/contracts/relay";
import { type ReactNode, useRef, useState } from "react";
import {
ActivityIndicator,
Alert,
Pressable,
RefreshControl,
ScrollView,
Text,
View,
} from "react-native";
import { Alert, Pressable, RefreshControl, ScrollView, Text, View } from "react-native";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { SymbolView } from "../../components/AppSymbol";
import { showConfirmDialog } from "../../components/ConfirmDialogHost";
import { ControlPillMenu } from "../../components/ControlPill";
@@ -167,7 +160,7 @@ export function T3ConnectProfilePage() {
</>
) : isInitialLoad ? (
<View className="flex-row items-center gap-3 px-6 py-4">
<ActivityIndicator colorClassName={"accent-clerk-foreground-muted"} size="small" />
<AppActivityIndicator colorClassName={"accent-clerk-foreground-muted"} size="small" />
<Text className="text-base text-clerk-foreground-muted">Loading environments</Text>
</View>
) : environments.length > 0 ? (
@@ -178,7 +171,10 @@ export function T3ConnectProfilePage() {
subtitle={`${linkedAtLabel(environment.linkedAt)} · ${endpointLabel(environment)}`}
accessory={
deregisteringEnvironmentId === environment.environmentId ? (
<ActivityIndicator colorClassName={"accent-clerk-foreground-muted"} size="small" />
<AppActivityIndicator
colorClassName={"accent-clerk-foreground-muted"}
size="small"
/>
) : (
<ControlPillMenu
actions={ENVIRONMENT_MENU_ACTIONS}
@@ -1,3 +1,4 @@
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { ConnectionTraceId } from "./ConnectionTraceId";
import { useAuth } from "@clerk/expo";
import { SymbolView } from "../../components/AppSymbol";
@@ -13,7 +14,7 @@ import {
} from "@t3tools/contracts";
import { useAtomValue } from "@effect/atom-react";
import { useCallback, useState } from "react";
import { ActivityIndicator, Pressable, type TextLayoutEvent, View } from "react-native";
import { Pressable, type TextLayoutEvent, View } from "react-native";
import { AppText as Text } from "../../components/AppText";
import { EnvironmentMachineSymbol } from "../../components/EnvironmentMachineSymbol";
@@ -151,7 +152,7 @@ function CloudEnvironmentRowsContent(
</View>
) : controller.relayDiscovery.isRefreshing ? (
<View collapsable={false} className="items-center gap-3 rounded-[24px] bg-grouped-card p-6">
<ActivityIndicator colorClassName={"accent-icon"} />
<AppActivityIndicator colorClassName={"accent-icon"} />
<Text className="text-center text-sm leading-normal text-foreground-muted">
Loading linked cloud environments.
</Text>
@@ -1,10 +1,11 @@
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { ConnectionTraceId } from "./ConnectionTraceId";
import {
type EnvironmentConnectionPhase,
type EnvironmentConnectionPresentation,
} from "@t3tools/client-runtime/connection";
import { SymbolView } from "../../components/AppSymbol";
import { ActivityIndicator, Pressable, View } from "react-native";
import { Pressable, View } from "react-native";
import { AppText as Text } from "../../components/AppText";
@@ -65,7 +66,7 @@ export function EnvironmentConnectionNotice(props: {
<View className="flex-1 items-center justify-center px-8">
<View className="max-w-[320px] items-center gap-3">
{isRetrying ? (
<ActivityIndicator size="small" colorClassName={"accent-icon-muted"} />
<AppActivityIndicator size="small" colorClassName={"accent-icon-muted"} />
) : (
<SymbolView
name={props.connection.phase === "offline" ? "wifi.slash" : "bolt.horizontal.circle"}
@@ -9,19 +9,12 @@ import * as Cause from "effect/Cause";
import { useCallback, useEffect, useMemo, useRef, useState, type RefObject } from "react";
import * as Haptics from "expo-haptics";
import { Accelerometer } from "expo-sensors";
import {
ActivityIndicator,
Alert,
AppState,
BackHandler,
Pressable,
StatusBar,
View,
} from "react-native";
import { Alert, AppState, BackHandler, Pressable, StatusBar, View } from "react-native";
import Animated, { FadeIn, FadeOut, ReduceMotion } from "react-native-reanimated";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { SymbolView } from "../../components/AppSymbol";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { AppText } from "../../components/AppText";
import { ControlPill, ControlPillMenu } from "../../components/ControlPill";
import { GlassSurface } from "../../components/GlassSurface";
@@ -295,7 +288,7 @@ function DevicePreviewScreen({
</Pressable>
</>
) : focused && foreground ? (
<ActivityIndicator color={themeVariables["--color-icon"]} />
<AppActivityIndicator color={themeVariables["--color-icon"]} />
) : null}
</View>
)}
@@ -428,7 +421,7 @@ function OpenDevicePreview({
</>
) : (
<>
<ActivityIndicator color={themeVariables["--color-icon"]} />
<AppActivityIndicator color={themeVariables["--color-icon"]} />
<AppText className="text-sm text-foreground-muted">Connecting to device...</AppText>
</>
)}
@@ -9,10 +9,11 @@ import {
useState,
type Ref,
} from "react";
import { ActivityIndicator, Platform, Pressable, View } from "react-native";
import { Platform, Pressable, View } from "react-native";
import { WebView } from "react-native-webview";
import type { DeviceStreamStatus } from "@t3tools/client-runtime/device/stream";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { AppText } from "../../components/AppText";
import {
@@ -187,7 +188,7 @@ function DeviceStreamDocumentView({
className="absolute inset-0 items-center justify-center gap-4 px-6"
style={{ backgroundColor: background }}
>
{status === "connecting" ? <ActivityIndicator colorClassName="accent-icon" /> : null}
{status === "connecting" ? <AppActivityIndicator colorClassName="accent-icon" /> : null}
<AppText
accessibilityLiveRegion="polite"
className="text-center text-sm text-foreground-muted"
@@ -1,8 +1,9 @@
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { ScreenScrollView as ScrollView } from "../../components/ScreenScrollView";
import Constants from "expo-constants";
import * as Updates from "expo-updates";
import { useEffect, useState } from "react";
import { ActivityIndicator, Platform, View } from "react-native";
import { Platform, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { SymbolView } from "../../components/AppSymbol";
@@ -85,7 +86,7 @@ export function SettingsDiagnosticsRouteScreen() {
<SettingsSection title="Startup crashes">
{state.status === "loading" ? (
<View className="items-center gap-3 px-6 py-8">
<ActivityIndicator />
<AppActivityIndicator />
<Text className="text-center text-sm text-foreground-muted">Reading crash log…</Text>
</View>
) : state.status === "unavailable" ? (
@@ -1,5 +1,6 @@
import { ActivityIndicator, View } from "react-native";
import { View } from "react-native";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { AppText as Text } from "../../components/AppText";
import { cn } from "../../lib/cn";
@@ -14,7 +15,7 @@ export function FilePreviewLoading(props: {
props.background === "card" ? "bg-card" : "bg-sheet",
)}
>
<ActivityIndicator />
<AppActivityIndicator />
<Text className="text-center text-sm text-foreground-muted">{props.message}</Text>
</View>
);
@@ -1,8 +1,9 @@
import { LegendList } from "@legendapp/list/react-native";
import type { ProjectEntry } from "@t3tools/contracts";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { SymbolView } from "../../components/AppSymbol";
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
import { ActivityIndicator, Platform, Pressable, RefreshControl, View } from "react-native";
import { Platform, Pressable, RefreshControl, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { AppText as Text } from "../../components/AppText";
@@ -96,7 +97,7 @@ const FileTreeRow = memo(function FileTreeRow(props: {
{node.name}
</Text>
{node.kind === "directory" && props.expanded && props.loading ? (
<ActivityIndicator size="small" accessibilityLabel={`Loading ${node.name}`} />
<AppActivityIndicator size="small" accessibilityLabel={`Loading ${node.name}`} />
) : null}
</Pressable>
);
@@ -296,7 +297,7 @@ export function FileTreeBrowser(props: {
</Pressable>
</>
) : props.isPending ? (
<ActivityIndicator size="small" />
<AppActivityIndicator size="small" />
) : (
<>
<Text className="text-sm font-t3-bold text-foreground">No files found</Text>
@@ -1,7 +1,8 @@
import { useState } from "react";
import { ActivityIndicator, View } from "react-native";
import { View } from "react-native";
import { WebView } from "react-native-webview";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { AppText as Text } from "../../components/AppText";
import { FilePreviewLoading } from "./FilePreviewFeedback";
import { LoadingStrip } from "../../components/LoadingStrip";
@@ -46,7 +47,7 @@ export function WorkspaceFileWebPreview(props: { readonly uri: string | null })
}}
renderLoading={() => (
<View className="absolute inset-0 items-center justify-center bg-card">
<ActivityIndicator />
<AppActivityIndicator />
</View>
)}
style={{ flex: 1, backgroundColor: "transparent" }}
+2 -2
View File
@@ -1,3 +1,4 @@
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { useAndroidControlSizing } from "../../components/useAndroidControlSizing";
import type { ThreadMoveDestination } from "../threads/threadOrder";
import { computeThreadMoveAvailability } from "../threads/threadOrder";
@@ -15,7 +16,6 @@ import { useAtomValue } from "@effect/atom-react";
import { useFocusEffect } from "@react-navigation/native";
import { use, useCallback, useEffect, useMemo, useRef, useState, type ComponentProps } from "react";
import {
ActivityIndicator,
Platform,
ScrollView,
View,
@@ -947,7 +947,7 @@ export function HomeScreen(props: HomeScreenProps) {
/>
{emptyState.loading ? (
<View className="mt-4 items-center">
<ActivityIndicator colorClassName="accent-icon-muted" />
<AppActivityIndicator colorClassName="accent-icon-muted" />
</View>
) : null}
</View>
@@ -1,7 +1,8 @@
import type { NativeStackNavigationOptions } from "@react-navigation/native-stack";
import { useEffect, useRef, useState, type ReactNode } from "react";
import { ActivityIndicator, Animated, Platform, Pressable, View } from "react-native";
import { Animated, Platform, Pressable, View } from "react-native";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { SymbolView } from "../../components/AppSymbol";
import { AppText as Text } from "../../components/AppText";
import { useAndroidControlSizing } from "../../components/useAndroidControlSizing";
@@ -134,7 +135,7 @@ export function WorkspaceConnectionTitle(props: {
]}
>
{status.showsProgress ? (
<ActivityIndicator
<AppActivityIndicator
colorClassName={"accent-icon-muted"}
size={Platform.OS === "android" ? Math.round(20 * scale) : "small"}
/>
@@ -1,3 +1,4 @@
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { MaterialListRow } from "../../components/MaterialListRow";
import { SettingsScreen } from "../settings/components/SettingsScreen";
import { ScreenScrollView as ScrollView } from "../../components/ScreenScrollView";
@@ -55,7 +56,7 @@ import {
import { CommonActions, StackActions, useNavigation } from "@react-navigation/native";
import { SymbolView } from "../../components/AppSymbol";
import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
import { Platform, ActivityIndicator, Alert, Pressable, View } from "react-native";
import { Platform, Alert, Pressable, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import * as Arr from "effect/Array";
import * as Cause from "effect/Cause";
@@ -265,7 +266,7 @@ function PrimaryActionButton(props: {
className="h-12 items-center justify-center rounded-full bg-primary active:opacity-70 disabled:opacity-45"
>
{props.loading ? (
<ActivityIndicator colorClassName={String("accent-primary-foreground")} />
<AppActivityIndicator colorClassName={String("accent-primary-foreground")} />
) : (
<Text className="text-base font-t3-bold text-primary-foreground">{props.label}</Text>
)}
@@ -665,7 +666,7 @@ export function AddProjectSourceScreen() {
)}
</ListSection>
{discoveryState.isPending ? (
<ActivityIndicator colorClassName="accent-icon-muted" />
<AppActivityIndicator colorClassName="accent-icon-muted" />
) : null}
</>
) : null}
@@ -918,7 +919,7 @@ function FolderBrowser(props: {
<ListSection>
{fileAccess.isPending || (browseState.isPending && browseState.data === null) ? (
<View className="items-center py-5">
<ActivityIndicator colorClassName="accent-icon-muted" />
<AppActivityIndicator colorClassName="accent-icon-muted" />
</View>
) : null}
{browsePath.canBrowseUp ? (
@@ -1,6 +1,7 @@
import type { EnvironmentId, ThreadId } from "@t3tools/contracts";
import { formatDiffCount } from "@t3tools/client-runtime/diff-count";
import { useNavigation, type StaticScreenProps } from "@react-navigation/native";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { nativeHeaderScrollEdgeEffects } from "../../native/StackHeader";
import { ScreenHeader } from "../../components/ScreenHeader";
import type { ScreenHeaderMenuItem } from "../../components/ScreenHeader.types";
@@ -19,7 +20,6 @@ import {
useState,
} from "react";
import {
ActivityIndicator,
FlatList,
Platform,
Pressable,
@@ -855,7 +855,7 @@ export function ReviewSheet(props: ReviewSheetProps) {
Platform.OS !== "android" && "border-b border-border bg-card",
)}
>
<ActivityIndicator size="small" />
<AppActivityIndicator size="small" />
<Text className="text-xs text-foreground-muted">Loading diff…</Text>
</View>
) : parsedDiff.kind === "empty" ? (
@@ -1,9 +1,10 @@
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { ScreenScrollView as ScrollView } from "../../components/ScreenScrollView";
import { useAtomSet, useAtomValue } from "@effect/atom-react";
import { type EnvironmentMachineKind, resolveEnvironmentMachineKind } from "@t3tools/contracts";
import { AsyncResult } from "effect/reactivity";
import { useMemo } from "react";
import { ActivityIndicator, Alert, Pressable, View } from "react-native";
import { Alert, Pressable, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { AppText as Text } from "../../components/AppText";
@@ -99,7 +100,7 @@ export function SettingsClientStorageRouteScreen() {
</View>
) : !summary ? (
<View className="items-center gap-3 px-6 py-8">
<ActivityIndicator />
<AppActivityIndicator />
<Text className="text-center text-sm text-foreground-muted">
Inspecting cached data…
</Text>
@@ -1,6 +1,7 @@
import type { ComponentProps } from "react";
import { ActivityIndicator, Platform, Pressable } from "react-native";
import { Platform, Pressable } from "react-native";
import { AppActivityIndicator } from "../../../components/AppActivityIndicator";
import { SymbolView } from "../../../components/AppSymbol";
import { AppText as Text } from "../../../components/AppText";
import { MaterialListRow } from "../../../components/MaterialListRow";
@@ -26,7 +27,9 @@ export function SettingsActionRow(props: {
weight="regular"
/>
);
const spinner = props.loading ? <ActivityIndicator colorClassName={iconColorClassName} /> : null;
const spinner = props.loading ? (
<AppActivityIndicator colorClassName={iconColorClassName} />
) : null;
if (Platform.OS === "android") {
return (
@@ -1,8 +1,9 @@
import { type NavigationProp, type ParamListBase, useNavigation } from "@react-navigation/native";
import { useCallback, useLayoutEffect, useState } from "react";
import { ActivityIndicator, Linking, Pressable, View } from "react-native";
import { Linking, Pressable, View } from "react-native";
import { WebView } from "react-native-webview";
import { AppActivityIndicator } from "../../../components/AppActivityIndicator";
import { AppText as Text } from "../../../components/AppText";
import { LoadingStrip } from "../../../components/LoadingStrip";
import { SymbolView } from "../../../components/AppSymbol";
@@ -172,7 +173,7 @@ export function SettingsLegalDocumentRouteScreen({
}}
renderLoading={() => (
<View className="absolute inset-0 items-center justify-center bg-sheet">
<ActivityIndicator />
<AppActivityIndicator />
</View>
)}
style={{ flex: 1, backgroundColor: "transparent" }}
@@ -1,8 +1,9 @@
import * as Haptics from "expo-haptics";
import { GlassView } from "expo-glass-effect";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { SymbolView } from "../../components/AppSymbol";
import { useCallback, useEffect, useRef } from "react";
import { ActivityIndicator, Pressable, StyleSheet, useColorScheme, View } from "react-native";
import { Pressable, StyleSheet, useColorScheme, View } from "react-native";
import Animated, { FadeIn, FadeOut, LinearTransition } from "react-native-reanimated";
import { useSafeAreaInsets } from "react-native-safe-area-context";
@@ -158,7 +159,7 @@ function OverlayContent(props: { readonly progress: GitActionProgress }) {
function OverlayIcon(props: { readonly phase: GitActionProgress["phase"] }) {
switch (props.phase) {
case "running":
return <ActivityIndicator size="small" colorClassName={"accent-icon"} />;
return <AppActivityIndicator size="small" colorClassName={"accent-icon"} />;
case "success":
return (
<View className="h-6 w-6 items-center justify-center rounded-full bg-green-500">
@@ -1,3 +1,4 @@
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { MaterialListRow } from "../../components/MaterialListRow";
import type { EnvironmentProject } from "@t3tools/client-runtime/state/shell";
import { shouldCheckoutNewTaskBranch } from "./new-task-context-presentation";
@@ -11,15 +12,7 @@ import {
import * as Haptics from "expo-haptics";
import { useNavigation } from "@react-navigation/native";
import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
import {
ActivityIndicator,
Alert,
Platform,
Pressable,
ScrollView,
TextInput,
View,
} from "react-native";
import { Alert, Platform, Pressable, ScrollView, TextInput, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { AndroidScreenHeader } from "../../components/AndroidScreenHeader";
@@ -486,7 +479,7 @@ export function BranchPickerScreen(props: {
: 0,
}}
>
{props.loading ? <ActivityIndicator /> : null}
{props.loading ? <AppActivityIndicator /> : null}
<Text className="text-center text-sm text-foreground-muted">
{props.loading
? "Loading branches…"
@@ -525,7 +518,7 @@ export function BranchPickerScreen(props: {
ListFooterComponent={
props.refreshing ? (
<View className="items-center py-4">
<ActivityIndicator />
<AppActivityIndicator />
</View>
) : null
}
@@ -1,3 +1,4 @@
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { MaterialListRow } from "../../components/MaterialListRow";
import { ScreenHeader } from "../../components/ScreenHeader";
import {
@@ -15,7 +16,7 @@ import {
} from "@t3tools/client-runtime/state/runtime";
import type { EnvironmentProject } from "@t3tools/client-runtime/state/shell";
import { useEffect, useRef, useState } from "react";
import { ActivityIndicator, Alert, Platform, Pressable, View } from "react-native";
import { Alert, Platform, Pressable, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { cn } from "../../lib/cn";
import { MaterialScreenContent } from "../../components/MaterialScreenContent";
@@ -369,7 +370,7 @@ export function NewTaskRouteScreen({ route }: StaticScreenProps<NewTaskRoutePara
)}
>
{projectEmptyState.loading ? (
<ActivityIndicator colorClassName="accent-icon-muted" />
<AppActivityIndicator colorClassName="accent-icon-muted" />
) : null}
<Text className="text-center text-lg font-t3-bold text-foreground">
{projectEmptyState.title}
@@ -1,6 +1,7 @@
import { ThreadContextDivider } from "./thread-context-divider";
import { ThreadHandoffRow } from "./thread-handoff-row";
import { SecretRequestCard } from "./SecretRequestCard";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import {
WorktreeWorkingHeader,
WorktreeSetupCard,
@@ -79,7 +80,6 @@ import {
type PartialMarkdownTheme,
} from "react-native-nitro-markdown";
import {
ActivityIndicator,
Alert,
Image,
Platform,
@@ -378,7 +378,7 @@ function AssistantForkButton(props: {
className="h-7 w-7 items-center justify-center disabled:opacity-40"
>
{busy ? (
<ActivityIndicator size="small" />
<AppActivityIndicator size="small" />
) : (
<SymbolView
name="arrow.triangle.branch"
@@ -416,7 +416,7 @@ function MessageAttachmentImage(props: {
if (uri === null) {
return (
<View className={`${props.className} items-center justify-center`}>
<ActivityIndicator />
<AppActivityIndicator />
</View>
);
}
@@ -630,7 +630,7 @@ function MessageAttachmentFile(props: {
>
<View className="h-12 w-10 shrink-0 items-center justify-center rounded-lg bg-subtle">
{opening ? (
<ActivityIndicator size="small" />
<AppActivityIndicator size="small" />
) : (
<PierreEntryIcon path={attachment.name} kind="file" size={26} />
)}
@@ -3310,7 +3310,7 @@ function ThreadFeedLoadEarlierControl(props: ThreadFeedHistoryControls) {
className="min-h-9 flex-row items-center justify-center gap-2 rounded-full border border-border/60 bg-surface/80 px-4 py-2 disabled:opacity-50"
>
{props.loading ? (
<ActivityIndicator size="small" color={accentColor} />
<AppActivityIndicator size="small" color={accentColor} />
) : (
<SymbolView name="chevron.up" size={12} tintColor={accentColor} type="monochrome" />
)}
@@ -1,14 +1,8 @@
import type { AssetResource, EnvironmentId } from "@t3tools/contracts";
import { createContext, useContext, useEffect, useId, useState } from "react";
import {
ActivityIndicator,
Image,
Pressable,
StyleSheet,
View,
type ViewStyle,
} from "react-native";
import { Image, Pressable, StyleSheet, View, type ViewStyle } from "react-native";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { AppText as Text } from "../../components/AppText";
import type { FilePreviewSource } from "../../components/FilePreviewModal";
import { MediaActionsMenu } from "../../components/MediaActionsMenu";
@@ -96,7 +90,7 @@ export function ThreadMarkdownImageView(props: {
{failed ? (
<Text className="text-xs text-foreground-muted">Image unavailable</Text>
) : (
<ActivityIndicator />
<AppActivityIndicator />
)}
</Pressable>
</MediaActionsMenu>
@@ -3,7 +3,6 @@ import { formatDuration } from "@t3tools/shared/orchestrationTiming";
import { GlassContainer, GlassView } from "expo-glass-effect";
import { type ReactNode, useEffect, useRef, useState } from "react";
import {
ActivityIndicator,
type LayoutChangeEvent,
Pressable,
Text as SystemText,
@@ -22,6 +21,7 @@ import Animated, {
} from "react-native-reanimated";
import { withUniwind } from "uniwind";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { AppText as Text } from "../../components/AppText";
import { SymbolView } from "../../components/AppSymbol";
import { ControlPill } from "../../components/ControlPill";
@@ -364,7 +364,7 @@ function FloatingStatusLabel(props: {
className="gap-2"
onLayout={props.onLayout}
>
<ActivityIndicator size="small" colorClassName="accent-icon-muted" />
<AppActivityIndicator size="small" colorClassName="accent-icon-muted" />
<Text className="shrink font-t3-medium text-xs text-foreground" numberOfLines={1}>
{props.status.label}
</Text>
@@ -402,7 +402,7 @@ function FloatingStatusLabel(props: {
onPress={props.status.onPress}
>
{props.status.tone === "reconnecting" ? (
<ActivityIndicator size="small" colorClassName="accent-icon-muted" />
<AppActivityIndicator size="small" colorClassName="accent-icon-muted" />
) : (
<View className="h-2 w-2 rounded-full bg-red-500" />
)}
@@ -6,8 +6,9 @@ import {
import { worktreeSetupAgentStarted } from "@t3tools/client-runtime/worktree-setup";
import { formatDuration } from "@t3tools/shared/orchestrationTiming";
import { useEffect, useState } from "react";
import { ActivityIndicator, AppState, Pressable, ScrollView, View } from "react-native";
import { AppState, Platform, Pressable, ScrollView, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { AppText as Text } from "../../components/AppText";
import { SymbolView, type AppSymbolName } from "../../components/AppSymbol";
import { WorktreeSetupSheet } from "./worktree-setup-sheet";
@@ -97,10 +98,14 @@ export function WorktreeSetupCard(props: WorktreeSetupCardProps) {
}
>
{backgroundSetup ? (
<ActivityIndicator
size="small"
<AppActivityIndicator
size={Platform.OS === "android" ? 12 : "small"}
colorClassName="accent-icon-muted"
style={{ width: 12, height: 12, transform: [{ scale: 0.65 }] }}
style={{
width: 12,
height: 12,
transform: Platform.OS === "android" ? undefined : [{ scale: 0.65 }],
}}
/>
) : failed ? (
<SymbolView
@@ -302,7 +307,7 @@ function StageRow({
>
<View className="w-6 items-center">
{stage.status === "running" && animate ? (
<ActivityIndicator
<AppActivityIndicator
size="small"
colorClassName="accent-icon-muted"
style={{ transform: [{ scale: 0.75 }] }}
@@ -1,7 +1,6 @@
import type { VoiceInputPhase, VoiceInputState } from "@t3tools/client-runtime/voice-input";
import { memo, useCallback, useLayoutEffect, useState, type ReactNode } from "react";
import {
ActivityIndicator,
Linking,
Platform,
Pressable,
@@ -20,6 +19,7 @@ import Animated, {
type SharedValue,
} from "react-native-reanimated";
import { AppActivityIndicator } from "../../components/AppActivityIndicator";
import { AppText as Text } from "../../components/AppText";
import { SymbolView, type AppSymbolName } from "../../components/AppSymbol";
import { cn } from "../../lib/cn";
@@ -304,7 +304,7 @@ function VoiceActionButton(props: {
) : null}
<View className="absolute inset-0 items-center justify-center">
{props.loading ? (
<ActivityIndicator size="small" colorClassName="accent-icon-muted" />
<AppActivityIndicator size="small" colorClassName="accent-icon-muted" />
) : (
<SymbolView
name={props.icon}