Skip to content

Settings: fix profile-photo blurb clipping + HRV-window label truncation#203

Merged
ryanbr merged 2 commits into
mainfrom
settings-layout-fix
Jul 10, 2026
Merged

Settings: fix profile-photo blurb clipping + HRV-window label truncation#203
ryanbr merged 2 commits into
mainfrom
settings-layout-fix

Conversation

@ryanbr

@ryanbr ryanbr commented Jul 10, 2026

Copy link
Copy Markdown
Owner

The settings-layout part of #153, extracted clean onto current main. #153 bundled ~1000 lines of unrelated HCI-capture tooling (that's #133's scope) plus changes already merged via #187/#192, and it conflicts on exactly those files — so rather than untangle it, this is just the two real Settings fixes:

  • Profile-photo blurb clipped to the card edge. Interpolating Platform.deviceNounPhrase (itself an already-resolved localized String) into the blurb: LocalizedStringKey literal confused SwiftUI's text-measurement pass, so the blurb rendered with zero trailing margin instead of wrapping in the card padding. Fix: resolve the whole sentence through String(localized:) first, then hand SwiftUI the plain String via LocalizedStringKey(_:). The localization key is unchanged (…Stored only on %@…), so all existing translations still apply — no catalog churn. Also drops a stray .frame(maxWidth: .infinity) on the button column.
  • HRV-window picker "Whole night" → "Night" so the two-segment control doesn't truncate once it sizes to the row (some locales' longer translations overflowed), matching the Temperature/Theme pickers. Includes the one new "Night" String Catalog entry (de/es/fr/it/pt/zh).

Scope / validation

  • iOS-only, Settings screen only — no BLE, protocol, analytics, or Android touched.
  • Catalog JSON validated (parses; Night → Nacht).
  • Compile-checked via app-build (app-target Swift — SettingsView.swift — has no default CI).
  • Layout is a visual fix — worth a quick on-device glance (profile-photo card blurb wraps in padding; HRV segments don't truncate), but nothing risky.

Supersedes the settings portion of #153.

Two small Settings layout fixes:

- Profile-photo blurb clipped to the card edge. Interpolating
  `Platform.deviceNounPhrase` (an already-resolved localized String) into
  the `blurb:` `LocalizedStringKey` literal confused SwiftUI's
  text-measurement pass, so the blurb rendered with zero trailing margin
  instead of wrapping inside the card padding. Resolve the whole sentence
  through `String(localized:)` first, then hand SwiftUI the plain String
  via `LocalizedStringKey(_:)`. The localization key is unchanged
  (`…Stored only on %@…`), so existing translations still apply. Also drop
  the stray `.frame(maxWidth: .infinity)` on the button column.
- HRV-window picker: "Whole night" → "Night" so the two-segment control
  doesn't truncate once it sizes to the row (some locales' longer
  translations overflowed), matching the Temperature/Theme pickers. Adds
  the "Night" String Catalog entry (de/es/fr/it/pt/zh).

Extracted from #153 (which bundled unrelated HCI tooling + already-merged
changes); this is the settings-layout part only.
@ryanbr ryanbr mentioned this pull request Jul 10, 2026
12 tasks
Mirror the iOS label change so the HRV-window two-segment control reads the
same word on both platforms. (The blurb-clipping half of #203 is a SwiftUI
text-measurement quirk with no Compose equivalent, so it stays iOS-only.)
@ryanbr

ryanbr commented Jul 10, 2026

Copy link
Copy Markdown
Owner Author

Added the Android parity line: the HRV-window pill label "Whole night""Night" (SettingsScreen.kt) so the control reads the same word on both platforms. Compiles locally (compileFullDebugKotlin). The blurb-clipping fix stays iOS-only — it's a SwiftUI text-measurement quirk with no Compose equivalent.

@ryanbr ryanbr merged commit 312a4b0 into main Jul 10, 2026
@ryanbr ryanbr deleted the settings-layout-fix branch July 10, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant