Modern Apps git

← Modern-Apps.git

findfamily: find nearby in top bar, history FAB replaces plus FAB

Commit
53d6c2b52b3d7a992d28b63712f74b87958a64dc
Author
Vayun Mathur <[email protected]>
When
2026-12-06 02:42 UTC (1 hour ago)
Parents
dda8293
Move Find Nearby out of the person bottom panel into the transparent TopAppBarOverlay over the map (IconMyLocation action, shown only for a selected non-self person with UWB available), and add that bar's back button for any person/waypoint selection (pops to the family list). The same overlay and FAB now also render over the map in the expanded side-panel layout so no feature is lost on wide windows. MainPageUiState gains canFindNearby/isShowingPresent and MainPageActions gains onNavigateBack/findNearby/showHistory, wired in rememberMainPageActions from the back stack (Find Nearby pushes Route.UwbRangingPage for the top PersonSheet).

Replace the plus FloatingActionButtonMenu (add person/place/link/tracker) with a single history FAB (generated IconHistory, already in icons.tsv): it shows only for a selected person in present mode and enters history via MapPageState.setShowingPresent(false). Remove the history-entering button from the bottom of PersonSheet (the history scrubber and its return-to-present control remain in history mode), remove the orphaned fab_* strings, and update the person screenshot preview to the new bar/FAB state. Add routes remain reachable outside this FAB (first-run add, accepting a request); waypoint/link creation no longer has a main-page FAB entry, as directed by the replacement.

Verified: ./gradlew :findfamily:testDevUnitTest passes.

Diff

findfamily/src/main/java/com/vayunmathur/findfamily/platform/FindFamilyUiContract.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/platform/FindFamilyUiContract.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/platform/FindFamilyUiContract.ktindex 3d8c3f31a1..3d56153b41 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/platform/FindFamilyUiContract.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/platform/FindFamilyUiContract.kt@@ -123,6 +123,10 @@ data class MainPageUiState(     val selectedUserId: Long? = null,     /** Waypoint selected via `Route.WaypointSheet` (0 = new place), or null. */     val selectedWaypointId: Long? = null,+    /** True when Find Nearby (UWB) can be offered for the selected person. */+    val canFindNearby: Boolean = false,+    /** False while the selected person's history is being viewed. */+    val isShowingPresent: Boolean = true, ) {     /** True when the bottom panel shows the family list. */     val nothingSelected: Boolean@@ -132,16 +136,15 @@ data class MainPageUiState( /**  * Map-overlay and FAB callbacks for the map page. Same no-op-default arrangement as the sheet  * action interfaces so [Noop] is all a preview needs. The stateful `MainPage` wires these to- * the ViewModel and nav back stack. Selection-scoped actions (delete, UWB,- * history, waypoint save) live in the `PersonSheet` / `WaypointSheet`- * bottom-panel content, not here.+ * the ViewModel and nav back stack. The transparent top bar carries back+ * navigation and Find Nearby for a selected person; the FAB enters that+ * person's history. Add-person/place/link creation is not on this page's FAB.  */ interface MainPageActions {     fun onGpsWarningClick() {}-    fun addPerson() {}-    fun beginCreateWaypoint() {}-    fun addLink() {}-    fun addTracker() {}+    fun onNavigateBack() {}+    fun findNearby() {}+    fun showHistory() {}      /** No-op [MainPageActions] for previews. */     companion object {
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainFabOverlay.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainFabOverlay.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainFabOverlay.ktindex 7eb12f0759..210dea76da 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainFabOverlay.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainFabOverlay.kt@@ -1,166 +1,41 @@ package com.vayunmathur.findfamily.ui -import com.vayunmathur.library.ui.DateString-import com.vayunmathur.library.ui.is24Hour-import android.Manifest-import android.content.Context-import androidx.activity.compose.BackHandler-import androidx.compose.foundation.Image-import androidx.compose.foundation.background-import androidx.compose.foundation.border-import androidx.compose.foundation.clickable-import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.BoxScope-import androidx.compose.foundation.layout.Column-import androidx.compose.foundation.layout.PaddingValues-import androidx.compose.foundation.layout.Row-import androidx.compose.foundation.layout.RowScope-import androidx.compose.foundation.layout.Spacer-import androidx.compose.foundation.layout.fillMaxSize-import androidx.compose.foundation.layout.fillMaxWidth-import androidx.compose.foundation.layout.height-import androidx.compose.foundation.layout.heightIn-import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.padding-import androidx.compose.foundation.layout.size-import androidx.compose.foundation.layout.width-import androidx.compose.foundation.lazy.LazyColumn-import androidx.compose.foundation.lazy.items-import androidx.compose.foundation.shape.RoundedCornerShape-import androidx.compose.foundation.text.KeyboardOptions-import com.vayunmathur.library.ui.AssistChip-import com.vayunmathur.library.ui.BottomSheetDefaults-import com.vayunmathur.library.ui.BottomSheetScaffold-import com.vayunmathur.library.ui.Card-import com.vayunmathur.library.ui.ExperimentalMaterial3Api-import com.vayunmathur.library.ui.ExperimentalMaterial3ExpressiveApi-import com.vayunmathur.library.ui.FilledTonalButton-import com.vayunmathur.library.ui.FloatingActionButton-import com.vayunmathur.library.ui.FloatingActionButtonMenu-import com.vayunmathur.library.ui.FloatingActionButtonMenuItem-import com.vayunmathur.library.ui.HistoryScrubberCard-import com.vayunmathur.library.ui.HistoryStep-import com.vayunmathur.library.ui.rememberHistoryScrubberState-import com.vayunmathur.library.ui.IconLink-import com.vayunmathur.library.ui.IconLocationOn-import com.vayunmathur.library.ui.IconPerson-import com.vayunmathur.library.ui.IconButton-import com.vayunmathur.library.ui.ListItem-import com.vayunmathur.library.ui.ListItemDefaults-import com.vayunmathur.library.ui.MaterialTheme-import com.vayunmathur.library.ui.ExposedDropdownMenuDefaults-import com.vayunmathur.library.ui.DropdownMenu-import com.vayunmathur.library.ui.IconCheck-import com.vayunmathur.library.ui.OutlinedButton-import com.vayunmathur.library.ui.OutlinedTextField-import com.vayunmathur.library.ui.SelectableDropdownMenuItem-import com.vayunmathur.library.ui.Slider-import com.vayunmathur.library.ui.SheetValue-import com.vayunmathur.library.ui.Switch-import com.vayunmathur.library.ui.Text-import com.vayunmathur.library.ui.ToggleFloatingActionButton-import com.vayunmathur.library.ui.OverlayAction-import com.vayunmathur.library.ui.Spacing-import com.vayunmathur.library.ui.TopAppBarOverlay-import com.vayunmathur.library.ui.dynamicLightColorScheme-import com.vayunmathur.library.ui.ColorScheme-import com.vayunmathur.library.ui.rememberBottomSheetScaffoldState-import com.vayunmathur.library.ui.rememberMessenger-import com.vayunmathur.library.ui.rememberPermissionRequest-import com.vayunmathur.library.ui.rememberSliderState-import com.vayunmathur.library.room.SqlCipherDbCodec-import com.vayunmathur.findfamily.ui.dialogs.interactionSourceClickable-import kotlin.time.Duration-import kotlin.time.Duration.Companion.days-import kotlin.time.Duration.Companion.hours import androidx.compose.runtime.Composable-import androidx.compose.runtime.LaunchedEffect-import androidx.compose.runtime.collectAsState-import androidx.compose.runtime.derivedStateOf-import androidx.compose.runtime.getValue-import androidx.compose.runtime.mutableFloatStateOf-import androidx.compose.runtime.mutableStateOf-import androidx.compose.runtime.remember-import androidx.compose.runtime.setValue-import androidx.compose.runtime.snapshotFlow import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color-import androidx.compose.ui.graphics.lerp-import androidx.compose.ui.platform.LocalContext-import androidx.compose.ui.platform.LocalInspectionMode-import androidx.compose.ui.res.stringResource-import androidx.compose.ui.res.painterResource-import androidx.compose.ui.text.font.FontWeight-import androidx.compose.ui.text.input.KeyboardType-import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.dp-import androidx.compose.ui.unit.sp-import kotlin.math.roundToInt-import com.vayunmathur.findfamily.R-import com.vayunmathur.findfamily.BuildConfig-import com.vayunmathur.findfamily.Route-import com.vayunmathur.findfamily.data.LocationSource-import com.vayunmathur.findfamily.data.LocationValue-import com.vayunmathur.findfamily.data.TemporaryLink-import com.vayunmathur.findfamily.data.User-import com.vayunmathur.findfamily.data.Waypoint-import com.vayunmathur.findfamily.data.toGeoPoint-import com.vayunmathur.findfamily.ui.dialogs.encodeBase26-import com.vayunmathur.findfamily.ui.dialogs.GpsFallbackWarningDialog-import com.vayunmathur.findfamily.platform.FamilyListActions-import com.vayunmathur.findfamily.notifications.FindFamilyNotificationChannels-import com.vayunmathur.findfamily.platform.FamilyListUiState-import com.vayunmathur.findfamily.platform.FindFamilyViewModel import com.vayunmathur.findfamily.platform.MainPageActions import com.vayunmathur.findfamily.platform.MainPageUiState-import com.vayunmathur.findfamily.network.Networking-import com.vayunmathur.findfamily.platform.PersonActions-import com.vayunmathur.findfamily.platform.PersonUiState-import com.vayunmathur.findfamily.platform.Platform-import com.vayunmathur.findfamily.platform.UwbSessionManager-import com.vayunmathur.library.map.GeoPoint-import com.vayunmathur.library.map.rememberCameraState-import com.vayunmathur.library.util.NavBackStack-import com.vayunmathur.library.ui.IconClose-import com.vayunmathur.library.ui.IconCopy-import com.vayunmathur.library.ui.IconDelete-import com.vayunmathur.library.ui.IconEdit-import com.vayunmathur.library.ui.IconMoreVert-import com.vayunmathur.library.ui.IconNavigationArrow-import com.vayunmathur.library.ui.IconRestore-import com.vayunmathur.library.ui.IconVerify-import com.vayunmathur.library.ui.IconSave-import com.vayunmathur.library.ui.IconAdd-import com.vayunmathur.library.ui.isExpandedWidth-import com.vayunmathur.library.util.ResultEffect-import com.vayunmathur.library.util.formatSpeed-import kotlin.time.Duration.Companion.minutes-import kotlin.time.Duration.Companion.seconds-import kotlin.time.ExperimentalTime-import kotlin.time.Clock-import kotlinx.datetime.LocalDate-import kotlinx.datetime.TimeZone-import kotlinx.datetime.atTime-import kotlinx.datetime.toInstant-import kotlinx.datetime.toLocalDateTime-import kotlin.time.Instant+import com.vayunmathur.library.ui.ColorScheme+import com.vayunmathur.library.ui.FloatingActionButton+import com.vayunmathur.library.ui.IconHistory+import com.vayunmathur.library.ui.MaterialTheme +/**+ * History FAB over the map. It replaces the former add (plus) FAB menu:+ * with a person selected in present mode it enters that person's history+ * (the scrubber then renders in the bottom panel). With no person+ * selected, or already in history mode, no FAB is shown.+ */ @Composable internal fun BoxScope.MainFabOverlay(+    state: MainPageUiState,     actions: MainPageActions,     peekHeight: Dp,     sheetLiftPx: () -> Int,     fabContainerColor: Color,-    fabExpandedColor: Color,     fabContentColor: Color,     lightScheme: ColorScheme,     inPreview: Boolean, ) {+    if (state.selectedUserId == null || !state.isShowingPresent) return     // FAB floats just above the sheet peek, lifting as the sheet expands.     // Wrapped in the light scheme so it reads correctly over the light map.     Box(@@ -169,50 +44,12 @@ internal fun BoxScope.MainFabOverlay(             .offset { IntOffset(0, sheetLiftPx()) }     ) {         MaterialTheme(colorScheme = lightScheme) {-            // Selection lives in the bottom panel's person/waypoint content,-            // which carries its own actions, so the FAB is always the add menu.-            run {-                if (inPreview) {-                    // The expressive FloatingActionButtonMenu is animation-driven and-                    // does not render under Layoutlib; show the representative collapsed-                    // "+" FAB (its default state) so the store image still reads right.-                    FloatingActionButton(-                        {},-                        containerColor = fabContainerColor,-                        contentColor = fabContentColor-                    ) {-                        IconAdd(tint = fabContentColor)-                    }-                } else {-                    var expanded by remember { mutableStateOf(false) }-                    FloatingActionButtonMenu(expanded, {-                        ToggleFloatingActionButton(-                            expanded,-                            { expanded = it },-                            containerColor = { progress -> lerp(fabContainerColor, fabExpandedColor, progress) }-                        ) {-                            if (!expanded)-                                IconAdd(tint = fabContentColor)-                            else-                                IconClose(tint = fabContentColor)-                        }-                    }) {-                        FloatingActionButtonMenuItem({ actions.addPerson() },-                            { Text(stringResource(R.string.fab_person)) },-                            { IconPerson() })-                        FloatingActionButtonMenuItem({ actions.beginCreateWaypoint() },-                            { Text(stringResource(R.string.fab_location)) },-                            { IconLocationOn() })-                        FloatingActionButtonMenuItem({ actions.addLink() },-                            { Text(stringResource(R.string.fab_link)) },-                            { IconLink() })-                        if (BuildConfig.DEV_BUILD) {-                            FloatingActionButtonMenuItem({ actions.addTracker() },-                                { Text(stringResource(R.string.fab_tracker)) },-                                { IconNavigationArrow() })-                        }-                    }-                }+            FloatingActionButton(+                onClick = { actions.showHistory() },+                containerColor = fabContainerColor,+                contentColor = fabContentColor+            ) {+                IconHistory(tint = fabContentColor)             }         }     }
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPage.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPage.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPage.ktindex ca771801e4..0c424bd2f9 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPage.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPage.kt@@ -220,6 +220,9 @@ fun MainPage(         usingGpsFallback = usingGpsFallback,         selectedUserId = selectedUserId,         selectedWaypointId = selectedWaypointId,+        canFindNearby = selectedUserId != null && selectedUserId != Networking.userid &&+            UwbSessionManager.isAvailable(context),+        isShowingPresent = isShowingPresent,         familyList = FamilyListUiState(             connectedUsers = connectedUsers,             awaitingRequestUsers = awaitingRequestUsers,
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.ktindex 1a73bb9577..de36f6a007 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.kt@@ -196,15 +196,12 @@ internal fun rememberMainPageActions(      val mainActions = object : MainPageActions {         override fun onGpsWarningClick() { onShowGpsWarning(true) }-        override fun addPerson() { backStack.add(Route.AddPersonDialog()) }-        override fun beginCreateWaypoint() {-            ffViewModel.mapState.beginCreateWaypoint()-            backStack.pushOrReplace(Route.WaypointSheet(0L)) {-                it is Route.PersonSheet || it is Route.WaypointSheet-            }+        override fun onNavigateBack() { backStack.pop() }+        override fun findNearby() {+            val userId = (backStack.backStack.lastOrNull() as? Route.PersonSheet)?.userId ?: return+            backStack.add(Route.UwbRangingPage(userId))         }-        override fun addLink() { backStack.add(Route.AddLinkDialog) }-        override fun addTracker() { backStack.add(Route.AddTrackerDialog) }+        override fun showHistory() { ffViewModel.mapState.setShowingPresent(false) }     }     return Pair(familyActions, mainActions) }
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.ktindex 64cbda69aa..6e5b34129e 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.kt@@ -65,7 +65,6 @@ fun MainPageContent(     val context = LocalContext.current     val lightScheme = remember(context) { dynamicLightColorScheme(context) }     val fabContainerColor = lightScheme.primaryContainer-    val fabExpandedColor = lightScheme.primary     val fabContentColor = lightScheme.onPrimaryContainer      // The sheet's offset when settled at its peek, captured ONCE. Overlays then sit@@ -93,6 +92,21 @@ fun MainPageContent(             map = {                 Box(Modifier.fillMaxSize()) {                     map()+                    Box(Modifier.align(Alignment.TopCenter).fillMaxWidth()) {+                        MaterialTheme(colorScheme = lightScheme) {+                            MapOverlayBar(state, actions)+                        }+                    }+                    MainFabOverlay(+                        state = state,+                        actions = actions,+                        peekHeight = 0.dp,+                        sheetLiftPx = { 0 },+                        fabContainerColor = fabContainerColor,+                        fabContentColor = fabContentColor,+                        lightScheme = lightScheme,+                        inPreview = inPreview,+                    )                 }             },             panel = { modifier ->@@ -152,11 +166,11 @@ fun MainPageContent(             }              MainFabOverlay(+                state = state,                 actions = actions,                 peekHeight = peekHeight,                 sheetLiftPx = sheetLiftPx,                 fabContainerColor = fabContainerColor,-                fabExpandedColor = fabExpandedColor,                 fabContentColor = fabContentColor,                 lightScheme = lightScheme,                 inPreview = inPreview,
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageOverlays.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageOverlays.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageOverlays.ktindex 79b2093ea0..a6c15576f6 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageOverlays.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageOverlays.kt@@ -9,18 +9,31 @@ import androidx.compose.ui.res.painterResource import com.vayunmathur.findfamily.R import com.vayunmathur.findfamily.platform.MainPageActions import com.vayunmathur.findfamily.platform.MainPageUiState+import com.vayunmathur.library.ui.IconMyLocation +/**+ * Transparent top app bar over the map ([TopAppBarOverlay] draws no+ * container). With a person or waypoint selected it carries the back+ * button (back to the family list) and, for another person with UWB+ * available, the Find Nearby action. The GPS fallback warning stays here+ * in every state.+ */ @Composable internal fun MapOverlayBar(     state: MainPageUiState,     actions: MainPageActions, ) {     val gpsWarningDescription = stringResource(R.string.gps_fallback_warning_content_description)+    val findNearbyDescription = stringResource(R.string.find_nearby_content_description) -    // Selection-scoped actions (Find Nearby / verify) live in the bottom-    // panel's person/waypoint content. The map's own overlay only-    // carries the GPS warning; there is no overflow/menu icon on this page.     val overlayActions: List<OverlayAction> = listOfNotNull(+        if (state.canFindNearby) {+            OverlayAction(+                icon = { IconMyLocation() },+                contentDescription = findNearbyDescription,+                onClick = { actions.findNearby() }+            )+        } else null,         if (state.usingGpsFallback) {             OverlayAction(                 icon = {@@ -38,7 +51,9 @@ internal fun MapOverlayBar(     )      TopAppBarOverlay(-        onNavigateBack = null,+        onNavigateBack = if (state.selectedUserId != null || state.selectedWaypointId != null) {+            { actions.onNavigateBack() }+        } else null,         actions = overlayActions,     ) }
findfamily/src/main/java/com/vayunmathur/findfamily/ui/PersonSheet.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/PersonSheet.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/PersonSheet.ktindex 2a9b3712df..5a3447abaf 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/PersonSheet.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/PersonSheet.kt@@ -35,9 +35,10 @@ import com.vayunmathur.library.util.NavBackStack  * bottom panel (see `MainSheetContent`) while a person is selected, and  * back returns the panel to the family list. It is not a dialog.  *- * Hosts the person detail sheet plus the selection actions: Find Nearby- * and entering history mode (the scrubber renders here; the map- * behind the panel keeps showing the historical pin for [userId]).+ * Hosts the person detail sheet. Find Nearby lives in the map's+ * transparent top bar and entering history on the history FAB; the+ * scrubber renders here in history mode (the map behind the panel+ * keeps showing the historical pin for [userId]).  */ @Composable fun PersonSheet(@@ -139,28 +140,6 @@ fun PersonSheet(                         personActions,                         onShowNoShowAlert = { backStack.add(Route.NoShowAlertDialog(userId)) },                     )-                    val context = LocalContext.current-                    val isSelf = userId == Networking.userid-                    if (!isSelf) {-                        Row(-                            Modifier.fillMaxWidth(),-                            horizontalArrangement = Arrangement.spacedBy(8.dp),-                        ) {-                            if (UwbSessionManager.isAvailable(context)) {-                                OutlinedButton(-                                    { backStack.add(Route.UwbRangingPage(userId)) },-                                    Modifier.weight(1f),-                                ) { Text(stringResource(R.string.find_nearby_content_description)) }-                            }-                        }-                        OutlinedButton(-                            { ffViewModel.mapState.setShowingPresent(false) },-                            Modifier.fillMaxWidth(),-                        ) {-                            IconRestore()-                            Text(stringResource(R.string.history_title, user.name))-                        }-                    }                 }     } }
findfamily/src/main/res/values-ar/strings.xml
diff --git a/findfamily/src/main/res/values-ar/strings.xml b/findfamily/src/main/res/values-ar/strings.xmlindex ac01f80de8..eddc8ed8fd 100644--- a/findfamily/src/main/res/values-ar/strings.xml+++ b/findfamily/src/main/res/values-ar/strings.xml@@ -17,10 +17,6 @@     <string name="permission_upgrade_dialog_message">يحتاج FindFamily إلى موقع دقيق (تفصيلي) لمشاركة موقعك الدقيق. يُرجى السماح بتحديد الموقع الدقيق.</string>     <string name="permission_upgrade_dialog_confirm">السماح بالموقع الدقيق</string>     <string name="permission_upgrade_dialog_dismiss">ليس الآن</string>-    <string name="fab_person">الشخص</string>-    <string name="fab_location">الموقع</string>-    <string name="fab_link">الرابط</string>-    <string name="fab_tracker">المتتبع</string>     <string name="add_tracker_title">إضافة متتبع</string>     <string name="add_tracker_name_label">اسم المتتبع</string>     <string name="add_tracker_scan_hint">ضع المتتبع في وضع الاقتران، ثم اختره أدناه.</string>
findfamily/src/main/res/values-cs/strings.xml
diff --git a/findfamily/src/main/res/values-cs/strings.xml b/findfamily/src/main/res/values-cs/strings.xmlindex e98fb0aa1e..57feb336da 100644--- a/findfamily/src/main/res/values-cs/strings.xml+++ b/findfamily/src/main/res/values-cs/strings.xml@@ -2,9 +2,6 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">     <string name="notification_channel_entry_exit_name">Příjezdy &amp; Odjezdy</string>     <string name="notification_tracking_title">Najit rodinu je aktivní</string>-    <string name="fab_person">Osoba</string>-    <string name="fab_location">Poloha</string>-    <string name="fab_link">Odkaz</string>     <string name="section_location_sharing_requests">Žádosti o sdílení polohy</string>     <string name="section_temporary_links">Dočasné odkazy</string>     <string name="section_saved_places">Uložená místa</string>
findfamily/src/main/res/values-de/strings.xml
diff --git a/findfamily/src/main/res/values-de/strings.xml b/findfamily/src/main/res/values-de/strings.xmlindex 18bdbce7a3..8357def456 100644--- a/findfamily/src/main/res/values-de/strings.xml+++ b/findfamily/src/main/res/values-de/strings.xml@@ -12,9 +12,6 @@     <string name="notification_entered_waypoint">%1$s ist bei %2$s angekommen</string>     <string name="notification_exited_waypoint">%1$s hat %2$s verlassen</string>     <string name="permission_grant_fine_location">1. Genauen Standort zulassen</string>-    <string name="fab_person">Person</string>-    <string name="fab_location">Standort</string>-    <string name="fab_link">Link</string>     <string name="section_location_sharing_requests">Standortanfragen</string>     <string name="section_temporary_links">Temporäre Links</string>     <string name="section_saved_places">Gespeicherte Orte</string>
findfamily/src/main/res/values-et/strings.xml
diff --git a/findfamily/src/main/res/values-et/strings.xml b/findfamily/src/main/res/values-et/strings.xmlindex ba0f2f082f..217d4f9e6d 100644--- a/findfamily/src/main/res/values-et/strings.xml+++ b/findfamily/src/main/res/values-et/strings.xml@@ -60,9 +60,6 @@     <string name="notification_entered_waypoint"><xliff:g id="person_name" example="Kadri">%1$s</xliff:g> on sisenenud asukohta <xliff:g id="waypoint_name" example="Koduaed">%2$s</xliff:g></string>     <string name="notification_exited_waypoint"><xliff:g id="person_name" example="Kadri">%1$s</xliff:g> on väljunud asukohast <xliff:g id="waypoint_name" example="Koduaed">%2$s</xliff:g></string>     <string name="battery_percentage"><xliff:g id="battery_level" example="85">%1$d</xliff:g>%%</string>-    <string name="fab_person">Isik</string>-    <string name="fab_location">Asukoht</string>-    <string name="fab_link">Link</string>     <string name="section_location_sharing_requests">Asukoha jagamise päringud</string>     <string name="section_temporary_links">Ajutised lingid</string>     <string name="section_saved_places">Salvestatud asukohad</string>@@ -132,7 +129,6 @@     <string name="tile_subtitle_on">Sees</string>     <string name="tile_subtitle_off">Väljas</string>     <string name="tile_subtitle_no_permission">Seadistamiseks klõpsa</string>-    <string name="fab_tracker">Nutimärgis</string>     <string name="add_tracker_title">Lisa nutimärgis</string>     <string name="add_tracker_name_label">Nutimärgise nimi</string>     <string name="add_tracker_scan_hint">Lülita nutimärgis paardumisrežiimi ja vali ta alljärgnevast.</string>
findfamily/src/main/res/values-fr/strings.xml
diff --git a/findfamily/src/main/res/values-fr/strings.xml b/findfamily/src/main/res/values-fr/strings.xmlindex 20720118ad..1efb62d14f 100644--- a/findfamily/src/main/res/values-fr/strings.xml+++ b/findfamily/src/main/res/values-fr/strings.xml@@ -23,9 +23,7 @@     <string name="section_saved_places">Lieux Enregistrés</string>     <string name="expiry_1_day">1 jour</string>     <string name="permission_upgrade_dialog_confirm">Autoriser la localisation précise</string>-    <string name="fab_person">Personne</string>     <string name="users_are_here">%1$s sont actuellement ici</string>-    <string name="fab_link">Lien</string>     <string name="permission_upgrade_dialog_message">Trouver sa famille a besoin d\'une localisation précise (de haute précision) pour partager votre position exacte. Veuillez autoriser la localisation précise.</string>     <string name="permission_upgrade_dialog_title">Localisation précise requise</string>     <string name="expiry_15_minutes">15 minutes</string>@@ -66,7 +64,6 @@     <string name="section_location_sharing_requests">Demandes de partage de position</string>     <string name="waypoint_name_blank_error">Le champ « Nom » ne peut pas être laissé vide</string>     <string name="your_findfamily_id">Votre identifiant Trouver sa famille</string>-    <string name="fab_location">Localisation</string>     <string name="time_just_now">il y a un instant</string>     <string name="expiry_1_hour">1 heure</string>     <string name="status_awaiting_request">Cette personne vous a demandé de lui indiquer où vous vous trouvez</string>
findfamily/src/main/res/values-it/strings.xml
diff --git a/findfamily/src/main/res/values-it/strings.xml b/findfamily/src/main/res/values-it/strings.xmlindex a25f9b8c16..76fc9e67cd 100644--- a/findfamily/src/main/res/values-it/strings.xml+++ b/findfamily/src/main/res/values-it/strings.xml@@ -10,9 +10,6 @@     <string name="notification_entered_waypoint"><xliff:g id="person_name" example="Alice">%1$s</xliff:g> è entrato in <xliff:g id="waypoint_name" example="Home">%2$s</xliff:g></string>     <string name="notification_exited_waypoint"><xliff:g id="person_name" example="Alice">%1$s</xliff:g> è uscito da <xliff:g id="waypoint_name" example="Home">%2$s</xliff:g></string>     <string name="permission_grant_fine_location">1. Concedi la posizione precisa</string>-    <string name="fab_person">Persona</string>-    <string name="fab_location">Posizione</string>-    <string name="fab_link">Collegamento</string>     <string name="section_location_sharing_requests">Richieste di condivisione della posizione</string>     <string name="section_temporary_links">Link temporanei</string>     <string name="request_from">Richiesta da <xliff:g id="sender_id" example="ABC123">%1$s</xliff:g></string>@@ -125,7 +122,6 @@     <string name="notification_channel_departure_desc">Notifiche quando <xliff:g id="person_name" example="Alice">%1$s</xliff:g> lascia un luogo</string>     <string name="notification_settings_arrival">Avvisi di arrivo</string>     <string name="notification_settings_departure">Avvisi di partenza</string>-    <string name="fab_tracker">Tracker</string>     <string name="add_tracker_title">Aggiungi tracker</string>     <string name="add_tracker_name_label">Nome tracker</string>     <string name="add_tracker_scanning">Scansione di tracker…</string>
findfamily/src/main/res/values-pl/strings.xml
diff --git a/findfamily/src/main/res/values-pl/strings.xml b/findfamily/src/main/res/values-pl/strings.xmlindex 375d1e7d12..2f909e0097 100644--- a/findfamily/src/main/res/values-pl/strings.xml+++ b/findfamily/src/main/res/values-pl/strings.xml@@ -12,9 +12,6 @@     <string name="notification_entered_waypoint">%1$s dotarł do %2$s</string>     <string name="notification_exited_waypoint">%1$s opuścił %2$s</string>     <string name="permission_grant_fine_location">1. Zezwól na dostęp do dokładnej lokalizacji</string>-    <string name="fab_person">Osoba</string>-    <string name="fab_location">Lokalizacja</string>-    <string name="fab_link">Link</string>     <string name="section_location_sharing_requests">Prośby o udostępnienie lokalizacji</string>     <string name="section_temporary_links">Linki tymczasowe</string>     <string name="section_saved_places">Zapisane miejsca</string>
findfamily/src/main/res/values-pt/strings.xml
diff --git a/findfamily/src/main/res/values-pt/strings.xml b/findfamily/src/main/res/values-pt/strings.xmlindex 7e1e7c8f02..35a9ac37d6 100644--- a/findfamily/src/main/res/values-pt/strings.xml+++ b/findfamily/src/main/res/values-pt/strings.xml@@ -5,5 +5,4 @@     <string name="notification_low_battery">%1$s tem bateria baixa</string>     <string name="notification_entered_waypoint">%1$s entrou %2$s</string>     <string name="notification_exited_waypoint">%1$s saiu %2$s</string>-    <string name="fab_link">Link</string> </resources>
findfamily/src/main/res/values-ru/strings.xml
diff --git a/findfamily/src/main/res/values-ru/strings.xml b/findfamily/src/main/res/values-ru/strings.xmlindex fc801d7bdd..eba65522ec 100644--- a/findfamily/src/main/res/values-ru/strings.xml+++ b/findfamily/src/main/res/values-ru/strings.xml@@ -13,9 +13,6 @@     <string name="permission_upgrade_dialog_message">FindFamily необходимо знать точное местоположение, чтобы сообщить где вы. Пожалуйста, разрешите точное местоположение.</string>     <string name="permission_upgrade_dialog_confirm">Позволить точное местоположение</string>     <string name="permission_upgrade_dialog_dismiss">Не сейчас</string>-    <string name="fab_person">Особа</string>-    <string name="fab_location">Расположение</string>-    <string name="fab_link">Ссылка</string>     <string name="section_location_sharing_requests">Запросы на обмен местоположением</string>     <string name="section_temporary_links">Временные ссылки</string>     <string name="section_saved_places">Сохранённые места</string>
findfamily/src/main/res/values-sv/strings.xml
diff --git a/findfamily/src/main/res/values-sv/strings.xml b/findfamily/src/main/res/values-sv/strings.xmlindex 927b0a0825..2c585b7388 100644--- a/findfamily/src/main/res/values-sv/strings.xml+++ b/findfamily/src/main/res/values-sv/strings.xml@@ -22,10 +22,6 @@     <string name="permission_upgrade_dialog_message">Find Family behöver exakt plats för att dela din exakta position. Tillåt exakt plats.</string>     <string name="permission_upgrade_dialog_confirm">Tillåt exakt plats</string>     <string name="permission_upgrade_dialog_dismiss">Inte nu</string>-    <string name="fab_person">Person</string>-    <string name="fab_location">Plats</string>-    <string name="fab_link">Länk</string>-    <string name="fab_tracker">Spårare</string>     <string name="add_tracker_title">Lägg till spårare</string>     <string name="add_tracker_name_label">Spårarens namn</string>     <string name="add_tracker_scan_hint">Sätt spåraren i parkopplingsläge och välj den sedan nedan.</string>
findfamily/src/main/res/values-zh-rCN/strings.xml
diff --git a/findfamily/src/main/res/values-zh-rCN/strings.xml b/findfamily/src/main/res/values-zh-rCN/strings.xmlindex cbf6a33138..c3feb0686f 100644--- a/findfamily/src/main/res/values-zh-rCN/strings.xml+++ b/findfamily/src/main/res/values-zh-rCN/strings.xml@@ -12,9 +12,6 @@     <string name="notification_entered_waypoint"><xliff:g id="person_name" example="Alice">%1$s</xliff:g> 已进入 <xliff:g id="waypoint_name" example="Home">%2$s</xliff:g></string>     <string name="notification_exited_waypoint"><xliff:g id="person_name" example="Alice">%1$s</xliff:g> 已离开 <xliff:g id="waypoint_name" example="Home">%2$s</xliff:g></string>     <string name="permission_grant_fine_location">1. 授予精确位置权限</string>-    <string name="fab_person">人员</string>-    <string name="fab_location">位置</string>-    <string name="fab_link">链接</string>     <string name="section_location_sharing_requests">位置共享请求</string>     <string name="section_temporary_links">临时链接</string>     <string name="section_saved_places">已保存地点</string>
findfamily/src/main/res/values/strings.xml
diff --git a/findfamily/src/main/res/values/strings.xml b/findfamily/src/main/res/values/strings.xmlindex 8a369d36b6..978c74cb6d 100644--- a/findfamily/src/main/res/values/strings.xml+++ b/findfamily/src/main/res/values/strings.xml@@ -83,15 +83,7 @@     <!-- PersonSheet / WaypointSheet: messenger message when the notification request is denied. Sentence -->     <string name="notifications_denied">Notifications are needed for that alert, so it wasn\'t set.</string> -    <!-- MainPage FAB menu: Option to add a person/contact. Noun -->-    <string name="fab_person">Person</string>-    <!-- MainPage FAB menu: Option to add a saved place/waypoint. Noun -->-    <string name="fab_location">Location</string>-    <!-- MainPage FAB menu: Option to create temporary share link. Noun -->-    <string name="fab_link">Link</string> -    <!-- MainPage FAB menu (dev builds only): bind a custom UWB tracker. Noun -->-    <string name="fab_tracker">Tracker</string>     <!-- Add Tracker dialog title -->     <string name="add_tracker_title">Add tracker</string>     <!-- Add Tracker dialog: label for the tracker name text field -->
findfamily/src/screenshotTest/kotlin/com/vayunmathur/findfamily/ui/MetadataPreviews.kt
diff --git a/findfamily/src/screenshotTest/kotlin/com/vayunmathur/findfamily/ui/MetadataPreviews.kt b/findfamily/src/screenshotTest/kotlin/com/vayunmathur/findfamily/ui/MetadataPreviews.ktindex d7148536de..18c2473cb5 100644--- a/findfamily/src/screenshotTest/kotlin/com/vayunmathur/findfamily/ui/MetadataPreviews.kt+++ b/findfamily/src/screenshotTest/kotlin/com/vayunmathur/findfamily/ui/MetadataPreviews.kt@@ -222,6 +222,8 @@ class MetadataPreviews {                 state = MainPageUiState(                     familyList = sampleFamilyList(),                     selectedUserId = maya.id,+                    canFindNearby = true,+                    isShowingPresent = true,                 ),                 familyActions = FamilyListActions.Noop,                 actions = MainPageActions.Noop,
findfamily/src/test/java/com/vayunmathur/findfamily/ui/MainPageActionsRealRepoTest.kt
diff --git a/findfamily/src/test/java/com/vayunmathur/findfamily/ui/MainPageActionsRealRepoTest.kt b/findfamily/src/test/java/com/vayunmathur/findfamily/ui/MainPageActionsRealRepoTest.ktindex 06647b583e..e388f02f8a 100644--- a/findfamily/src/test/java/com/vayunmathur/findfamily/ui/MainPageActionsRealRepoTest.kt+++ b/findfamily/src/test/java/com/vayunmathur/findfamily/ui/MainPageActionsRealRepoTest.kt@@ -105,24 +105,19 @@ class MainPageActionsRealRepoTest {         // Person-scoped actions live on the sheet destination / ViewModel.         vm.setUserSharing(alice, false)         assertTrue(awaitFamilyCondition { repo.getUser(aliceId)?.sendingEnabled == false })-        // Main actions: dialogs and waypoint creation.-        main.addPerson()-        assertEquals(Route.AddPersonDialog(), stack.last())-        stack.pop()-        main.addLink()-        assertEquals(Route.AddLinkDialog, stack.last())-        stack.pop()-        main.addTracker()-        assertEquals(Route.AddTrackerDialog, stack.last())-        stack.pop()+        // Main actions: top-bar back / Find Nearby and the history FAB.         main.onGpsWarningClick()         assertTrue(gpsShown)-        main.beginCreateWaypoint()-        assertEquals(Route.WaypointSheet(0L), stack.last())-        vm.mapState.setWaypointName("New Place")-        assertTrue(vm.mapState.saveCurrentWaypoint(0L))-        assertTrue(awaitFamilyCondition { repo.waypointStore.getAll().any { it.name == "New Place" } })+        family.selectUser(aliceId)+        assertEquals(Route.PersonSheet(aliceId), stack.last())+        main.findNearby()+        assertEquals(Route.UwbRangingPage(aliceId), stack.last())         stack.pop()+        main.showHistory()+        assertEquals(false, vm.isShowingPresent.value)+        vm.mapState.setShowingPresent(true)+        main.onNavigateBack()+        assertEquals(Route.MainPage, stack.last())         // History present/history toggling is MapPageState, driven by the sheet.         vm.mapState.setShowingPresent(false)         assertEquals(false, vm.isShowingPresent.value)
findfamily/src/test/java/com/vayunmathur/findfamily/ui/MainPageContentTest.kt
diff --git a/findfamily/src/test/java/com/vayunmathur/findfamily/ui/MainPageContentTest.kt b/findfamily/src/test/java/com/vayunmathur/findfamily/ui/MainPageContentTest.ktindex f7b8f7f6c6..7ffbda2078 100644--- a/findfamily/src/test/java/com/vayunmathur/findfamily/ui/MainPageContentTest.kt+++ b/findfamily/src/test/java/com/vayunmathur/findfamily/ui/MainPageContentTest.kt@@ -35,10 +35,8 @@ class MainPageContentTest {         sendingEnabled = true, requestStatus = RequestStatus.MUTUAL_CONNECTION, id = id)      private class RecordingActions : MainPageActions {-        var addPerson = 0-        var addLink = 0-        override fun addPerson() { addPerson++ }-        override fun addLink() { addLink++ }+        var findNearby = 0+        override fun findNearby() { findNearby++ }     }      private fun content(state: MainPageUiState, actions: MainPageActions) {
findfamily/src/test/java/com/vayunmathur/findfamily/ui/OverlayBarsTest.kt
diff --git a/findfamily/src/test/java/com/vayunmathur/findfamily/ui/OverlayBarsTest.kt b/findfamily/src/test/java/com/vayunmathur/findfamily/ui/OverlayBarsTest.ktindex e73f4f4736..fa82eee896 100644--- a/findfamily/src/test/java/com/vayunmathur/findfamily/ui/OverlayBarsTest.kt+++ b/findfamily/src/test/java/com/vayunmathur/findfamily/ui/OverlayBarsTest.kt@@ -41,18 +41,18 @@ class OverlayBarsTest {     @Test fun fabOverlayNothingSelected() {         rule.setContent {             Box(Modifier.fillMaxSize()) {-                MainFabOverlay(MainPageActions.Noop, 80.dp, { 0 },-                    MaterialTheme.colorScheme.primaryContainer, MaterialTheme.colorScheme.primary,+                MainFabOverlay(MainPageUiState(), MainPageActions.Noop, 80.dp, { 0 },+                    MaterialTheme.colorScheme.primaryContainer,                     MaterialTheme.colorScheme.onPrimaryContainer, lightColorScheme(), inPreview = false)             }         }         rule.waitForIdle()     }-    @Test fun fabOverlayInPreview() {+    @Test fun fabOverlayPersonSelected() {         rule.setContent {             Box(Modifier.fillMaxSize()) {-                MainFabOverlay(MainPageActions.Noop, 80.dp, { 0 },-                    MaterialTheme.colorScheme.primaryContainer, MaterialTheme.colorScheme.primary,+                MainFabOverlay(MainPageUiState(selectedUserId = 1L, isShowingPresent = true), MainPageActions.Noop, 80.dp, { 0 },+                    MaterialTheme.colorScheme.primaryContainer,                     MaterialTheme.colorScheme.onPrimaryContainer, lightColorScheme(), inPreview = true)             }         }
findfamily/src/test/java/com/vayunmathur/findfamily/util/W5UiContractTest.kt
diff --git a/findfamily/src/test/java/com/vayunmathur/findfamily/util/W5UiContractTest.kt b/findfamily/src/test/java/com/vayunmathur/findfamily/util/W5UiContractTest.ktindex 0982026867..7c2d1ae72a 100644--- a/findfamily/src/test/java/com/vayunmathur/findfamily/util/W5UiContractTest.kt+++ b/findfamily/src/test/java/com/vayunmathur/findfamily/util/W5UiContractTest.kt@@ -61,10 +61,9 @@ class W5UiContractTest {         person.setUserArrivalToggle(u, null)         person.setCrowdFinding(true)         val main = MainPageActions.Noop-        main.beginCreateWaypoint()-        main.addPerson()-        main.addLink()-        main.addTracker()+        main.onNavigateBack()+        main.findNearby()+        main.showHistory()         main.onGpsWarningClick()     }