feat: arrange power metrics in vertical per-channel columns#5796
feat: arrange power metrics in vertical per-channel columns#5796mvanhorn wants to merge 1 commit into
Conversation
|
|
📄 Docs staleness check — advisoryThis PR modifies user-facing UI source files but does not update any page under
Changed source files: What to check:
New page checklist (if adding a new doc page):
If this PR does not require a doc update (e.g., internal refactor, bug fix, test change), add the
|
🖼️ Preview staleness check — advisoryThis PR modifies UI composables but does not update any
Changed UI files: What to check:
Adding previews checklist:
If this PR does not require preview updates (e.g., logic-only change, non-visual refactor), add the |
|
hi @mvanhorn - you'll need to accept the CLA before we can merge this |
Thank you for sending in a pull request, here's some tips to get started!
Summary
Restructures the node detail "Power Metrics" section so each channel's voltage and current are grouped into a vertical column, with voltage stacked directly above current. Previously every channel contributed two independent
InfoCards that were flattened into a singleFlowRowwithArrangement.SpaceEvenly, which scattered the voltage/current pairs across the row on wide screens.Each populated channel is now built as a (voltage, current) pair and rendered as its own
Columninside the outerFlowRow, so the pairs stay together and the layout uses vertical space more efficiently. The existing zero-value suppression is preserved: channels reporting0fvoltage are still omitted entirely. Labels,V/mAformatting, and the voltage/power icons are unchanged.Because the metrics are now grouped structurally, the misleading KDoc warning that said metrics "must be added in pairs ... due to the display logic, which arranges metrics in columns of two" no longer applies and has been removed. The KDoc summary line, which had a copy-paste error describing environmental metrics (temperature, humidity, pressure), has been corrected to describe power metrics.
Why this matters
On wide screens the flat
FlowRowspread each channel's voltage and current apart, making the section harder to read and wasting vertical space. Grouping per channel into vertical columns keeps each channel's readings together and uses the available space more efficiently, as requested in #4507.Testing
This is a self-contained Compose layout change confined to
PowerMetrics.kt. The metric selection, zero-value suppression, number formatting, and icon choices are unchanged; only the arrangement of the existing cards into per-channel columns differs. ThePowerMetrics(node)composable remains the one rendered byTelemetricActionsSection.Fixes #4507