Skip to content

Comments

refactor: replace Spacer with custom spacers#794

Draft
ovitrif wants to merge 2 commits intomasterfrom
refactor/spacers
Draft

refactor: replace Spacer with custom spacers#794
ovitrif wants to merge 2 commits intomasterfrom
refactor/spacers

Conversation

@ovitrif
Copy link
Collaborator

@ovitrif ovitrif commented Feb 19, 2026

Description

This PR:

  1. Adds a modifier parameter to all custom spacer components in Spacers.ktVerticalSpacer, HorizontalSpacer, FillHeight, FillWidth, StatusBarSpacer, TopBarSpacer
  2. Replaces all raw Spacer(modifier = Modifier.height/width/weight(...)) calls across 110 files with the appropriate semantic component

Each raw call was replaced according to context:

  • Modifier.height(X)VerticalSpacer(X)
  • Modifier.width(X)HorizontalSpacer(X)
  • Modifier.weight(1f) in Column → FillHeight()
  • Modifier.weight(1f) in Row → FillWidth()

Unused androidx.compose.foundation.layout.Spacer, height, and width imports were removed from each modified file. The FillHeight/FillWidth scope constraints (ColumnScope/RowScope) provide compile-time safety — any misidentified context would have caused a build failure.

Preview

N/A — pure refactor, no visual changes.

QA Notes

This is a structural refactor with no behaviour changes. Each custom spacer delegates to the same underlying Spacer with the same modifier. The Kotlin compiler enforces correct scope usage for FillHeight/FillWidth. Manual spot-check recommended on the highest-impact screens:

  1. ExternalConnectionScreen
  2. SendConfirmScreen
  3. ActivityDetailScreen
  4. HomeScreen
  5. ReceiveQrScreen
  6. ReportIssueScreen
  7. SweepSettingsScreen
  8. SavingsProgressScreen
  9. LiquidityScreen
  10. PinBiometricsScreen

For each screen: verify layout, spacing, and alignment look unchanged compared to master.

Automated checks

  • ./gradlew compileDevDebugKotlin — passes
  • ./gradlew detekt — passes (import ordering auto-corrected)
  • ./gradlew testDevDebugUnitTest — 566 pass, 3 pre-existing CurrencyTest failures (locale-sensitive, unrelated to this PR, pass on CI)

ovitrif and others added 2 commits February 17, 2026 21:34
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