Skip to content

Extract shared sign-policy option row and fix doubled card border #403

Description

@kwsantiago

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.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions