Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions apps/mobile/src/components/ui/NumberField.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import { Button, HStack, Picker, Popover, Text, VStack } from "@expo/ui/swift-ui";
import { Button, HStack, Picker, Popover, Spacer, Text, VStack } from "@expo/ui/swift-ui";
import {
accessibilityLabel,
buttonBorderShape,
buttonStyle,
disabled,
font,
foregroundStyle,
frame,
labelStyle,
padding,
pickerStyle,
presentationBackground,
tag,
tint,
} from "@expo/ui/swift-ui/modifiers";
import { useState } from "react";

Expand Down Expand Up @@ -71,19 +74,33 @@ export function NumberField(props: NumberFieldProps) {
</Text>
))}
</Picker>
<HStack spacing={24}>
<HStack>
<Button
label="Cancel"
systemImage="xmark"
onPress={() => setOpen(false)}
modifiers={[foregroundStyle(colors["--color-primary-text"])]}
modifiers={[
labelStyle("iconOnly"),
buttonStyle("bordered"),
buttonBorderShape("circle"),
tint(colors["--color-foreground"]),
]}
/>
<Spacer />
<Button
label="Done"
systemImage="checkmark"
onPress={() => {
setOpen(false);
if (!props.disabled && draft !== props.value) props.onValueChange(draft);
}}
modifiers={[foregroundStyle(colors["--color-primary-text"])]}
modifiers={[
labelStyle("iconOnly"),
buttonStyle("borderedProminent"),
buttonBorderShape("circle"),
tint(colors["--color-prominent-action"]),
foregroundStyle(colors["--color-prominent-action-foreground"]),
]}
/>
</HStack>
</VStack>
Expand Down
5 changes: 2 additions & 3 deletions apps/mobile/src/components/ui/Sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ export function Sheet(props: SheetProps) {
headerRightBarButtonItems={[
{
type: "button",
title: "Done",
variant: "done",
icon: { name: "xmark", type: "sfSymbol" },
accessibilityLabel: `Close ${props.title}`,
identifier: `app-sheet-done-${screenId}`,
identifier: `app-sheet-close-${screenId}`,
onPress: close,
},
]}
Expand Down
8 changes: 7 additions & 1 deletion apps/mobile/src/features/threads/CustomSnoozeSheet.ios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,13 @@ function SnoozePopoverNavigation(props: {
/>
</Toolbar>
<Toolbar placement="right">
<Toolbar.Button label="Snooze" onPress={props.onSubmit} />
<Toolbar.Button
accessibilityLabel="Snooze"
icon="checkmark"
variant="prominent"
tintColor={colors["--color-prominent-action"]}
onPress={props.onSubmit}
/>
</Toolbar>
<ScrollView
contentInsetAdjustmentBehavior="automatic"
Expand Down
6 changes: 1 addition & 5 deletions apps/mobile/src/features/threads/NewTaskDraftScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1830,11 +1830,7 @@ export function NewTaskDraftScreen(props: {
}}
/>
<Toolbar placement="left">
<Toolbar.Button
accessibilityLabel="Cancel new task"
label="Cancel"
onPress={closeNewTask}
/>
<Toolbar.Button accessibilityLabel="Cancel new task" icon="xmark" onPress={closeNewTask} />
</Toolbar>

{heroViewport}
Expand Down
11 changes: 5 additions & 6 deletions apps/mobile/src/features/threads/ThreadArrangementSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";

import { AppText as Text } from "../../components/ui/AppText";
import { SymbolView } from "../../components/ui/AppSymbol";
import { IconButton } from "../../components/ui/IconButton";
import { scopedThreadKey } from "../../lib/scopedEntities";
import { environmentServerConfigsAtom } from "../../state/server";
import { environmentThreadShells } from "../../state/threads";
Expand Down Expand Up @@ -378,13 +379,11 @@ export function ThreadArrangementSheet(props: { onClose: () => void }) {
>
<View className="flex-row items-center justify-between gap-3 px-5 py-3">
<Text className="flex-1 text-xl font-t3-semibold">Arrange threads</Text>
<Pressable
accessibilityRole="button"
<IconButton
accessibilityLabel="Close arrange threads"
icon="xmark"
onPress={props.onClose}
className="min-h-11 justify-center px-3"
>
<Text className="text-base text-primary-text">Done</Text>
</Pressable>
/>
</View>
<Text className="px-5 pb-3 text-sm text-foreground-muted">
Drag to reorder, pin, or settle. Changes save when you drop.
Expand Down
7 changes: 5 additions & 2 deletions apps/mobile/src/features/threads/ThreadSettingsSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,7 @@ function ThreadSettingsModelsScreen() {
const presentation = useThreadSettingsPickerPresentation();
const navigation = useNavigation<NativeStackNavigationProp<ThreadSettingsPickerStackParams>>();
const usesNativeMailSearchToolbar = useNativeMailSearchToolbar();
const theme = useUniwindTheme();
const hasCustomCatalogFilter = session.providerFilter !== null || session.showLegacy;
const commitAndClose = useCallback(() => {
if (!session.commitPendingModel()) return;
Expand Down Expand Up @@ -1396,14 +1397,16 @@ function ThreadSettingsModelsScreen() {
<Toolbar placement="left">
<Toolbar.Button
accessibilityLabel="Cancel thread settings"
label="Cancel"
icon="xmark"
onPress={presentation.onClose}
/>
</Toolbar>
<Toolbar placement="right">
<Toolbar.Button
accessibilityLabel={session.pendingModel ? "Save thread settings" : "Done"}
label={session.pendingModel ? "Save" : "Done"}
icon="checkmark"
variant="prominent"
tintColor={theme["--color-prominent-action"]}
onPress={commitAndClose}
/>
</Toolbar>
Expand Down
16 changes: 4 additions & 12 deletions apps/mobile/src/features/threads/worktree-setup-sheet.android.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Host, ModalBottomSheet, RNHostView } from "@expo/ui/jetpack-compose";
import { Pressable, View, useWindowDimensions } from "react-native";
import { View, useWindowDimensions } from "react-native";
import { withUniwind } from "uniwind";
import { AndroidSheetHeader } from "../../components/ui/AndroidScreenHeader";
import { AppText as Text } from "../../components/ui/AppText";
import type { WorktreeSetupSheetProps } from "./worktree-setup-sheet";

const NativeBottomSheet = withUniwind(ModalBottomSheet, {
Expand All @@ -27,16 +26,9 @@ export function WorktreeSetupSheet({ children, height, onClose }: WorktreeSetupS
>
<AndroidSheetHeader
title="Worktree setup"
trailing={
<Pressable
accessibilityRole="button"
accessibilityLabel="Close setup details"
onPress={onClose}
className="min-h-11 justify-center px-2"
>
<Text className="font-t3-medium text-sm text-foreground">Done</Text>
</Pressable>
}
actions={[
{ accessibilityLabel: "Close setup details", icon: "xmark", onPress: onClose },
]}
/>
{children}
</View>
Expand Down
2 changes: 1 addition & 1 deletion docs/user/thread-sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ spot where the thread will land. Drops into either section keep the position you
mobile, open a thread's menu and choose **Arrange threads**. Drag a handle within or between
**Pinned** and **Active** to reorder, pin, or unpin. Drop onto the **Settled** divider to
settle a thread. The dragged card shows the action before you release it. Expand **Snoozed**
or **Settled** to drag a parked thread back into either live section. Each drop saves; **Done** returns to the thread list.
or **Settled** to drag a parked thread back into either live section. Each drop saves; close the sheet to return to the thread list.
**Move up** and **Move down** are also available in the thread menu. The server
saves the order, so it survives a refresh and appears on your other connected devices.

Expand Down
Loading