Two small presentation issues surfaced while reviewing #395. Neither affects correctness.
Duplicate sign-policy option row
OnboardingScreen.OnboardingPolicyOption and nip55/SignPolicyScreen.SignPolicyOption render the same thing: a selectable card holding a RadioButton, the policy display name, and its description, with a primary-colored border when selected. They have already drifted, the onboarding copy uses KeepCard and Dimens tokens while the settings copy uses a raw Card with hardcoded 2.dp and 12.dp.
Extract a single presentational row composable and have both screens use it.
Important: extract only the row. Do not hoist persistence into the shared component. The two callers have deliberately different semantics:
A shared component that owns the write would push the onboarding defect back into the flow.
Doubled border on selected cards
ui/components/KeepCard.kt unconditionally applies border = BorderStroke(Dimens.cardBorderWidth, MaterialTheme.colorScheme.outline) to its Card. OnboardingPolicyOption then adds its own Modifier.border(...) for the selected state, which paints a second ring outside the card's existing outline.
The selection is still visible and the RadioButton already communicates state, so this is cosmetic. Worth resolving as part of the extraction above, either by giving KeepCard an optional border override or by having the shared row use a raw Card.
Two small presentation issues surfaced while reviewing #395. Neither affects correctness.
Duplicate sign-policy option row
OnboardingScreen.OnboardingPolicyOptionandnip55/SignPolicyScreen.SignPolicyOptionrender the same thing: a selectable card holding aRadioButton, the policy display name, and its description, with a primary-colored border when selected. They have already drifted, the onboarding copy usesKeepCardandDimenstokens while the settings copy uses a rawCardwith hardcoded2.dpand12.dp.Extract a single presentational row composable and have both screens use it.
Important: extract only the row. Do not hoist persistence into the shared component. The two callers have deliberately different semantics:
A shared component that owns the write would push the onboarding defect back into the flow.
Doubled border on selected cards
ui/components/KeepCard.ktunconditionally appliesborder = BorderStroke(Dimens.cardBorderWidth, MaterialTheme.colorScheme.outline)to itsCard.OnboardingPolicyOptionthen adds its ownModifier.border(...)for the selected state, which paints a second ring outside the card's existing outline.The selection is still visible and the
RadioButtonalready communicates state, so this is cosmetic. Worth resolving as part of the extraction above, either by givingKeepCardan optional border override or by having the shared row use a rawCard.