Patterns from production · Honest numbers
A missing number is not zero
Missing sorts last and wins nothing.
A missing number is not zero
Try the controls to see the rule.
The rule
A value nobody reported is left out or said in words. It never sorts, ranks or wins as zero: in code, null must not become 0.
Tokens used
color.text.primarytheme.text.primarycolor.accent.basetheme.accentsize.tap44pxspace.md12pxmotion.duration.base260ms
Native spec · generated from this pattern and the shared token registry
struct OvMissingNotZero: View {
let status: String
@Environment(\.accessibilityReduceMotion) private var reduceMotion
var body: some View {
HStack(spacing: OvScale.spaceMd) {
Text(status).font(.body)
}
.frame(minHeight: OvScale.sizeTap)
.animation(reduceMotion ? .none : .easeOut(duration: OvScale.motionDurationBase), value: status)
}
}
// Tokens: color.text.primary=theme.text.primary, color.accent.base=theme.accent, size.tap=44px, space.md=12px, motion.duration.base=260ms@Composable
fun OvMissingNotZero(status: String, reduceMotion: Boolean) {
Row(
modifier = Modifier.defaultMinSize(minHeight = OvScale.SizeTap),
horizontalArrangement = Arrangement.spacedBy(OvScale.SpaceMd),
) {
Text(status, style = MaterialTheme.typography.bodyMedium)
}
// Apply motion only when !reduceMotion.
}
// Tokens: color.text.primary=theme.text.primary, color.accent.base=theme.accent, size.tap=44px, space.md=12px, motion.duration.base=260ms