Skip to content

Commit 26ce95e

Browse files
committed
Merge branch 'dev' into feature-crossing-island
2 parents 025c987 + e1420dc commit 26ce95e

File tree

18 files changed

+207
-23
lines changed

18 files changed

+207
-23
lines changed

GoInfoGame/GoInfoGame.xcodeproj/project.pbxproj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
971575192B5FFE910044797C /* LocationManagerCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971575182B5FFE910044797C /* LocationManagerCoordinator.swift */; };
3434
971F9FDF2B847349005397CC /* CrossingIslandForm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971F9FDE2B847349005397CC /* CrossingIslandForm.swift */; };
3535
971F9FE12B847358005397CC /* CrossingIsland.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971F9FE02B847358005397CC /* CrossingIsland.swift */; };
36+
971F9FDC2B836DF3005397CC /* CustomNoteAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971F9FDB2B836DF3005397CC /* CustomNoteAlert.swift */; };
3637
972454152B14A49A0036B91A /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 972454142B14A49A0036B91A /* Extensions.swift */; };
3738
973FBFFE2B46BB3800878269 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973FBFFD2B46BB3800878269 /* Utils.swift */; };
3839
973FC0012B46CD5D00878269 /* QuestsListUIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973FC0002B46CD5D00878269 /* QuestsListUIView.swift */; };
@@ -64,6 +65,8 @@
6465
97AC1C0F2B70CEF5004F0BF4 /* SidewalkSurface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AC1C0E2B70CEF5004F0BF4 /* SidewalkSurface.swift */; };
6566
97AC1C112B70CF03004F0BF4 /* SidewalkSurfaceForm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AC1C102B70CF03004F0BF4 /* SidewalkSurfaceForm.swift */; };
6667
97AC1C132B70EF0A004F0BF4 /* Surfaces.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AC1C122B70EF0A004F0BF4 /* Surfaces.swift */; };
68+
97AC1C212B726AC9004F0BF4 /* TactilePavingKerb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AC1C202B726AC9004F0BF4 /* TactilePavingKerb.swift */; };
69+
97AC1C232B726ADC004F0BF4 /* TactilePavingKerbForm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AC1C222B726ADC004F0BF4 /* TactilePavingKerbForm.swift */; };
6770
97F2FA8A2B0630A3000B9726 /* Pods_GoInfoGame.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66BED441AF03CC04539E8D4A /* Pods_GoInfoGame.framework */; };
6871
A40004EC2B62338400AF21FB /* AppQuestManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A40004EB2B62338400AF21FB /* AppQuestManager.swift */; };
6972
A40E72642B5CD65000328848 /* OverpassRequestManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A40E72632B5CD65000328848 /* OverpassRequestManagerTests.swift */; };
@@ -283,6 +286,7 @@
283286
971575182B5FFE910044797C /* LocationManagerCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationManagerCoordinator.swift; sourceTree = "<group>"; };
284287
971F9FDE2B847349005397CC /* CrossingIslandForm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrossingIslandForm.swift; sourceTree = "<group>"; };
285288
971F9FE02B847358005397CC /* CrossingIsland.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrossingIsland.swift; sourceTree = "<group>"; };
289+
971F9FDB2B836DF3005397CC /* CustomNoteAlert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomNoteAlert.swift; sourceTree = "<group>"; };
286290
972454142B14A49A0036B91A /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
287291
973FBFFD2B46BB3800878269 /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = "<group>"; };
288292
973FC0002B46CD5D00878269 /* QuestsListUIView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuestsListUIView.swift; sourceTree = "<group>"; };
@@ -315,6 +319,8 @@
315319
97AC1C0E2B70CEF5004F0BF4 /* SidewalkSurface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidewalkSurface.swift; sourceTree = "<group>"; };
316320
97AC1C102B70CF03004F0BF4 /* SidewalkSurfaceForm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidewalkSurfaceForm.swift; sourceTree = "<group>"; };
317321
97AC1C122B70EF0A004F0BF4 /* Surfaces.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Surfaces.swift; sourceTree = "<group>"; };
322+
97AC1C202B726AC9004F0BF4 /* TactilePavingKerb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TactilePavingKerb.swift; sourceTree = "<group>"; };
323+
97AC1C222B726ADC004F0BF4 /* TactilePavingKerbForm.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TactilePavingKerbForm.swift; sourceTree = "<group>"; };
318324
97F2FA8D2B0630C4000B9726 /* SwiftOverpassAPI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftOverpassAPI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
319325
A40004EB2B62338400AF21FB /* AppQuestManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppQuestManager.swift; sourceTree = "<group>"; };
320326
A40E72632B5CD65000328848 /* OverpassRequestManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OverpassRequestManagerTests.swift; sourceTree = "<group>"; };
@@ -677,6 +683,7 @@
677683
97AC1C092B6B7F10004F0BF4 /* CustomVerticalButtonsList.swift */,
678684
97AC1C0B2B6B843C004F0BF4 /* CustomAlert.swift */,
679685
FABF3CF72B822F120080EAC9 /* CustomSureAlert.swift */,
686+
971F9FDB2B836DF3005397CC /* CustomNoteAlert.swift */,
680687
);
681688
path = CustomComponents;
682689
sourceTree = "<group>";
@@ -753,6 +760,15 @@
753760
path = SidewalkSurface;
754761
sourceTree = "<group>";
755762
};
763+
97AC1C1F2B726A9F004F0BF4 /* TactilePavingKerb */ = {
764+
isa = PBXGroup;
765+
children = (
766+
97AC1C222B726ADC004F0BF4 /* TactilePavingKerbForm.swift */,
767+
97AC1C202B726AC9004F0BF4 /* TactilePavingKerb.swift */,
768+
);
769+
path = TactilePavingKerb;
770+
sourceTree = "<group>";
771+
};
756772
A40E726B2B5D462A00328848 /* osmapi */ = {
757773
isa = PBXGroup;
758774
children = (
@@ -970,6 +986,7 @@
970986
isa = PBXGroup;
971987
children = (
972988
971F9FDD2B847318005397CC /* CrossingIsland */,
989+
97AC1C1F2B726A9F004F0BF4 /* TactilePavingKerb */,
973990
97AC1C0D2B70CED0004F0BF4 /* SidewalkSurface */,
974991
97AC1C042B6A44C1004F0BF4 /* SideWalkValidation */,
975992
973FC0462B5A475C00878269 /* CrossingMarking */,
@@ -1613,6 +1630,7 @@
16131630
059D47332B2C83BA000987FA /* Highway.swift in Sources */,
16141631
973FC0012B46CD5D00878269 /* QuestsListUIView.swift in Sources */,
16151632
973FC01F2B50DE7E00878269 /* ImageGridItemView.swift in Sources */,
1633+
97AC1C212B726AC9004F0BF4 /* TactilePavingKerb.swift in Sources */,
16161634
A4E711A22B57A3B400C9DE08 /* SideWalkWidth.swift in Sources */,
16171635
05CB71E02B0FAFD200DED821 /* GenericUIViewControllerRepresentable.swift in Sources */,
16181636
97AC1C062B6A45B0004F0BF4 /* SideWalkValidation.swift in Sources */,
@@ -1633,6 +1651,7 @@
16331651
973FC0032B47DE0700878269 /* QuestsVM.swift in Sources */,
16341652
A4E711AE2B59004700C9DE08 /* StepsIncline.swift in Sources */,
16351653
973FC0142B4D353800878269 /* SideWalkWidthForm.swift in Sources */,
1654+
971F9FDC2B836DF3005397CC /* CustomNoteAlert.swift in Sources */,
16361655
971575172B5FFD6F0044797C /* MapView.swift in Sources */,
16371656
973FC04A2B5A478C00878269 /* CrossMarkingForm.swift in Sources */,
16381657
973FC03F2B59418B00878269 /* WayLit.swift in Sources */,
@@ -1652,6 +1671,7 @@
16521671
973FC0172B4D567900878269 /* WidthView.swift in Sources */,
16531672
97AC1C082B6A45C9004F0BF4 /* SideWalkValidationForm.swift in Sources */,
16541673
FAD5C4F52AFCBE700040C61A /* SceneDelegate.swift in Sources */,
1674+
97AC1C232B726ADC004F0BF4 /* TactilePavingKerbForm.swift in Sources */,
16551675
FAF44FBF2B3084FB004FE664 /* OnboardingView2.swift in Sources */,
16561676
97AC1C132B70EF0A004F0BF4 /* Surfaces.swift in Sources */,
16571677
A4E711B02B59011000C9DE08 /* StepsInclineForm.swift in Sources */,
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "kerb_tactile_paving.pdf",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}
Binary file not shown.

GoInfoGame/GoInfoGame/Helpers/LocalizedStrings.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,18 @@ enum LocalizedStrings: String {
7575
case questSurfaceValueTartan = "quest_surface_value_tartan"
7676
case questSurfaceValuePaved = "quest_surface_value_paved"
7777
case questSurfaceValueUnpaved = "quest_surface_value_unpaved"
78+
case questLeaveNewNoteTitle = "quest_leave_new_note_title";
79+
case questLeaveNewNoteDescription = "quest_leave_new_note_description";
80+
case questLeaveNewNoteYes = "quest_leave_new_note_yes";
81+
case questLeaveNewNoteNo = "quest_leave_new_note_no";
82+
case questSourceDialogTitle = "quest_source_dialog_title";
83+
case questSourceDialogNote = "quest_source_dialog_note";
84+
case undoConfirmNegative = "undo_confirm_negative";
7885
case questStepsRampSeparateWheelchair = "quest_steps_ramp_separate_wheelchair"
7986
case questStepsRampSeparateWheelchairConfirm = "quest_steps_ramp_separate_wheelchair_confirm"
8087
case questStepsRampSeparateWheelchairDecline = "quest_steps_ramp_separate_wheelchair_decline"
8188
case questPedestrianCrossingIsland = "quest_pedestrian_crossing_island"
89+
case dontShowAgain = "dont_show_again"
8290

8391
var localized: String {
8492
return NSLocalizedString(rawValue, comment: "")

GoInfoGame/GoInfoGame/UI/CustomComponents/CustomAlert.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ struct CustomAlert<ContentItem: View>: View {
1313
let content: ContentItem
1414
let leftActionText: String?
1515
let rightActionText: String
16-
let leftButtonAction: (() -> Void)?
16+
let leftButtonAction: () -> Void
1717
let rightButtonAction: () -> Void
1818
let height: CGFloat
1919
let width: CGFloat
2020

2121
// Initializer
22-
init(title: String, @ViewBuilder content: () -> ContentItem, leftActionText: String?, rightActionText: String, leftButtonAction: (() -> Void)? = nil, rightButtonAction: @escaping () -> Void, height: CGFloat, width: CGFloat) {
22+
init(title: String, @ViewBuilder content: () -> ContentItem, leftActionText: String?, rightActionText: String, leftButtonAction: @escaping () -> Void, rightButtonAction: @escaping () -> Void, height: CGFloat, width: CGFloat) {
2323
self.title = title
2424
self.content = content()
2525
self.leftActionText = leftActionText
@@ -47,6 +47,7 @@ struct CustomAlert<ContentItem: View>: View {
4747
.padding(.bottom, 8)
4848
.padding(.horizontal, 16)
4949
.fixedSize(horizontal: false, vertical: true)
50+
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity, alignment: .leading)
5051
}
5152

5253
// Display the custom content of the alert.
@@ -62,7 +63,7 @@ struct CustomAlert<ContentItem: View>: View {
6263
if let leftActionText = leftActionText {
6364
// Left button with optional action.
6465
Button(action: {
65-
leftButtonAction?()
66+
leftButtonAction()
6667
}) {
6768
Text(leftActionText)
6869
.font(.system(size: 14, weight: .bold))
@@ -95,5 +96,5 @@ struct CustomAlert<ContentItem: View>: View {
9596
}
9697

9798
#Preview {
98-
CustomAlert(title: "", content: {Text("Test")}, leftActionText: "", rightActionText: "", rightButtonAction: {}, height: 200,width: 270)
99+
CustomAlert(title: "", content: {Text("Test")}, leftActionText: "", rightActionText: "", leftButtonAction: {}, rightButtonAction: {}, height: 200,width: 270)
99100
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// CustomNoteAlert.swift
3+
// GoInfoGame
4+
//
5+
// Created by Lakshmi Shweta Pochiraju on 19/02/24.
6+
//
7+
import SwiftUI
8+
// Custom alert to display leave a note confirmation, contains :
9+
/// Description text
10+
/// Text for left action button (cancel)
11+
/// Text for right action button (confirm)
12+
/// Action closure for left button
13+
/// Action closure for right button
14+
struct CustomNoteAlert: View {
15+
let onCancel: () -> Void
16+
let onConfirm: () -> Void
17+
var body: some View {
18+
CustomAlert(title: LocalizedStrings.questLeaveNewNoteTitle.localized, content: {
19+
VStack {
20+
Text(LocalizedStrings.questLeaveNewNoteDescription.localized)
21+
Spacer()
22+
}
23+
}, leftActionText: LocalizedStrings.questLeaveNewNoteNo.localized, rightActionText: LocalizedStrings.questLeaveNewNoteYes.localized, leftButtonAction: onCancel, rightButtonAction: onConfirm, height: 200, width: 270)
24+
}
25+
}
26+
27+
#Preview {
28+
CustomNoteAlert(onCancel: {}, onConfirm: {})
29+
}

GoInfoGame/GoInfoGame/UI/CustomComponents/CustomSureAlert.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ struct CustomSureAlert: View {
1212
let onConfirm: () -> Void
1313

1414
var body: some View {
15-
CustomAlert(title: "Are you sure you checked this on-site?", content: {
15+
CustomAlert(title: LocalizedStrings.questSourceDialogTitle.localized, content: {
1616
VStack {
17-
Text("Only information that was found on a survey should be entered.")
17+
Text(LocalizedStrings.questSourceDialogNote.localized)
1818
Spacer()
1919
HStack {
2020
Image(systemName: "square")
2121
.foregroundColor(.gray)
22-
Text("Don't show again for this session")
22+
Text(LocalizedStrings.dontShowAgain.localized)
2323
}
2424
}
25-
}, leftActionText: "CANCEL", rightActionText: "YES, I AM SURE", leftButtonAction: onCancel, rightButtonAction: onConfirm, height: 200, width: 270)
25+
}, leftActionText: LocalizedStrings.undoConfirmNegative.localized, rightActionText: LocalizedStrings.questGenericConfirmationYes.localized, leftButtonAction: onCancel, rightButtonAction: onConfirm, height: 200, width: 270)
2626
}
2727
}
2828

GoInfoGame/GoInfoGame/UI/CustomComponents/YesNoView.swift

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@ enum YesNoAnswer: String {
1616

1717
struct YesNoView: View {
1818

19-
var action: ((_ answer:YesNoAnswer) -> Void)?
20-
21-
init(action: ((_ answer: YesNoAnswer) -> Void)? = nil) {
22-
self.action = action
23-
}
19+
var actionBtnLabel: String
20+
var action: ((_ answer: YesNoAnswer) -> Void)?
21+
22+
init(actionBtnLabel: String, action: ((_ answer: YesNoAnswer) -> Void)? = nil) {
23+
self.actionBtnLabel = actionBtnLabel
24+
self.action = action
25+
}
2426

2527
var body: some View {
2628
HStack(spacing: 0) {
2729
Spacer()
2830
Button {
2931
action?(.other)
3032
} label: {
31-
Text(LocalizedStrings.otherAnswers.localized)
33+
Text(actionBtnLabel)
3234
.foregroundColor(.orange).font(.body)
3335
.frame(maxWidth: .infinity)
3436
}
@@ -53,5 +55,5 @@ struct YesNoView: View {
5355
}
5456

5557
#Preview {
56-
YesNoView()
58+
YesNoView(actionBtnLabel: "")
5759
}

GoInfoGame/GoInfoGame/en.lproj/Localizable.strings

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
Localizable.strings
33
GoInfoGame
44

@@ -12,7 +12,6 @@
1212
"questions_list" = "Questions List";
1313
"quest_generic_confirmation_title" = "Are you sure?";
1414
"quest_road_width_unusualInput_confirmation_description" = "This width looks implausible. Remember, this should be the width from curb to curb, including on-street parking, bicycle lanes etc.";
15-
"quest_generic_confirmation_yes" = "YES, IAM SURE";
1615
"quest_generic_confirmation_no" = "I WILL CHECK";
1716
"quest_specify_handrails" = "Specify whether steps have handrails";
1817
"quest_handrail_title" = "Do these steps have a handrail?";
@@ -74,8 +73,17 @@
7473
"quest_surface_value_tartan" = "Tartan";
7574
"quest_surface_value_paved" = "Paved (generic)";
7675
"quest_surface_value_unpaved" = "Unpaved (generic)";
76+
"quest_leave_new_note_title" = "Leave a note instead?";
77+
"quest_leave_new_note_description" = "You can leave a public note for other mappers to resolve at this location, or hide this quest for yourself only";
78+
"quest_leave_new_note_yes" = "Leave note";
79+
"quest_leave_new_note_no" = "Hide";
80+
"quest_source_dialog_title" = "Are you sure you checked this on-site?";
81+
"quest_source_dialog_note" = "Only information that was verified in-person should be entered.";
82+
"undo_confirm_negative" = "Cancel";
83+
"quest_generic_confirmation_yes" = "Yes, I am sure";
7784
"quest_steps_ramp_separate_wheelchair" = "Is the wheelchair ramp displayed as a separate way on the map?";
7885
"quest_steps_ramp_separate_wheelchair_confirm" = "separate";
7986
"quest_steps_ramp_separate_wheelchair_decline" = "not separate";
8087
"quest_pedestrian_crossing_island" = "Does this pedestrian crossing have an island?";
88+
"dont_show_again" = "Don't show again for this session";
8189

GoInfoGame/GoInfoGame/quests/BusStopLit/BusStopLitForm.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct BusStopLitForm: View, QuestForm {
2121
QuestionHeader(icon: Image("stop_lit"),
2222
title: LocalizedStrings.questBusStopLitTitle.localized,
2323
subtitle: "SideWalk")
24-
YesNoView(action: { answer in
24+
YesNoView(actionBtnLabel: LocalizedStrings.otherAnswers.localized, action: { answer in
2525
self.selectedAnswer = answer
2626
if answer == .yes || answer == .no {
2727
self.isShowingAreYouSure.toggle()

0 commit comments

Comments
 (0)