Skip to content

Commit

Permalink
feat(iOS): Combined stop + trip promo UX (#713)
Browse files Browse the repository at this point in the history
* feat(iOS): Add feature promo for combined stop

* i18n: Add machine translations

* test: Add promo page tests

* i18n: Update no trip copy

* fix: Remove placeholder feature

* fix: Update VoiceOver string mentioned in QA

* fix: Broken tests
  • Loading branch information
EmmaSimon authored Feb 6, 2025
1 parent 69552f5 commit 67b29a5
Show file tree
Hide file tree
Showing 24 changed files with 432 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class StopDetailsNoTripCardTests {
composeTestRule
.onNodeWithText(
"Service is running, but predicted arrival times aren’t available." +
" The map shows where buses on this route currently are."
" Check the map to see where buses are right now."
)
.assertIsDisplayed()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ class TripHeaderCardTest {

composeTestRule
.onNodeWithContentDescription(
"bus Approaching stop, selected stop",
"Selected bus Approaching stop, selected stop",
useUnmergedTree = true
)
.assertIsDisplayed()
Expand All @@ -347,7 +347,10 @@ class TripHeaderCardTest {
}

composeTestRule
.onNodeWithContentDescription("bus Approaching other stop", useUnmergedTree = true)
.onNodeWithContentDescription(
"Selected bus Approaching other stop",
useUnmergedTree = true
)
.assertIsDisplayed()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@
<string name="vehicle_boarding_other">abordando ahora</string>
<string name="vehicle_cancelled_first">%1$s que llega a las %2$s cancelado</string>
<string name="vehicle_cancelled_other">y a las %1$s cancelado</string>
<string name="vehicle_desc_accessibility_desc">%1$s %2$s %3$s</string>
<string name="vehicle_prediction_minutes_first">%1$s llegará en %2$d min.</string>
<string name="vehicle_prediction_minutes_other">y en %1$d min.</string>
<string name="vehicle_prediction_time_first">%1$s llegará a la(s) %2$s</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@
<string name="vehicle_boarding_other">epi ap pran moun kounye a</string>
<string name="vehicle_cancelled_first">%1$s ap rive a %2$s anile</string>
<string name="vehicle_cancelled_other">epi a %1$s anile</string>
<string name="vehicle_desc_accessibility_desc">%1$s %2$s %3$s</string>
<string name="vehicle_prediction_minutes_first">%1$s ap rive nan %2$d minit</string>
<string name="vehicle_prediction_minutes_other">epi nan %1$d minit</string>
<string name="vehicle_prediction_time_first">%1$s ap rive a %2$s</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@
<string name="vehicle_boarding_other">e embarcando agora</string>
<string name="vehicle_cancelled_first">%1$s chegando às %2$s cancelado</string>
<string name="vehicle_cancelled_other">e às %1$s cancelado</string>
<string name="vehicle_desc_accessibility_desc">%1$s %2$s %3$s</string>
<string name="vehicle_prediction_minutes_first">%1$s chegando em %2$d min</string>
<string name="vehicle_prediction_minutes_other">e em %1$d min</string>
<string name="vehicle_prediction_time_first">%1$s chegando às %2$s</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@
<string name="vehicle_boarding_other">và đang cho khách lên</string>
<string name="vehicle_cancelled_first">%1$s đến %2$s bị hủy</string>
<string name="vehicle_cancelled_other">và tại %1$s đã hủy</string>
<string name="vehicle_desc_accessibility_desc">%1$s %2$s %3$s</string>
<string name="vehicle_prediction_minutes_first">%1$s sẽ đến sau %2$d phút nữa</string>
<string name="vehicle_prediction_minutes_other">và sau %1$d phút nữa</string>
<string name="vehicle_prediction_time_first">%1$s sẽ đến lúc %2$s</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@
<string name="vehicle_boarding_other">正在上客</string>
<string name="vehicle_cancelled_first">于%2$s到站的%1$s已取消</string>
<string name="vehicle_cancelled_other">于%1$s到站的下一趟车已取消</string>
<string name="vehicle_desc_accessibility_desc">%1$s %2$s %3$s</string>
<string name="vehicle_prediction_minutes_first">%1$s将在%2$d分钟内到站</string>
<string name="vehicle_prediction_minutes_other">下一趟车将在%1$d分钟内抵达</string>
<string name="vehicle_prediction_time_first">%1$s于%2$s到站</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@
<string name="vehicle_boarding_other">正在上客</string>
<string name="vehicle_cancelled_first">於%2$s到站的%1$s已取消</string>
<string name="vehicle_cancelled_other">於%1$s到站的下一趟車已取消</string>
<string name="vehicle_desc_accessibility_desc">%1$s %2$s %3$s</string>
<string name="vehicle_prediction_minutes_first">%1$s將在%2$d分鐘內到站</string>
<string name="vehicle_prediction_minutes_other">下一趟車將在%1$d分鐘內抵達</string>
<string name="vehicle_prediction_time_first">%1$s於%2$s到站</string>
Expand Down
6 changes: 3 additions & 3 deletions androidApp/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
<string name="police_action">Police Action</string>
<string name="police_activity">Police Activity</string>
<string name="power_problem">Power Problem</string>
<string name="predictions_unavailable_details">Service is running, but predicted arrival times aren’t available. The map shows where %1$s on this route currently are.</string>
<string name="predictions_unavailable_details">Service is running, but predicted arrival times aren’t available. Check the map to see where %1$s are right now.</string>
<string name="predictions_unavailable_details_hide_maps">Service is running, but predicted arrival times aren’t available.</string>
<string name="real_time_arrivals_updating_live">Real-time arrivals updating live</string>
<string name="recenter" tools:ignore="MissingTranslation">Recenter</string>
Expand Down Expand Up @@ -216,8 +216,8 @@
<string name="vehicle_boarding_other">and boarding now</string>
<string name="vehicle_cancelled_first">%1$s arriving at %2$s cancelled</string>
<string name="vehicle_cancelled_other">and at %1$s cancelled</string>
<string name="vehicle_desc_accessibility_desc">%1$s %2$s %3$s</string>
<string name="vehicle_desc_accessibility_desc_selected_stop" translatable="false">%1$s %2$s %3$s, selected stop</string>
<string name="vehicle_desc_accessibility_desc" translatable="false">Selected %1$s %2$s %3$s</string>
<string name="vehicle_desc_accessibility_desc_selected_stop" translatable="false">Selected %1$s %2$s %3$s, selected stop</string>
<string name="vehicle_prediction_minutes_first">%1$s arriving in %2$d min</string>
<string name="vehicle_prediction_minutes_other">and in %1$d min</string>
<string name="vehicle_prediction_time_first">%1$s arriving at %2$s</string>
Expand Down
42 changes: 37 additions & 5 deletions iosApp/iosApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
9A6FA0232BC70D0B0067769C /* InspectionEmissary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6FA0222BC70D0A0067769C /* InspectionEmissary.swift */; };
9A6FA0252BC714360067769C /* HomeMapViewTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6FA0242BC714360067769C /* HomeMapViewTest.swift */; };
9A6FA0282BC72F110067769C /* LegacyStopDetailsPageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6FA0272BC72F110067769C /* LegacyStopDetailsPageTests.swift */; };
9A719E152CD12309007377F7 /* OnboardingButtonModifiers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A719E142CD12309007377F7 /* OnboardingButtonModifiers.swift */; };
9A719E152CD12309007377F7 /* FullWidthButtonModifiers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A719E142CD12309007377F7 /* FullWidthButtonModifiers.swift */; };
9A719E172CD1725E007377F7 /* UIWindowExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A719E162CD1725E007377F7 /* UIWindowExtension.swift */; };
9A74A2112BE2D71400E57102 /* AnnotationLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A74A2102BE2D71400E57102 /* AnnotationLabel.swift */; };
9A76022D2C5468C300B69A35 /* AlertIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A76022C2C5468C300B69A35 /* AlertIcon.swift */; };
Expand Down Expand Up @@ -204,6 +204,10 @@
9AAA26A12C2DB43600A7745A /* PredictionRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AAA26A02C2DB43600A7745A /* PredictionRowView.swift */; };
9AAA26A32C2DB79E00A7745A /* DirectionRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AAA26A22C2DB79E00A7745A /* DirectionRowView.swift */; };
9AAA26A72C2DC06700A7745A /* DirectionLabelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AAA26A62C2DC06600A7745A /* DirectionLabelTests.swift */; };
9AB335192D53ECBA0041A109 /* PromoPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AB335182D53ECBA0041A109 /* PromoPage.swift */; };
9AB3351B2D53ECC70041A109 /* PromoScreenView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AB3351A2D53ECC70041A109 /* PromoScreenView.swift */; };
9AB3351F2D5403200041A109 /* PromoPageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AB3351E2D5403200041A109 /* PromoPageTests.swift */; };
9AB335212D5404A60041A109 /* PromoScreenViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AB335202D5404A60041A109 /* PromoScreenViewTests.swift */; };
9AB3F50D2BE44B49008D9E40 /* FirebaseAnalyticsWithoutAdIdSupport in Frameworks */ = {isa = PBXBuildFile; productRef = 9AB3F50C2BE44B49008D9E40 /* FirebaseAnalyticsWithoutAdIdSupport */; };
9AB3F50F2BE45382008D9E40 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9AB3F50E2BE45382008D9E40 /* GoogleService-Info.plist */; };
9AB44A112B8FC43E00E8FFB3 /* ErrorCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AB44A102B8FC43E00E8FFB3 /* ErrorCard.swift */; };
Expand Down Expand Up @@ -477,7 +481,7 @@
9A6FA0222BC70D0A0067769C /* InspectionEmissary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectionEmissary.swift; sourceTree = "<group>"; };
9A6FA0242BC714360067769C /* HomeMapViewTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeMapViewTest.swift; sourceTree = "<group>"; };
9A6FA0272BC72F110067769C /* LegacyStopDetailsPageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LegacyStopDetailsPageTests.swift; sourceTree = "<group>"; };
9A719E142CD12309007377F7 /* OnboardingButtonModifiers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingButtonModifiers.swift; sourceTree = "<group>"; };
9A719E142CD12309007377F7 /* FullWidthButtonModifiers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FullWidthButtonModifiers.swift; sourceTree = "<group>"; };
9A719E162CD1725E007377F7 /* UIWindowExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIWindowExtension.swift; sourceTree = "<group>"; };
9A74A2102BE2D71400E57102 /* AnnotationLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnnotationLabel.swift; sourceTree = "<group>"; };
9A76022C2C5468C300B69A35 /* AlertIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertIcon.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -510,6 +514,10 @@
9AAA26A02C2DB43600A7745A /* PredictionRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PredictionRowView.swift; sourceTree = "<group>"; };
9AAA26A22C2DB79E00A7745A /* DirectionRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DirectionRowView.swift; sourceTree = "<group>"; };
9AAA26A62C2DC06600A7745A /* DirectionLabelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DirectionLabelTests.swift; sourceTree = "<group>"; };
9AB335182D53ECBA0041A109 /* PromoPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromoPage.swift; sourceTree = "<group>"; };
9AB3351A2D53ECC70041A109 /* PromoScreenView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromoScreenView.swift; sourceTree = "<group>"; };
9AB3351E2D5403200041A109 /* PromoPageTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromoPageTests.swift; sourceTree = "<group>"; };
9AB335202D5404A60041A109 /* PromoScreenViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromoScreenViewTests.swift; sourceTree = "<group>"; };
9AB3F50E2BE45382008D9E40 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
9AB44A102B8FC43E00E8FFB3 /* ErrorCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorCard.swift; sourceTree = "<group>"; };
9AB44A122B911E6400E8FFB3 /* DateExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateExtension.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -863,7 +871,6 @@
children = (
8C97F7C82CCBF4E100A06B34 /* OnboardingPage.swift */,
8C97F7CF2CCC01E200A06B34 /* OnboardingScreenView.swift */,
9A719E142CD12309007377F7 /* OnboardingButtonModifiers.swift */,
);
path = Onboarding;
sourceTree = "<group>";
Expand Down Expand Up @@ -918,6 +925,7 @@
8C3D640E2BE19DA60026DD53 /* More */,
9A2005C12B97B56C00F562E1 /* NearbyTransit */,
8C97F7C92CCBF4E100A06B34 /* Onboarding */,
9AB335172D53EC920041A109 /* Promo */,
9A2005C32B97B5A000F562E1 /* Search */,
9AFCD9DD2CE66AE1001A2384 /* StopDetails */,
8C5054562BB5EB5000C6A51C /* LegacyStopDetails */,
Expand Down Expand Up @@ -1056,6 +1064,7 @@
9A5B275E2BB24326009A6FC6 /* Map */,
6EF64C012C1B7C17005F365D /* NearbyTransit */,
8CD423F02CD009E300C8569E /* Onboarding */,
9AB3351D2D5403040041A109 /* Promo */,
8CD81A222BE55B150090585F /* Settings */,
9A2BCBDC2CED35FF00FB2913 /* StopDetails */,
8CB823D72BC5EDBF002C87E0 /* LegacyStopDetails */,
Expand Down Expand Up @@ -1094,10 +1103,27 @@
path = AlertDetails;
sourceTree = "<group>";
};
9AB335172D53EC920041A109 /* Promo */ = {
isa = PBXGroup;
children = (
9AB335182D53ECBA0041A109 /* PromoPage.swift */,
9AB3351A2D53ECC70041A109 /* PromoScreenView.swift */,
);
path = Promo;
sourceTree = "<group>";
};
9AB3351D2D5403040041A109 /* Promo */ = {
isa = PBXGroup;
children = (
9AB3351E2D5403200041A109 /* PromoPageTests.swift */,
9AB335202D5404A60041A109 /* PromoScreenViewTests.swift */,
);
path = Promo;
sourceTree = "<group>";
};
9AC10BD82B80060E00EA4605 /* Utils */ = {
isa = PBXGroup;
children = (
ED85C0272D42CAD2007F91A7 /* SelectedTab.swift */,
6EC6F18C2CE661680022799F /* AlertExtension.swift */,
8C1587032C76524600AB5036 /* AppVariantExtension.swift */,
EDDE72EE2CBF19EF0000180D /* ArrayExtension.swift */,
Expand All @@ -1112,6 +1138,7 @@
9A6DDF902B976FDF004D141A /* EmptyWhenModifier.swift */,
8CE36C8E2CAB231500D77F22 /* FetchApi.swift */,
8C72B12D2D396D6400A6E73E /* FormattedAlert.swift */,
9A719E142CD12309007377F7 /* FullWidthButtonModifiers.swift */,
9ADB849C2BAD05BC006581CE /* Inspection.swift */,
8CE1D6752CC9690400E3BDB1 /* LoadingPlaceholderModifier.swift */,
8CD79F102C46F6E200AFF17D /* MapboxBridge.swift */,
Expand All @@ -1121,6 +1148,7 @@
9A18DEAC2D07DDC800DA0A3B /* RouteExtension.swift */,
9A4850562CB56A1500F50EE7 /* RouteTypeExtension.swift */,
6EFEE42C2BED0FA800810319 /* ScenePhaseChangeModifier.swift */,
ED85C0272D42CAD2007F91A7 /* SelectedTab.swift */,
9A3739972D41450100BBE127 /* SettingsExtension.swift */,
8CE0141A2BBF059A00918FAE /* SheetNavigationStackEntry.swift */,
9ADB84A12BAE37C0006581CE /* StopExtension.swift */,
Expand Down Expand Up @@ -1517,6 +1545,7 @@
6E973DAB2C178C0200CBF341 /* SheetHeaderTests.swift in Sources */,
8C7FA86F2B5EEA34009B699D /* LocationDataManagerTests.swift in Sources */,
6EED5E8F2B3DC6A00052A1B8 /* IosAppTests.swift in Sources */,
9AB3351F2D5403200041A109 /* PromoPageTests.swift in Sources */,
6EA231732C21C58A00789173 /* NearbyTransitPageViewTests.swift in Sources */,
8C7FA8712B5F2EF2009B699D /* NearbyTransitViewTests.swift in Sources */,
8C5F47662C40842200FB71DA /* TripDetailsStopViewTests.swift in Sources */,
Expand All @@ -1525,6 +1554,7 @@
9AF29E042CFA3F77005AA4A3 /* DepartureTileTests.swift in Sources */,
8CA1FB772BF813F500384658 /* TripDetailsStopListSplitViewTests.swift in Sources */,
6E2D6CA12CC2EDD700959605 /* ErrorBannerViewModelTests.swift in Sources */,
9AB335212D5404A60041A109 /* PromoScreenViewTests.swift in Sources */,
8CB823DB2BC5F053002C87E0 /* StopDetailsRoutesViewTests.swift in Sources */,
6E4EACFC2B7A82AC0011AB8B /* MockLocationFetcher.swift in Sources */,
9A8E55AE2CFE6E55004ED059 /* StopDetailsFilteredHeaderTests.swift in Sources */,
Expand Down Expand Up @@ -1666,11 +1696,12 @@
9AC4FDF12BACE216004479BF /* NearbyTransitPageView.swift in Sources */,
7555FF83242A565900829871 /* ContentView.swift in Sources */,
ED85C0282D42CAD5007F91A7 /* SelectedTab.swift in Sources */,
9AB335192D53ECBA0041A109 /* PromoPage.swift in Sources */,
9AAA26A32C2DB79E00A7745A /* DirectionRowView.swift in Sources */,
9ADB84A22BAE37C0006581CE /* StopExtension.swift in Sources */,
9AF093782BD943A4001DF39F /* DirectionPicker.swift in Sources */,
9AB44A112B8FC43E00E8FFB3 /* ErrorCard.swift in Sources */,
9A719E152CD12309007377F7 /* OnboardingButtonModifiers.swift in Sources */,
9A719E152CD12309007377F7 /* FullWidthButtonModifiers.swift in Sources */,
ED87C88D2C10E754009D398F /* PhoenixChannelError.swift in Sources */,
8C05C57F2CD56891000381E8 /* DependencyExtension.swift in Sources */,
9A37F3072BACCCA5001714FE /* CoordinateExtension.swift in Sources */,
Expand Down Expand Up @@ -1701,6 +1732,7 @@
8C5054A02CA47C3C00137CFE /* ErrorBanner.swift in Sources */,
9AF28F112D2D8D2A00EC1C12 /* StopDetailsIconCard.swift in Sources */,
9A18DEAD2D07DDC800DA0A3B /* RouteExtension.swift in Sources */,
9AB3351B2D53ECC70041A109 /* PromoScreenView.swift in Sources */,
6E973DA52C17384C00CBF341 /* SheetHeader.swift in Sources */,
9A9E7DD32C2203BE000DA1FD /* TransitCard.swift in Sources */,
9AF29DFA2CF548E5005AA4A3 /* StopDetailsUnfilteredView.swift in Sources */,
Expand Down
4 changes: 4 additions & 0 deletions iosApp/iosApp/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ struct ContentView: View {
OnboardingPage(screens: onboardingScreensPending, onFinish: {
contentVM.onboardingScreensPending = []
})
} else if let featurePromosPending = contentVM.featurePromosPending, !featurePromosPending.isEmpty {
PromoPage(screens: featurePromosPending, onFinish: {
contentVM.featurePromosPending = []
})
} else {
TabView(selection: $selectedTab) {
nearbyTab
Expand Down
Loading

0 comments on commit 67b29a5

Please sign in to comment.