diff --git a/apps/mobile/src/components/AndroidScreenHeader.tsx b/apps/mobile/src/components/AndroidScreenHeader.tsx
index 1ae2464e0a77..dbdab5b184fd 100644
--- a/apps/mobile/src/components/AndroidScreenHeader.tsx
+++ b/apps/mobile/src/components/AndroidScreenHeader.tsx
@@ -4,7 +4,7 @@ import { ActivityIndicator, View } from "react-native";
import type { AppSymbolName } from "./AppSymbol";
import { AppText as Text } from "./AppText";
import { cn } from "../lib/cn";
-import { MaterialIconButton } from "./MaterialIconButton";
+import { IconButton } from "./IconButton";
import { AndroidAnchoredMenu } from "./AndroidAnchoredMenu";
import { splitAndroidHeaderActions } from "./headerMenu.android";
import { useScaledTextRole } from "../features/settings/appearance/useScaledTextRole";
@@ -28,7 +28,7 @@ export function AndroidHeaderIconButton(props: {
readonly disabled?: boolean;
readonly selected?: boolean;
}) {
- return ;
+ return ;
}
export function AndroidScreenHeader(props: {
@@ -64,7 +64,7 @@ export function AndroidScreenHeader(props: {
>
{props.onBack ? (
-
{(open) => (
- void;
- readonly disabled?: boolean;
- readonly selected?: boolean;
- readonly variant?: "standard" | "primary" | "tonal" | "danger";
- readonly tintColorClassName?: string;
-}) {
+export function IconButton(props: IconButtonProps) {
const { colors } = useControlTheme();
const { iconSize, buttonSize } = useAndroidControlSizing();
const variant = props.variant ?? "standard";
const Component =
variant === "standard"
- ? IconButton
+ ? ComposeIconButton
: variant === "tonal"
? FilledTonalIconButton
: FilledIconButton;
diff --git a/apps/mobile/src/components/MaterialIconButton.tsx b/apps/mobile/src/components/IconButton.tsx
similarity index 77%
rename from apps/mobile/src/components/MaterialIconButton.tsx
rename to apps/mobile/src/components/IconButton.tsx
index a788fdd5ea35..af5fc634fdab 100644
--- a/apps/mobile/src/components/MaterialIconButton.tsx
+++ b/apps/mobile/src/components/IconButton.tsx
@@ -1,7 +1,8 @@
+import type { IconButtonProps } from "./IconButton.types";
import { cn } from "../lib/cn";
import { Pressable } from "react-native";
-import { SymbolView, type AppSymbolName } from "./AppSymbol";
+import { SymbolView } from "./AppSymbol";
const VARIANT_CLASS_NAMES = {
standard: ["", "accent-foreground"],
@@ -10,15 +11,7 @@ const VARIANT_CLASS_NAMES = {
tonal: ["rounded-full bg-secondary", "accent-secondary-foreground"],
} as const;
-export function MaterialIconButton(props: {
- readonly accessibilityLabel: string;
- readonly icon: AppSymbolName;
- readonly onPress?: () => void;
- readonly disabled?: boolean;
- readonly selected?: boolean;
- readonly variant?: "standard" | "primary" | "tonal" | "danger";
- readonly tintColorClassName?: string;
-}) {
+export function IconButton(props: IconButtonProps) {
const variant = props.variant ?? "standard";
const [containerClassName, iconTintClassName] = VARIANT_CLASS_NAMES[variant];
return (
diff --git a/apps/mobile/src/components/IconButton.types.ts b/apps/mobile/src/components/IconButton.types.ts
new file mode 100644
index 000000000000..df5c3124a362
--- /dev/null
+++ b/apps/mobile/src/components/IconButton.types.ts
@@ -0,0 +1,11 @@
+import type { AppSymbolName } from "./AppSymbol";
+
+export interface IconButtonProps {
+ readonly accessibilityLabel: string;
+ readonly icon: AppSymbolName;
+ readonly onPress?: () => void;
+ readonly disabled?: boolean;
+ readonly selected?: boolean;
+ readonly variant?: "standard" | "primary" | "tonal" | "danger";
+ readonly tintColorClassName?: string;
+}
diff --git a/apps/mobile/src/components/NumberField.android.tsx b/apps/mobile/src/components/NumberField.android.tsx
index 23095ee862fb..1a4f9b750bbb 100644
--- a/apps/mobile/src/components/NumberField.android.tsx
+++ b/apps/mobile/src/components/NumberField.android.tsx
@@ -1,7 +1,7 @@
import { View } from "react-native";
import { AppText } from "./AppText";
-import { MaterialIconButton } from "./MaterialIconButton";
+import { IconButton } from "./IconButton";
import type { NumberFieldProps } from "./NumberField";
export function NumberField(props: NumberFieldProps) {
@@ -19,7 +19,7 @@ export function NumberField(props: NumberFieldProps) {
className="absolute inset-x-0 rounded-full bg-subtle"
style={{ height: 32 }}
/>
-
{props.value}
- = props.max}
diff --git a/apps/mobile/src/components/ScreenHeader.android.tsx b/apps/mobile/src/components/ScreenHeader.android.tsx
index 333afbce7ccc..42620d39aa3c 100644
--- a/apps/mobile/src/components/ScreenHeader.android.tsx
+++ b/apps/mobile/src/components/ScreenHeader.android.tsx
@@ -15,7 +15,7 @@ import { AndroidScreenHeader } from "./AndroidScreenHeader";
import { ScreenHeaderButton } from "./ScreenHeaderButton.android";
import { SymbolView } from "./AppSymbol";
import { ControlPillMenu } from "./ControlPill";
-import { MaterialSearchField } from "./MaterialSearchField";
+import { SearchField } from "./SearchField";
import { androidHeaderMenuActions, findHeaderMenuAction } from "./headerMenu.android";
import type { ScreenHeaderProps } from "./ScreenHeader.types";
import { useAndroidControlSizing } from "./useAndroidControlSizing";
@@ -208,7 +208,7 @@ export function ScreenHeader(props: ScreenHeaderProps) {
icon="arrow.left"
onPress={closeSearch}
/>
- ;
readonly accessibilityLabel: string;
@@ -20,7 +12,17 @@ export function MaterialSearchField({
readonly placeholder: string;
readonly value: string;
readonly onChangeText: (value: string) => void;
-}) {
+}
+
+export function SearchField({
+ inputRef,
+ autoFocus = true,
+ accessibilityLabel,
+ clearAccessibilityLabel,
+ placeholder,
+ value,
+ onChangeText,
+}: SearchFieldProps) {
const { scale, mediumIconSize } = useAndroidControlSizing();
return (
)}
- props.onReconnect(props.environment.environmentId)}
/>
-
-
-
- agent.select(nativeEvent.event)}
>
-
) : null}
-
+
diff --git a/apps/mobile/src/features/pull-requests/PullRequestFiles.tsx b/apps/mobile/src/features/pull-requests/PullRequestFiles.tsx
index 1724bd0d8dff..432bc83a3c92 100644
--- a/apps/mobile/src/features/pull-requests/PullRequestFiles.tsx
+++ b/apps/mobile/src/features/pull-requests/PullRequestFiles.tsx
@@ -9,7 +9,7 @@ import { AppText as Text } from "../../components/AppText";
import { EmptyState } from "../../components/EmptyState";
import { ControlPillMenu } from "../../components/ControlPillMenu";
import { Button } from "../../components/Button";
-import { MaterialIconButton } from "../../components/MaterialIconButton";
+import { IconButton } from "../../components/IconButton";
import { SymbolView } from "../../components/AppSymbol";
import { PierreEntryIcon } from "../../components/PierreEntryIcon";
import { composerPullRequests } from "../../state/pull-requests";
@@ -228,7 +228,7 @@ export function usePullRequestFilesContent(props: {
onPressAction={filter.toggle}
>
-
{Platform.OS === "android" ? (
-
-
+
}
diff --git a/apps/mobile/src/features/pull-requests/PullRequestSheetContent.tsx b/apps/mobile/src/features/pull-requests/PullRequestSheetContent.tsx
index fc53e9b4f36d..d8edc6ea4fe2 100644
--- a/apps/mobile/src/features/pull-requests/PullRequestSheetContent.tsx
+++ b/apps/mobile/src/features/pull-requests/PullRequestSheetContent.tsx
@@ -5,7 +5,7 @@ import { KeyboardAvoidingView } from "react-native-keyboard-controller";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { AppText as Text } from "../../components/AppText";
import { AndroidSheetHeader } from "../../components/AndroidScreenHeader";
-import { MaterialIconButton } from "../../components/MaterialIconButton";
+import { IconButton } from "../../components/IconButton";
import { MaterialScreenContent } from "../../components/MaterialScreenContent";
import { ControlPill } from "../../components/ControlPill";
import { NativeStackScreenOptions } from "../../native/StackHeader";
@@ -41,7 +41,7 @@ export function PullRequestSheetContent(props: {
subtitle={props.subtitle}
hideBottomBorder
leading={
- setCodeWordBreak(!appearance.codeWordBreak)}
>
-
+
}
diff --git a/apps/mobile/src/features/terminal/ThreadTerminalRouteScreen.tsx b/apps/mobile/src/features/terminal/ThreadTerminalRouteScreen.tsx
index 61c3a9f5d317..02faf9435040 100644
--- a/apps/mobile/src/features/terminal/ThreadTerminalRouteScreen.tsx
+++ b/apps/mobile/src/features/terminal/ThreadTerminalRouteScreen.tsx
@@ -36,7 +36,7 @@ import { GlassSurface } from "../../components/GlassSurface";
import { LoadingScreen } from "../../components/LoadingScreen";
import { MaterialScreenContent } from "../../components/MaterialScreenContent";
import { Button } from "../../components/Button";
-import { MaterialIconButton } from "../../components/MaterialIconButton";
+import { IconButton } from "../../components/IconButton";
import { environmentCatalog } from "../../connection/catalog";
import { useEnvironmentPresentation } from "../../state/presentation";
import { terminalEnvironment } from "../../state/terminal";
@@ -1303,7 +1303,7 @@ export function ThreadTerminalRouteScreen(props: ThreadTerminalRouteScreenProps)
/>
) : null}
-
{session.searchQuery.length > 0 ? (
- session.setSearchQuery("")}
@@ -1354,7 +1354,7 @@ function ThreadSettingsModelsScreen() {
}}
>
{(open) => (
-