Overview › Jetpack Compose & UI Layer
Jetpack Compose & UI Layer
Compose adopted in feature modules; legacy Views still present in core flows.
70
SCORE
Summary
Jetpack Compose adoption is significant in feature modules with Material3 and a shared design-token pallet module. However, legacy XML/Views are still present in older flows, and Compose accessibility is essentially absent (covered separately).
Findings
PASS
Material3 + design tokens
Material3 1.4.0 with a custom
pallet module exposing tokens — this is the right abstraction for theming.shared/pallet/src/main/java/...
PASS
Compose state primitives used
LaunchedEffect, remember, derivedStateOf appear in component files such as WarehouseToolsComponent.kt.HIGH
Mixed View + Compose surface
Both
viewBinding and compose are enabled in build features, indicating ongoing legacy XML usage. This complicates lifecycle, theming, and accessibility.Recommendation: Inventory remaining XML layouts; prioritize Compose migration for high-traffic screens (Home, PDP, Warehouse).
MEDIUM
Compose Material 1.10.4 alongside Material3 1.4.0
Two Material flavors imported — usually a sign of in-progress migration, but a long-lived dual import causes inconsistency.
Recommendation: Pick Material3 and remove
androidx.compose.material:material imports; replace any m2 components with m3 equivalents.MEDIUM
Compose preview coverage unknown
No quick signal of
@Preview density. Without previews, design system drift is easy.Recommendation: Mandate at least one
@Preview per public Composable; consider Showkase or Paparazzi for snapshot testing.LOW
Modifier ordering
Codebase-wide audit needed to ensure
Modifier chains follow the canonical order (size → padding → background → clickable → semantics) for predictable layout.Recommendation: Add Detekt rule
compose-rules from twitter/compose-rules.Composable hygiene checklist
- State hoisted out of leaf Composables
- Stable parameter types (avoid lambdas captured in lists)
remember(key)with explicit keysderivedStateOffor computed state- Previews cover light + dark + RTL
- Semantics + contentDescription on every interactive element
Costco Android · Code Review Report · Generated 2026-05-07 · 626 machine-curated findings