Issue: Create UmbralSkeleton System
Overview
Create a skeleton loading system with shimmer animation and preset components for common loading states.
PRD Reference
Section B4: Skeleton Loaders (B4.1, B4.2)
Acceptance Criteria
UmbralSkeleton Base Component
Skeleton Presets
General
Visual Reference
Base Skeleton:
┌─────────────────────────────────────────┐
│ ░░░░░░░░░░░░░░░░░▓▓▓░░░░░░░░░░░░░░░░░ │ ← shimmer moving
└─────────────────────────────────────────┘
SkeletonCard:
┌─────────────────────────────────────────┐
│ ┌─────────────────────────────────────┐ │
│ │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│ │ ← image area
│ └─────────────────────────────────────┘ │
│ ░░░░░░░░░░░░░░░░░░░░░ │ ← title
│ ░░░░░░░░░░░░░ │ ← subtitle
└─────────────────────────────────────────┘
SkeletonListItem:
┌─────────────────────────────────────────┐
│ ● ░░░░░░░░░░░░░░░░░░░ │ ← avatar + title
│ ░░░░░░░░░░░░ │ ← subtitle
└─────────────────────────────────────────┘
SkeletonText (3 lines):
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 100%
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 90%
░░░░░░░░░░░░░░░░░░░░ 60%
SkeletonProfileCard:
┌─────────────────────────────────────────┐
│ ░░░░░░░░░░░░░░ ░░░░░░░░░░░ │ ← header
│ │
│ ░░░░░ ░░░░░ ░░░░░ │ ← stats
│ │
│ ░░░░░░░░░░░░░░░░░░░░░░░░░░░ │ ← content
│ │
│ ░░░░░░░░░░░░░░░░░░░░░ ─── │ ← action + toggle
└─────────────────────────────────────────┘
Shimmer Implementation
// Shimmer effect using gradient and animation
val shimmerColors = listOf(
backgroundColor,
highlightColor,
backgroundColor
)
val transition = rememberInfiniteTransition()
val translateAnim = transition.animateFloat(
initialValue = 0f,
targetValue = 1000f,
animationSpec = infiniteRepeatable(
tween(1200, easing = LinearEasing),
RepeatMode.Restart
)
)
// Apply gradient with animated offset
Performance Notes
- Use
remember for gradient calculations
- Limit number of simultaneous skeletons if possible
- Consider using
LaunchedEffect for shared animation state
- Test on lower-end devices
File Locations
app/src/main/java/com/umbral/presentation/ui/components/skeleton/UmbralSkeleton.kt
app/src/main/java/com/umbral/presentation/ui/components/skeleton/SkeletonPresets.kt
Dependencies
Part of Epic #80
Issue: Create UmbralSkeleton System
Overview
Create a skeleton loading system with shimmer animation and preset components for common loading states.
PRD Reference
Section B4: Skeleton Loaders (B4.1, B4.2)
Acceptance Criteria
UmbralSkeleton Base Component
modifier: Modifiershape: Shape(default RoundedCornerShape(8.dp))#252525#E8E8E8#303030#F5F5F5Skeleton Presets
SkeletonCard:SkeletonListItem:SkeletonText:lines: Intparameter (default 3)SkeletonProfileCard:General
Visual Reference
Shimmer Implementation
Performance Notes
rememberfor gradient calculationsLaunchedEffectfor shared animation stateFile Locations
app/src/main/java/com/umbral/presentation/ui/components/skeleton/UmbralSkeleton.ktapp/src/main/java/com/umbral/presentation/ui/components/skeleton/SkeletonPresets.ktDependencies
Part of Epic #80