feat(metrics): redesign position log with SelectableMetricCard and add CSV export to all metrics screens (#5062)

This commit is contained in:
James Rich 2026-04-10 20:26:26 -05:00 committed by GitHub
parent 37e9e2c8f0
commit a6423d0a0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 398 additions and 251 deletions

View file

@ -27,10 +27,24 @@ import org.meshtastic.proto.Position
* Unlike [LocalNodeMapScreenProvider], this does **not** include a Scaffold or AppBar it is designed to be embedded
* inside another screen layout (e.g. the position-log adaptive layout).
*
* Supports optional synchronized selection:
* - [selectedPositionTime]: the `Position.time` of the currently selected position (or `null` for no selection). When
* non-null, the map should visually highlight the corresponding marker and center the camera on it.
* - [onPositionSelected]: callback invoked when a position marker is tapped on the map, passing the `Position.time` so
* the host can synchronize the card list.
*
* On Desktop/JVM targets where native maps are not yet available, it falls back to a [PlaceholderScreen].
*/
@Suppress("Wrapping")
val LocalNodeTrackMapProvider =
compositionLocalOf<@Composable (destNum: Int, positions: List<Position>, modifier: Modifier) -> Unit> {
{ _, _, _ -> PlaceholderScreen("Position Track Map") }
compositionLocalOf<
@Composable (
destNum: Int,
positions: List<Position>,
modifier: Modifier,
selectedPositionTime: Int?,
onPositionSelected: ((Int) -> Unit)?,
) -> Unit,
> {
{ _, _, _, _, _ -> PlaceholderScreen("Position Track Map") }
}