diff --git a/androidApp/src/androidTest/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsRoutesViewTest.kt b/androidApp/src/androidTest/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsRoutesViewTest.kt index 202a4ef6a..8b20eba70 100644 --- a/androidApp/src/androidTest/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsRoutesViewTest.kt +++ b/androidApp/src/androidTest/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsRoutesViewTest.kt @@ -3,6 +3,7 @@ package com.mbta.tid.mbta_app.android.stopDetails import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.ui.test.junit4.createComposeRule +import androidx.compose.ui.test.onNodeWithContentDescription import androidx.compose.ui.test.onNodeWithText import com.mbta.tid.mbta_app.model.LocationType import com.mbta.tid.mbta_app.model.ObjectCollectionBuilder @@ -126,4 +127,44 @@ class StopDetailsRoutesViewTest { composeTestRule.onNodeWithText("Sample Headsign").assertExists() composeTestRule.onNodeWithText("1 min").assertExists() } + + @Test + fun testLoadingStateFiltered() { + composeTestRule.setContent { + val filterState = remember { + mutableStateOf(StopDetailsFilter("routeId", 1)) + } + + StopDetailsRoutesView( + departures = null, + global = globalResponse, + now = now, + pinRoute = {}, + pinnedRoutes = emptySet(), + filter = filterState.value, + updateStopFilter = filterState::value::set + ) + } + + composeTestRule.onNodeWithContentDescription("Loading...").assertExists() + } + + @Test + fun testLoadingStateUnfiltered() { + composeTestRule.setContent { + val filterState = remember { mutableStateOf(null) } + + StopDetailsRoutesView( + departures = null, + global = globalResponse, + now = now, + pinRoute = {}, + pinnedRoutes = emptySet(), + filter = filterState.value, + updateStopFilter = filterState::value::set + ) + } + + composeTestRule.onNodeWithContentDescription("Loading...").assertExists() + } } diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/DirectionLabel.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/DirectionLabel.kt index cbcba3395..e7c789f56 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/DirectionLabel.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/DirectionLabel.kt @@ -9,6 +9,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.sp import com.mbta.tid.mbta_app.android.R +import com.mbta.tid.mbta_app.android.util.modifiers.placeholderIfLoading import com.mbta.tid.mbta_app.model.Direction private val localizedDirectionNames: Map = @@ -35,14 +36,21 @@ fun DirectionLabel(direction: Direction, modifier: Modifier = Modifier) { R.string.directionTo, stringResource(directionNameFormatted(direction)) ), - fontSize = 13.sp + fontSize = 13.sp, + modifier = Modifier.placeholderIfLoading() + ) + Text( + destination, + fontSize = 17.sp, + fontWeight = FontWeight.SemiBold, + modifier = Modifier.placeholderIfLoading() ) - Text(destination, fontSize = 17.sp, fontWeight = FontWeight.SemiBold) } else { Text( stringResource(directionNameFormatted(direction)), fontSize = 17.sp, - fontWeight = FontWeight.SemiBold + fontWeight = FontWeight.SemiBold, + modifier = Modifier.placeholderIfLoading() ) } } diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/HeadsignRowView.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/HeadsignRowView.kt index 600fb888c..1367d64f9 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/HeadsignRowView.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/HeadsignRowView.kt @@ -8,7 +8,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.tooling.preview.Preview import com.mbta.tid.mbta_app.android.MyApplicationTheme -import com.mbta.tid.mbta_app.android.util.placeholderIfLoading +import com.mbta.tid.mbta_app.android.util.modifiers.placeholderIfLoading import com.mbta.tid.mbta_app.model.Alert import com.mbta.tid.mbta_app.model.ObjectCollectionBuilder.Single.alert import com.mbta.tid.mbta_app.model.ObjectCollectionBuilder.Single.route diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/LoadingRouteCard.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/LoadingRouteCard.kt index 8f2406cd8..daf71a187 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/LoadingRouteCard.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/LoadingRouteCard.kt @@ -3,24 +3,15 @@ package com.mbta.tid.mbta_app.android.component import androidx.compose.foundation.layout.Column import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource -import androidx.compose.ui.semantics.clearAndSetSemantics -import androidx.compose.ui.semantics.contentDescription -import com.mbta.tid.mbta_app.android.R import com.mbta.tid.mbta_app.android.nearbyTransit.NearbyRouteView +import com.mbta.tid.mbta_app.android.util.modifiers.loadingShimmer import com.mbta.tid.mbta_app.model.LoadingPlaceholders -import com.valentinilk.shimmer.shimmer import kotlinx.datetime.Clock @Composable fun LoadingRouteCard() { val placeholderRouteData = LoadingPlaceholders.nearbyRoute() - - val contentDesc = stringResource(R.string.loading) - - Column( - modifier = Modifier.shimmer().clearAndSetSemantics { contentDescription = contentDesc } - ) { + Column(modifier = Modifier.loadingShimmer()) { NearbyRouteView(placeholderRouteData, false, {}, Clock.System.now(), { _, _ -> }) } } diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/PinButton.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/PinButton.kt index fb3171888..3f6c78eae 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/PinButton.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/PinButton.kt @@ -11,7 +11,7 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.mbta.tid.mbta_app.android.R -import com.mbta.tid.mbta_app.android.util.placeholderIfLoading +import com.mbta.tid.mbta_app.android.util.modifiers.placeholderIfLoading @Composable fun PinButton(pinned: Boolean, color: Color, action: () -> Unit) { diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/PredictionRowView.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/PredictionRowView.kt index fe34ff0dc..0b5a5d612 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/PredictionRowView.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/PredictionRowView.kt @@ -20,7 +20,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.mbta.tid.mbta_app.android.R import com.mbta.tid.mbta_app.android.generated.drawableByName -import com.mbta.tid.mbta_app.android.util.placeholderIfLoading +import com.mbta.tid.mbta_app.android.util.modifiers.placeholderIfLoading import com.mbta.tid.mbta_app.model.RealtimePatterns import com.mbta.tid.mbta_app.model.Route diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/TransitHeader.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/TransitHeader.kt index 368333a55..7ffbf6b47 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/TransitHeader.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/TransitHeader.kt @@ -22,7 +22,7 @@ import androidx.compose.ui.semantics.semantics import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import com.mbta.tid.mbta_app.android.util.placeholderIfLoading +import com.mbta.tid.mbta_app.android.util.modifiers.placeholderIfLoading @Composable fun TransitHeader( diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/UpcomingTripView.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/UpcomingTripView.kt index 79f0aa53f..0e09da09f 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/UpcomingTripView.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/component/UpcomingTripView.kt @@ -33,7 +33,7 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.mbta.tid.mbta_app.android.R import com.mbta.tid.mbta_app.android.util.UpcomingTripAccessibilityFormatters -import com.mbta.tid.mbta_app.android.util.placeholderIfLoading +import com.mbta.tid.mbta_app.android.util.modifiers.placeholderIfLoading import com.mbta.tid.mbta_app.android.util.typeText import com.mbta.tid.mbta_app.model.Alert import com.mbta.tid.mbta_app.model.RealtimePatterns diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/nearbyTransit/NearbyStopView.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/nearbyTransit/NearbyStopView.kt index 6e48415dc..8e5b18db4 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/nearbyTransit/NearbyStopView.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/nearbyTransit/NearbyStopView.kt @@ -12,7 +12,7 @@ import androidx.compose.ui.res.colorResource import androidx.compose.ui.unit.dp import com.mbta.tid.mbta_app.android.R import com.mbta.tid.mbta_app.android.component.StopDeparturesSummaryList -import com.mbta.tid.mbta_app.android.util.placeholderIfLoading +import com.mbta.tid.mbta_app.android.util.modifiers.placeholderIfLoading import com.mbta.tid.mbta_app.model.PatternsByStop import com.mbta.tid.mbta_app.model.StopDetailsFilter import com.mbta.tid.mbta_app.model.TripInstantDisplay diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/nearbyTransit/NearbyTransitView.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/nearbyTransit/NearbyTransitView.kt index 0aa38b5a9..bdafb2b95 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/nearbyTransit/NearbyTransitView.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/nearbyTransit/NearbyTransitView.kt @@ -13,7 +13,6 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.compositionLocalOf import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource @@ -26,6 +25,7 @@ import com.mbta.tid.mbta_app.android.component.ErrorBannerViewModel import com.mbta.tid.mbta_app.android.component.LoadingRouteCard import com.mbta.tid.mbta_app.android.state.getSchedule import com.mbta.tid.mbta_app.android.state.subscribeToPredictions +import com.mbta.tid.mbta_app.android.util.IsLoadingSheetContents import com.mbta.tid.mbta_app.android.util.managePinnedRoutes import com.mbta.tid.mbta_app.android.util.rememberSuspend import com.mbta.tid.mbta_app.android.util.timer @@ -40,8 +40,6 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import org.koin.androidx.compose.koinViewModel -val IsLoadingSheetContents = compositionLocalOf { false } - @Composable fun NearbyTransitView( alertData: AlertsStreamDataResponse?, diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/LoadingStopDetailsView.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/LoadingStopDetailsView.kt new file mode 100644 index 000000000..dde7e2ea9 --- /dev/null +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/LoadingStopDetailsView.kt @@ -0,0 +1,47 @@ +package com.mbta.tid.mbta_app.android.stopDetails + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import com.mbta.tid.mbta_app.android.util.IsLoadingSheetContents +import com.mbta.tid.mbta_app.android.util.modifiers.loadingShimmer +import com.mbta.tid.mbta_app.model.LoadingPlaceholders +import com.mbta.tid.mbta_app.model.StopDetailsFilter +import kotlinx.datetime.Clock + +@Composable +fun LoadingStopDetailsView(filter: StopDetailsFilter?) { + Column { + CompositionLocalProvider(IsLoadingSheetContents provides true) { + Column(modifier = Modifier.loadingShimmer()) { + if (filter == null) { + Column( + modifier = + Modifier.verticalScroll(rememberScrollState()).padding(8.dp).weight(1f) + ) { + val placeholderPatterns = LoadingPlaceholders.patternsByStop() + StopDetailsRouteView( + LoadingPlaceholders.patternsByStop(), + Clock.System.now(), + pinned = false, + onPin = {}, + {} + ) + } + } else { + StopDetailsFilteredRouteView( + departures = LoadingPlaceholders.stopDetailsDepartures(filter), + global = null, + now = Clock.System.now(), + filter = filter + ) {} + } + } + } + } +} diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsRoutesView.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsRoutesView.kt index b50697bb4..ec7736607 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsRoutesView.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsRoutesView.kt @@ -26,7 +26,7 @@ import kotlinx.datetime.Instant @Composable fun StopDetailsRoutesView( - departures: StopDetailsDepartures, + departures: StopDetailsDepartures?, global: GlobalResponse?, now: Instant, filter: StopDetailsFilter?, @@ -34,7 +34,9 @@ fun StopDetailsRoutesView( pinnedRoutes: Set, updateStopFilter: (StopDetailsFilter?) -> Unit ) { - if (filter != null) { + if (departures == null) { + LoadingStopDetailsView(filter) + } else if (filter != null) { StopDetailsFilteredRouteView( departures = departures, global = global, diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsView.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsView.kt index 64468dfc0..85063b551 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsView.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsView.kt @@ -4,7 +4,6 @@ import androidx.compose.foundation.border import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.HorizontalDivider import androidx.compose.runtime.Composable import androidx.compose.runtime.remember @@ -92,18 +91,14 @@ fun StopDetailsView( ErrorBanner(errorBannerViewModel) - if (departures != null) { - StopDetailsRoutesView( - departures, - globalResponse, - now, - filter ?: departures.autoStopFilter(), - togglePinnedRoute, - pinnedRoutes, - updateStopFilter - ) - } else { - CircularProgressIndicator() - } + StopDetailsRoutesView( + departures, + globalResponse, + now, + filter ?: departures?.autoStopFilter(), + togglePinnedRoute, + pinnedRoutes, + updateStopFilter + ) } } diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/Locals.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/Locals.kt index 8ba21f7dd..a81e954e9 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/Locals.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/Locals.kt @@ -1,6 +1,7 @@ package com.mbta.tid.mbta_app.android.util import android.app.Activity +import androidx.compose.runtime.compositionLocalOf import androidx.compose.runtime.staticCompositionLocalOf import com.google.android.gms.location.FusedLocationProviderClient @@ -11,3 +12,9 @@ val LocalLocationClient = staticCompositionLocalOf { throw IllegalStateException("no location client") } + +/** + * Whether the sheet contents are loading. Used by low-level child views to determine whether they + * should be styled as placeholders by `Modifier.placeholderIfLoading()` + */ +val IsLoadingSheetContents = compositionLocalOf { false } diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/LoadingPlaceholderModifier.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/modifiers/LoadingPlaceholder.kt similarity index 73% rename from androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/LoadingPlaceholderModifier.kt rename to androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/modifiers/LoadingPlaceholder.kt index 6cfa4688c..09a9001b8 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/LoadingPlaceholderModifier.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/modifiers/LoadingPlaceholder.kt @@ -1,9 +1,9 @@ -package com.mbta.tid.mbta_app.android.util +package com.mbta.tid.mbta_app.android.util.modifiers import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import com.eygraber.compose.placeholder.material3.placeholder -import com.mbta.tid.mbta_app.android.nearbyTransit.IsLoadingSheetContents +import com.mbta.tid.mbta_app.android.util.IsLoadingSheetContents @Composable fun Modifier.placeholderIfLoading(): Modifier { diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/modifiers/LoadingShimmer.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/modifiers/LoadingShimmer.kt new file mode 100644 index 000000000..e0e173908 --- /dev/null +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/util/modifiers/LoadingShimmer.kt @@ -0,0 +1,15 @@ +package com.mbta.tid.mbta_app.android.util.modifiers + +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.semantics.clearAndSetSemantics +import androidx.compose.ui.semantics.contentDescription +import com.mbta.tid.mbta_app.android.R +import com.valentinilk.shimmer.shimmer + +@Composable +fun Modifier.loadingShimmer(): Modifier { + val contentDesc = stringResource(R.string.loading) + return this then Modifier.shimmer().clearAndSetSemantics { contentDescription = contentDesc } +} diff --git a/androidApp/src/main/res/values-b+es/strings_ios_converted.xml b/androidApp/src/main/res/values-b+es/strings_ios_converted.xml index ada7b7293..b170efd3b 100644 --- a/androidApp/src/main/res/values-b+es/strings_ios_converted.xml +++ b/androidApp/src/main/res/values-b+es/strings_ios_converted.xml @@ -63,10 +63,10 @@ Ver código fuente en GitHub Términos de uso Saliente + Visto recientemente Refrescar Refrescar predicciones Recargar datos - Visto recientemente Información de tarifas Boletos de tren de cercanías y ferri mTicket App diff --git a/androidApp/src/main/res/values-b+ht/strings_ios_converted.xml b/androidApp/src/main/res/values-b+ht/strings_ios_converted.xml index 5e7eb593c..10ee04ae2 100644 --- a/androidApp/src/main/res/values-b+ht/strings_ios_converted.xml +++ b/androidApp/src/main/res/values-b+ht/strings_ios_converted.xml @@ -63,10 +63,10 @@ Gade sous sou GitHub Kondisyon itilizasyon Soti + Sa w fenk sot Wè Rafrechi Rafrechi prediksyon Rechaje done - Sa w fenk sot Wè Enfòmasyon Tarif Tikè Tren Vil la ak Bato Aplikasyon mTicket diff --git a/androidApp/src/main/res/values-b+pt+BR/strings_ios_converted.xml b/androidApp/src/main/res/values-b+pt+BR/strings_ios_converted.xml index 66232af89..ef4a78327 100644 --- a/androidApp/src/main/res/values-b+pt+BR/strings_ios_converted.xml +++ b/androidApp/src/main/res/values-b+pt+BR/strings_ios_converted.xml @@ -63,10 +63,10 @@ Exibir origem no GitHub Termos de Uso Saída + Visto(s) recentemente Atualizar Atualizar previsões Recarregar dados - Visto(s) recentemente Informações sobre tarifas Bilhetes de transporte diário por trem e balsa Aplicativo mTicket diff --git a/androidApp/src/main/res/values-b+vi/strings_ios_converted.xml b/androidApp/src/main/res/values-b+vi/strings_ios_converted.xml index 80677f648..06567cc03 100644 --- a/androidApp/src/main/res/values-b+vi/strings_ios_converted.xml +++ b/androidApp/src/main/res/values-b+vi/strings_ios_converted.xml @@ -63,10 +63,10 @@ Xem nguồn trên GitHub Điều khoản sử dụng Đi + Đã xem gần đây Làm mới Làm mới dự đoán Tải lại dữ liệu - Đã xem gần đây Thông tin giá vé Vé phà vé đường sắt ngoại ô (Commuter Rail) Ứng dụng mTicket diff --git a/androidApp/src/main/res/values-b+zh+Hans+CN/strings_ios_converted.xml b/androidApp/src/main/res/values-b+zh+Hans+CN/strings_ios_converted.xml index 1cf3a3212..2d75ded1b 100644 --- a/androidApp/src/main/res/values-b+zh+Hans+CN/strings_ios_converted.xml +++ b/androidApp/src/main/res/values-b+zh+Hans+CN/strings_ios_converted.xml @@ -63,10 +63,10 @@ 在GitHub上查看源代码 使用条款 出站 + 近期查看过 刷新 刷新预测 重新加载数据 - 近期查看过 票价信息 通勤列车和轮渡票 mTicket应用程序 diff --git a/androidApp/src/main/res/values-b+zh+Hant+TW/strings_ios_converted.xml b/androidApp/src/main/res/values-b+zh+Hant+TW/strings_ios_converted.xml index 39d01ce38..531de7434 100644 --- a/androidApp/src/main/res/values-b+zh+Hant+TW/strings_ios_converted.xml +++ b/androidApp/src/main/res/values-b+zh+Hant+TW/strings_ios_converted.xml @@ -63,10 +63,10 @@ 在GitHub上查看原始程式碼 使用條款 出站 + 近期查看過 重新整理 重新整理預測 重新載入資料 - 近期查看過 票價資訊 通勤列車和輪渡票 mTicket應用程式 diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml index 1613948c0..649c77dd5 100644 --- a/androidApp/src/main/res/values/strings.xml +++ b/androidApp/src/main/res/values/strings.xml @@ -12,6 +12,7 @@ Detour %1$s to Eastbound + Error loading data Debug Mode Route Search Send app feedback @@ -65,6 +66,9 @@ Outbound Recenter Recently Viewed + Refresh + Refresh predictions + Reload data Fare Information Commuter Rail and Ferry tickets mTicket App @@ -78,10 +82,14 @@ Star route pin route to the top of the list Stop Closed + Apply a filter so that only arrivals from this route are displayed + Remove the filter and display all routes Suspension train trains + Unable to connect unpin route from the top of the list + Updated %1$d minutes ago %1$s arriving now and arriving now %1$s boarding now @@ -97,12 +105,4 @@ %1$s arriving at %2$s scheduled and at %1$s scheduled Westbound - Apply a filter so that only arrivals from this route are displayed - Remove the filter and display all routes - Refresh - Refresh predictions - Updated %1$d minutes ago - Unable to connect - Reload data - Error loading data diff --git a/iosApp/iosApp/Utils/LoadingPlaceholderModifier.swift b/iosApp/iosApp/Utils/LoadingPlaceholderModifier.swift index f3617b402..e26f2747f 100644 --- a/iosApp/iosApp/Utils/LoadingPlaceholderModifier.swift +++ b/iosApp/iosApp/Utils/LoadingPlaceholderModifier.swift @@ -11,7 +11,12 @@ import SwiftUI struct LoadingPlaceholderModifier: ViewModifier { func body(content: Content) -> some View { - content.redacted(reason: .placeholder).shimmering().allowsHitTesting(false) + content + .redacted(reason: .placeholder) + .shimmering() + .allowsHitTesting(false) + .accessibilityElement(children: .ignore) + .accessibilityLabel("Loading...") } }