fix(node-metrics): apply full typography style instead of fontSize-only#6375
Conversation
Copying only fontSize from a MaterialTheme.typography token drops its lineHeight and letterSpacing, falling back to the ambient default style. This became visible once metric rows moved into FlowRow and started wrapping to multiple lines. Apply the full style= token instead, matching official M3-in-Compose guidance and the existing LocalStatsCard usage in SignalMetrics.kt. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (6)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughMetric UI text now applies complete Material typography styles instead of selecting only their font sizes. The changes cover environment metrics, device uptime, metric and position logs, and read-only chart legend labels. ChangesMetric typography standardization
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Regenerate goldens affected by the fontSize -> style change in the prior commit; restored lineHeight/letterSpacing shifts device metrics, environment metrics, and legend text slightly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary
Textcomposables underfeature/node/.../metrics/copied only.fontSizeoff aMaterialTheme.typographytoken (e.g.fontSize = MaterialTheme.typography.labelLarge.fontSize) instead of applying the fullstyle = MaterialTheme.typography.labelLarge.lineHeight(20sp) andletterSpacing(0.1sp), so the ambient default text style's line height applies instead — invisible in a single line, but now visible since metric rows moved intoFlowRowand can wrap.styleobject;LocalStatsCardinSignalMetrics.ktalready did this correctly and was used as the reference.Changes
MetricLogComponents.kt—MetricValueRow, used by many metric cards.DeviceMetrics.kt— uptimeText.PositionLogComponents.kt— Sats and HeadingTexts.EnvironmentMetrics.kt— all metric valueTexts (temperature, humidity, pressure, lux, UV lux, voltage, current, IAQ, gas resistance, radiation, wind direction/speed, rainfall, one-wire temperature).CommonCharts.kt— chart labelText(labelSmall).All existing
color =arguments were preserved.Testing Performed
:feature:node:spotlessCheck— pass:feature:node:detekt— pass:feature:node:allTests— pass (no tracked screenshot goldens underdocs/assets/screenshotswere regenerated/changed)🤖 Generated with Claude Code
Summary by CodeRabbit