Skip to content

Commit 35df3e2

Browse files
fix(mobile): Microphone and Scheduled tasks rows use the shared row styles
Microphone rows now render ListRowLayout, and Scheduled tasks rows take its body labels and footnote values instead of oversized headline text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent feb3fa6 commit 35df3e2

3 files changed

Lines changed: 49 additions & 34 deletions

File tree

‎apps/mobile/src/Stack.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ const SETTINGS_SCREENS = {
393393
linking: "settings/scheduled-tasks",
394394
options: {
395395
...SETTINGS_PAGE_OPTIONS,
396-
title: "Scheduled Tasks",
396+
title: "Scheduled tasks",
397397
headerTitleStyle: { fontSize: 16, fontWeight: "800" },
398398
},
399399
}),

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

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
microphoneOrder,
2020
} from "../../lib/microphonePriority";
2121
import { mobilePreferencesAtom, updateMobilePreferencesAtom } from "../../state/preferences";
22+
import { ListRowLayout } from "../../components/ui/ListRowLayout";
2223
import { SettingsActionRow } from "./components/SettingsActionRow";
2324
import { SettingsDragHandle } from "./components/SettingsDragHandle";
2425
import { SettingsSection } from "./components/SettingsSection";
@@ -252,10 +253,9 @@ function MicrophoneRow(props: {
252253
style={style}
253254
onLayout={(event) => props.onHeight(event.nativeEvent.layout.height)}
254255
className={cn(
255-
"flex-row items-center gap-4 pl-4",
256+
"flex-row items-center",
256257
props.position > 1 && !lifted && "border-t border-border-subtle",
257258
lifted && "bg-grouped-card shadow-md",
258-
!props.reorderable && "pr-4",
259259
)}
260260
>
261261
{props.editing && props.onForget ? (
@@ -264,7 +264,7 @@ function MicrophoneRow(props: {
264264
accessibilityLabel={`Forget ${title}`}
265265
hitSlop={8}
266266
onPress={props.onForget}
267-
className="active:opacity-70"
267+
className="pl-4 active:opacity-70"
268268
>
269269
<SymbolView
270270
name="xmark.circle.fill"
@@ -274,28 +274,20 @@ function MicrophoneRow(props: {
274274
/>
275275
</Pressable>
276276
) : props.editing ? (
277-
<View style={{ width: REMOVE_SIZE }} />
277+
<View className="pl-4">
278+
<View style={{ width: REMOVE_SIZE }} />
279+
</View>
278280
) : null}
279281
<View
280282
accessible
281283
accessibilityLabel={`${title}, ${kind.label}, ${props.position} of ${props.count}`}
282-
className="min-w-0 flex-1 flex-row items-center gap-4 py-4"
284+
className="min-w-0 flex-1"
283285
>
284-
<SymbolView
285-
name={kind.icon}
286-
size={22}
287-
tintColorClassName="accent-icon"
288-
type="monochrome"
289-
weight="regular"
286+
<ListRowLayout
287+
icon={kind.icon}
288+
label={title}
289+
description={isMicrophoneDevice(entry) ? kind.label : kind.rowDescription}
290290
/>
291-
<View className="min-w-0 flex-1 gap-0.5">
292-
<Text numberOfLines={1} className="text-lg text-foreground">
293-
{title}
294-
</Text>
295-
<Text numberOfLines={1} className="text-sm text-foreground-muted">
296-
{isMicrophoneDevice(entry) ? kind.label : kind.rowDescription}
297-
</Text>
298-
</View>
299291
</View>
300292
{props.reorderable ? (
301293
<SettingsDragHandle

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

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,11 @@ function SelectRow(props: {
186186
const value = (
187187
<View className="min-w-0 flex-1 flex-row items-center justify-end gap-2">
188188
{props.valueIcon}
189-
<Text className="shrink text-right text-base text-foreground-muted" numberOfLines={1}>
189+
<Text
190+
textRole="footnote"
191+
className="shrink text-right text-foreground-muted"
192+
numberOfLines={1}
193+
>
190194
{props.value}
191195
</Text>
192196
</View>
@@ -200,7 +204,9 @@ function SelectRow(props: {
200204
: "min-h-14 flex-row items-center gap-3 px-4 py-3"
201205
}
202206
>
203-
<Text className="text-lg text-foreground">{props.label}</Text>
207+
<Text textRole="body" className="text-foreground">
208+
{props.label}
209+
</Text>
204210
{value}
205211
</View>
206212
);
@@ -219,7 +225,9 @@ function SelectRow(props: {
219225
: "min-h-14 flex-row items-center gap-3 px-4 py-3 active:opacity-70"
220226
}
221227
>
222-
<Text className="text-lg text-foreground">{props.label}</Text>
228+
<Text textRole="body" className="text-foreground">
229+
{props.label}
230+
</Text>
223231
{value}
224232
<SymbolView
225233
name="chevron.down"
@@ -296,7 +304,9 @@ function WebhookFilterRows(props: {
296304
onPress={() => props.onChange([...props.filters, emptyWebhookFilterDraft()])}
297305
className="min-h-14 flex-row items-center gap-3 border-t border-border-subtle px-4 py-3 active:opacity-70"
298306
>
299-
<Text className="min-w-0 flex-1 text-lg text-foreground">Add filter</Text>
307+
<Text textRole="body" className="min-w-0 flex-1 text-foreground">
308+
Add filter
309+
</Text>
300310
<SymbolView name="plus" size={16} tintColorClassName="accent-icon" />
301311
</Pressable>
302312
) : null}
@@ -330,8 +340,14 @@ function PickerRow(props: {
330340
: "min-h-14 flex-row items-center gap-3 px-4 py-3 active:opacity-70 disabled:opacity-50"
331341
}
332342
>
333-
<Text className="text-lg text-foreground">{props.label}</Text>
334-
<Text className="min-w-0 flex-1 text-right text-base text-foreground-muted" numberOfLines={1}>
343+
<Text textRole="body" className="text-foreground">
344+
{props.label}
345+
</Text>
346+
<Text
347+
textRole="footnote"
348+
className="min-w-0 flex-1 text-right text-foreground-muted"
349+
numberOfLines={1}
350+
>
335351
{props.value}
336352
</Text>
337353
<SymbolView
@@ -389,7 +405,7 @@ export function SettingsScheduledTasksRouteScreen() {
389405
]}
390406
/>
391407
<SettingsScreen
392-
title="Scheduled Tasks"
408+
title="Scheduled tasks"
393409
trailing={
394410
<View className="flex-row items-center">
395411
<AndroidSettingsEnvironmentFilter />
@@ -962,8 +978,13 @@ function TaskForm({
962978
onPress={() => setTimePickerOpen((open) => !open)}
963979
className="min-h-14 flex-row items-center gap-3 border-t border-border-subtle px-4 py-3 active:opacity-70"
964980
>
965-
<Text className="text-lg text-foreground">Time</Text>
966-
<Text className="min-w-0 flex-1 text-right text-base text-foreground-muted">
981+
<Text textRole="body" className="text-foreground">
982+
Time
983+
</Text>
984+
<Text
985+
textRole="footnote"
986+
className="min-w-0 flex-1 text-right text-foreground-muted"
987+
>
967988
{formatTime(draft.schedule.timeOfDay)}
968989
</Text>
969990
<SymbolView
@@ -1119,7 +1140,9 @@ function TaskForm({
11191140
</>
11201141
)}
11211142
<View className="min-h-14 flex-row items-center gap-3 border-t border-border-subtle px-4 py-3">
1122-
<Text className="min-w-0 flex-1 text-lg text-foreground">Enabled</Text>
1143+
<Text textRole="body" className="min-w-0 flex-1 text-foreground">
1144+
Enabled
1145+
</Text>
11231146
<ThemedSwitch
11241147
accessibilityLabel="Task enabled"
11251148
value={draft.enabled}
@@ -1185,7 +1208,7 @@ function WebhookScheduleDetails({
11851208
onPress={() => void tryCopyTextWithHaptic(resolved.address)}
11861209
className="gap-1 active:opacity-70"
11871210
>
1188-
<Text className="text-lg text-foreground">
1211+
<Text textRole="body" className="text-foreground">
11891212
{resolved.copyable ? "Webhook URL" : "Webhook path"}
11901213
</Text>
11911214
<Text className="text-sm text-foreground-muted" numberOfLines={2} selectable>
@@ -1310,8 +1333,8 @@ function EnvironmentTasks({
13101333
key={task.id}
13111334
className={
13121335
index === 0
1313-
? "flex-row items-start gap-1 px-4 py-4"
1314-
: "flex-row items-start gap-1 border-t border-border-subtle px-4 py-4"
1336+
? "flex-row items-start gap-1 px-4 py-3"
1337+
: "flex-row items-start gap-1 border-t border-border-subtle px-4 py-3"
13151338
}
13161339
>
13171340
<Pressable
@@ -1322,7 +1345,7 @@ function EnvironmentTasks({
13221345
}}
13231346
className="min-w-0 flex-1 gap-1 active:opacity-70"
13241347
>
1325-
<Text className="text-lg font-t3-medium text-foreground" numberOfLines={1}>
1348+
<Text textRole="body" className="text-foreground" numberOfLines={1}>
13261349
{task.title}
13271350
</Text>
13281351
<Text className="text-sm text-foreground-muted" numberOfLines={2}>

0 commit comments

Comments
 (0)