Skip to content

feat: arrange power metrics in vertical per-channel columns#5796

Open
mvanhorn wants to merge 1 commit into
meshtastic:mainfrom
mvanhorn:feat/4507-power-metrics-vertical-columns
Open

feat: arrange power metrics in vertical per-channel columns#5796
mvanhorn wants to merge 1 commit into
meshtastic:mainfrom
mvanhorn:feat/4507-power-metrics-vertical-columns

Conversation

@mvanhorn

Copy link
Copy Markdown

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 single FlowRow with Arrangement.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 Column inside the outer FlowRow, so the pairs stay together and the layout uses vertical space more efficiently. The existing zero-value suppression is preserved: channels reporting 0f voltage are still omitted entirely. Labels, V/mA formatting, 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 FlowRow spread 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. The PowerMetrics(node) composable remains the one rendered by TelemetricActionsSection.

Fixes #4507

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

📄 Docs staleness check — advisory

This PR modifies user-facing UI source files but does not update any page under docs/en/user/ or docs/en/developer/.

⚠️ Doc changes propagate to 3 consumers: in-app docs browser, Jekyll site (GitHub Pages), and meshtastic.org (Docusaurus sync). Updating a page in docs/en/ automatically flows to all three.

Changed source files:

feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/PowerMetrics.kt

What to check:

Changed area Likely doc page
feature/messaging/ docs/en/user/messages-and-channels.md
feature/node/ docs/en/user/nodes.md or docs/en/user/node-metrics.md
feature/map/ docs/en/user/map-and-waypoints.md
feature/connections/ docs/en/user/connections.md
feature/settings/ docs/en/user/settings-radio-user.md or docs/en/user/settings-module-admin.md
feature/firmware/ docs/en/user/firmware.md
feature/intro/ docs/en/user/onboarding.md
feature/discovery/ docs/en/user/discovery.md
feature/docs/ Internal docs infrastructure
core/ui/ docs/en/developer/codebase.md or component-specific user pages

New page checklist (if adding a new doc page):

  1. Create the .md file in docs/en/user/ or docs/en/developer/ with last_updated frontmatter
  2. Register in DocBundleLoader.kt with string resources (in-app browser)
  3. Jekyll and Docusaurus sync pick up new pages automatically — no config change needed

If this PR does not require a doc update (e.g., internal refactor, bug fix, test change), add the skip-docs-check label to dismiss this check.

Cross-platform note: This check is advisory while doc coverage matures. Both Android and Apple repos use the same skip-docs-check label and advisory severity. See meshtastic/design standards for shared conventions.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

🖼️ Preview staleness check — advisory

This PR modifies UI composables but does not update any *Previews.kt files.

Previews power screenshot tests and in-app docs screenshots. Keeping them current ensures visual regression coverage stays accurate.

Changed UI files:

feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/PowerMetrics.kt

What to check:

Pattern Preview file convention
feature/{name}/…/ui/ or component/ feature/{name}/…/*Previews.kt
core/ui/…/ core/ui/…/ (previews colocated)

Adding previews checklist:

  1. Create or update a *Previews.kt file in the same module with @PreviewLightDark
  2. Add @Suppress("PreviewPublic") if the preview is consumed by screenshot-tests
  3. Add corresponding @PreviewTest function in screenshot-tests/src/screenshotTest/
  4. Run ./gradlew :screenshot-tests:updateDebugScreenshotTest to generate reference images

If this PR does not require preview updates (e.g., logic-only change, non-visual refactor), add the skip-preview-check label to dismiss.

@jamesarich

Copy link
Copy Markdown
Collaborator

hi @mvanhorn - you'll need to accept the CLA before we can merge this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Needs CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Rearrange Power Metrics in vertical columns to better utilize space.

3 participants