From d6d3db03868d819f5c04c616ff61e228a37a1f4a Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 21 Oct 2026 12:22:52 +0000 Subject: [PATCH] fix(mobile): cap header glass button symbols at xxxLarge Dynamic Type Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_012p4JA6z94Erp3Jy4JciiuD --- apps/mobile/DESIGN.md | 2 +- apps/mobile/src/ui/shell/header-action.ios.tsx | 2 ++ apps/mobile/test/header-action.test.tsx | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/mobile/DESIGN.md b/apps/mobile/DESIGN.md index 8a16f08d17..77a082dc84 100644 --- a/apps/mobile/DESIGN.md +++ b/apps/mobile/DESIGN.md @@ -98,7 +98,7 @@ The shell is set by [ADR-0211](../../docs/adr/0211-the-mobile-app-has-two-tabs-w - **Chats** shows the current Host: - Conversation rows keep the title and timestamp on one horizontal line at every system text size. The title takes the remaining width and truncates with tail ellipsis; the timestamp keeps its own single-line slot. Preview/status and count stay on a second line. A conversation without a timestamp does not reserve an empty metadata line. Preserve native font scaling and the complete accessible title/preview. - - The header has a compact Host title on the left and a Settings gear on the right, on both iOS and Android. Search and Settings are `HeaderAction` buttons, native to each platform: on iOS 26 and later they are SwiftUI Liquid Glass circles (`buttonStyle('glass')`) with SF Symbols (`magnifyingglass`, `gearshape`), so the system supplies the press, Reduce Transparency and Increase Contrast looks; earlier iOS keeps the opaque `raised` circles. Android uses Material 3 standard icon buttons: no container, a 40dp circular ripple (`materialIconButton.container`) inside the 48dp touch target, like the actions of a Material top app bar. The Android search back and clear buttons use the same icon button. This row stays horizontal at every system text size: the Host chip shrinks, its name occupies one line with tail ellipsis, and the Settings target stays at the trailing edge. Keep native font scaling and the full accessible Host name; both targets retain the platform minimum touch size. Other Host-name presentations may wrap. The Host picker stays mounted between visits; its translation follows a critically damped UI-thread spring and its scrim is clamped. Hidden contents leave the accessibility tree. + - The header has a compact Host title on the left and a Settings gear on the right, on both iOS and Android. Search and Settings are `HeaderAction` buttons, native to each platform: on iOS 26 and later they are SwiftUI Liquid Glass circles (`buttonStyle('glass')`) with SF Symbols (`magnifyingglass`, `gearshape`), so the system supplies the press, Reduce Transparency and Increase Contrast looks. The symbol follows Dynamic Type only up to `xxxLarge`, as system toolbar symbols do, so at accessibility sizes it stays inside its fixed glass circle while the button keeps its label; earlier iOS keeps the opaque `raised` circles. Android uses Material 3 standard icon buttons: no container, a 40dp circular ripple (`materialIconButton.container`) inside the 48dp touch target, like the actions of a Material top app bar. The Android search back and clear buttons use the same icon button. This row stays horizontal at every system text size: the Host chip shrinks, its name occupies one line with tail ellipsis, and the Settings target stays at the trailing edge. Keep native font scaling and the full accessible Host name; both targets retain the platform minimum touch size. Other Host-name presentations may wrap. The Host picker stays mounted between visits; its translation follows a critically damped UI-thread spring and its scrim is clamped. Hidden contents leave the accessibility tree. - **+** is the circle beside the bottom navigation island. It opens the native **New PersonaBot** / **New Channel** menu and uses the app's create flow, or the full client where the app has none yet. - **Search** is a magnifying-glass button just left of the Settings gear. Tapping it turns the whole header row into the search field and hides the Host title and Settings, as a Material top app bar opens its search and as iOS expands a toolbar search from its button. The field is the shared navigation glass capsule (`DrawerMaterial`; opaque raised on older iOS, Reduce Transparency and Android) and focuses at once. iOS closes it with the native circular close button at the trailing end and keeps the system clear button inside the field. Android leads with a back arrow, adds its own clear button while there is a query, and system Back closes search. Closing clears the query and restores the title and Settings. Ending editing with an empty query closes search; with a query, the field stays in the header so the filtered list keeps showing what it matches. Navigation stays visible while the field is focused or holds a query. Nothing floats above the bottom navigation, and the list reserves only the navigation's height. There are no shortcut cards: Activity already gathers what needs the Human. - On Android, swiping a Computer conversation row left reveals Material 3 list actions as 56dp icon buttons with 16dp corners: Mute or Unmute (on this computer), Pin or Unpin, and, when it has unread messages, Mark as read as the end-aligned primary action in the accent colour. They use the existing Host methods (`channelMuteSet`, `rosterBatch`, `channelMarkRead`; CLI `channel-mute`, `roster-batch`, `channel-mark-read`). The same actions are accessibility actions on the row, so TalkBack reaches them without the swipe. Cloud rows have no swipe actions yet. A full swipe does not trigger an action. diff --git a/apps/mobile/src/ui/shell/header-action.ios.tsx b/apps/mobile/src/ui/shell/header-action.ios.tsx index c45bb817fb..f44ef6e358 100644 --- a/apps/mobile/src/ui/shell/header-action.ios.tsx +++ b/apps/mobile/src/ui/shell/header-action.ios.tsx @@ -4,6 +4,7 @@ import { accessibilityLabel, buttonBorderShape, buttonStyle, + dynamicTypeSize, font, foregroundStyle, frame, @@ -50,6 +51,7 @@ export function HeaderAction({ icon, label, testID, active = false, onPress }: H systemName={symbols[icon]} modifiers={[ font({ textStyle: 'body', weight: 'medium' }), + dynamicTypeSize({ max: 'xxxLarge' }), frame({ width: theme.touch - space.x5, height: theme.touch - space.x5 }), ]} /> diff --git a/apps/mobile/test/header-action.test.tsx b/apps/mobile/test/header-action.test.tsx index 254e46b61b..749a7419f6 100644 --- a/apps/mobile/test/header-action.test.tsx +++ b/apps/mobile/test/header-action.test.tsx @@ -12,6 +12,7 @@ vi.mock('@expo/ui/swift-ui/modifiers', () => ({ accessibilityAddTraits: (traits: string[]) => ({ $type: 'accessibilityAddTraits', traits }), buttonStyle: (style: string) => ({ $type: 'buttonStyle', style }), buttonBorderShape: () => ({}), + dynamicTypeSize: () => ({}), font: () => ({}), foregroundStyle: () => ({}), frame: () => ({}),