Settings: fix profile-photo blurb clipping + HRV-window label truncation#203
Merged
Conversation
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.
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.)
Owner
Author
|
Added the Android parity line: the HRV-window pill label |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Platform.deviceNounPhrase(itself an already-resolved localizedString) into theblurb:LocalizedStringKeyliteral 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 throughString(localized:)first, then hand SwiftUI the plainStringviaLocalizedStringKey(_:). 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."Night"String Catalog entry (de/es/fr/it/pt/zh).Scope / validation
Night → Nacht).SettingsView.swift— has no default CI).Supersedes the settings portion of #153.