Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions GoInfoGame/GoInfoGame.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
171574E02FD1CC4A00AA6603 /* PhotoLookupResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171574DF2FD1CC4A00AA6603 /* PhotoLookupResponse.swift */; };
188843AD2B5FA2DF0008DCF8 /* TactilePavingStepsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 188843AC2B5FA2DF0008DCF8 /* TactilePavingStepsTests.swift */; };
188843AF2B5FB32D0008DCF8 /* WayLitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 188843AE2B5FB32D0008DCF8 /* WayLitTests.swift */; };
2E71655C971839F8DAF42E67 /* CompassButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61CD36AA62170BAF936749E0 /* CompassButtonView.swift */; };
342561966FC217124BD9CFE7 /* Pods_GoInfoGame_GoInfoGameUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D539E22EFF6636F8CBA035A /* Pods_GoInfoGame_GoInfoGameUITests.framework */; };
46B6E640D2414B20BBA4CBF0 /* FeatureSubmissionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C38242EA353F419D881E164C /* FeatureSubmissionManager.swift */; };
4A89C70038014808B0E110A0 /* FeatureImageStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AF3DE0241AC4BAB9C051601 /* FeatureImageStorage.swift */; };
Expand Down Expand Up @@ -183,7 +184,6 @@
C77AAC9F2E4463ED006713B2 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = C77AAC9E2E4463ED006713B2 /* FirebaseCrashlytics */; };
C77D48AA3036C434009E61F7 /* ZoomControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C77D48A93036C434009E61F7 /* ZoomControlView.swift */; };
C77D48AC3036DF84009E61F7 /* ScaleBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C77D48AB3036DF84009E61F7 /* ScaleBarView.swift */; };
2E71655C971839F8DAF42E67 /* CompassButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61CD36AA62170BAF936749E0 /* CompassButtonView.swift */; };
C77EEBCF2DE59D3200494CB4 /* UndoMerge.swift in Sources */ = {isa = PBXBuildFile; fileRef = C77EEBCE2DE59D3200494CB4 /* UndoMerge.swift */; };
C785DBD43010978800E5EA58 /* MapLibre in Frameworks */ = {isa = PBXBuildFile; productRef = C785DBD33010978800E5EA58 /* MapLibre */; };
C78737AF2E4C9E3B00289D13 /* FloatingLabelTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = C78737AE2E4C9E3200289D13 /* FloatingLabelTextField.swift */; };
Expand Down Expand Up @@ -390,6 +390,7 @@
2D539E22EFF6636F8CBA035A /* Pods_GoInfoGame_GoInfoGameUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GoInfoGame_GoInfoGameUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
30877432D1026706D7E805DA /* map_theme */ = {isa = PBXFileReference; lastKnownFileType = folder; path = map_theme; sourceTree = "<group>"; };
3D797A45474D6135AFA24613 /* Pods-GoInfoGameTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GoInfoGameTests.debug.xcconfig"; path = "Target Support Files/Pods-GoInfoGameTests/Pods-GoInfoGameTests.debug.xcconfig"; sourceTree = "<group>"; };
61CD36AA62170BAF936749E0 /* CompassButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompassButtonView.swift; sourceTree = "<group>"; };
66BED441AF03CC04539E8D4A /* Pods_GoInfoGame.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GoInfoGame.framework; sourceTree = BUILT_PRODUCTS_DIR; };
79F024C6DD9B31E354C41ED3 /* Pods-osmapi.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-osmapi.debug.xcconfig"; path = "Target Support Files/Pods-osmapi/Pods-osmapi.debug.xcconfig"; sourceTree = "<group>"; };
86C5ED636FC6D3C98650F231 /* NoteImageStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoteImageStorage.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -578,7 +579,6 @@
C77AACA52E447364006713B2 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
C77D48A93036C434009E61F7 /* ZoomControlView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZoomControlView.swift; sourceTree = "<group>"; };
C77D48AB3036DF84009E61F7 /* ScaleBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScaleBarView.swift; sourceTree = "<group>"; };
61CD36AA62170BAF936749E0 /* CompassButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompassButtonView.swift; sourceTree = "<group>"; };
C77EEBCE2DE59D3200494CB4 /* UndoMerge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UndoMerge.swift; sourceTree = "<group>"; };
C78737AE2E4C9E3200289D13 /* FloatingLabelTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloatingLabelTextField.swift; sourceTree = "<group>"; };
C787EF162E9676CC00BEF0A6 /* GoInfoGame.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GoInfoGame.entitlements; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3106,7 +3106,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.9;
MARKETING_VERSION = 1.2.10;
MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/PointNMap $(SRCROOT)/PointNMapShaderTypes";
OTHER_CFLAGS = "-DACCELERATE_NEW_LAPACK";
OTHER_LDFLAGS = (
Expand Down Expand Up @@ -3182,7 +3182,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.9;
MARKETING_VERSION = 1.2.10;
MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/PointNMap $(SRCROOT)/PointNMapShaderTypes";
OTHER_CFLAGS = "-DACCELERATE_NEW_LAPACK";
OTHER_LDFLAGS = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ struct AccessibilityModeView: View {
}
.sheet(isPresented: $showLongFrom) {
QuestSheetView(viewModel: mapViewModel, annotationCoordinate: viewModel.selectedQuest?.coordinateInfo)
.presentationDetents([.fraction(0.8), .fraction(0.5), .fraction(0.1)], selection: $selectedDetent)
.presentationDetents([.fraction(0.1), .fraction(0.5), .fraction(0.8), .large], selection: $selectedDetent)
.presentationDragIndicator(.visible)
.scrollDisabled(false)
.interactiveDismissDisabled()
Expand Down
48 changes: 8 additions & 40 deletions GoInfoGame/GoInfoGame/UI/Map/MapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ struct MapView: View {
.sheet(isPresented: $isPresented) {
QuestSheetView(viewModel: viewModel, annotationCoordinate: annotationCoordinate)
.onAppear { shouldShowPolyline = true }
.presentationDetents([.fraction(0.7), .fraction(0.5), .fraction(0.1)],
.presentationDetents([.fraction(0.1), .fraction(0.5), .fraction(0.7), .large],
selection: $selectedDetent)
.presentationDragIndicator(.visible)
.scrollDisabled(false)
Expand Down Expand Up @@ -1009,7 +1009,13 @@ struct QuestSheetView: View {
}
.padding(24)
} else if let selectedQuest = viewModel.getSelectedQuest() {
CustomSheetView { selectedQuest.parent?.form }
// Rendered directly (not through the old CustomSheetView/CustomSheetWrapper
// UIViewControllerRepresentable) so the sheet's native drag-vs-scroll
// gesture coordination can see LongForm's List directly and let it scroll
// before resizing the sheet — that extra UIKit hosting boundary was
// breaking that coordination, so any drag on the list moved the whole
// sheet instead of scrolling its content.
selectedQuest.parent?.form
} else {
EmptyView()
}
Expand Down Expand Up @@ -1211,44 +1217,6 @@ class ContextualInfo: ObservableObject {
private init() {}
}

struct CustomSheetView<Content: View>: View {
let content: () -> Content
init(@ViewBuilder content: @escaping () -> Content) { self.content = content }
var body: some View {
CustomSheetWrapper(content: content).ignoresSafeArea()
}
}

struct CustomSheetWrapper<Content: View>: UIViewControllerRepresentable {
let content: () -> Content
init(@ViewBuilder content: @escaping () -> Content) { self.content = content }

func makeUIViewController(context: Context) -> UIViewController {
let vc = UIViewController()
let hc = UIHostingController(rootView: content())
hc.view.translatesAutoresizingMaskIntoConstraints = false
vc.view.addSubview(hc.view)
NSLayoutConstraint.activate([
hc.view.topAnchor.constraint(equalTo: vc.view.topAnchor),
hc.view.bottomAnchor.constraint(equalTo: vc.view.bottomAnchor),
hc.view.leadingAnchor.constraint(equalTo: vc.view.leadingAnchor),
hc.view.trailingAnchor.constraint(equalTo: vc.view.trailingAnchor)
])
vc.view.backgroundColor = .clear
return vc
}

func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}

static func dismantleUIViewController(_ uiViewController: UIViewController, coordinator: ()) {
if let sheet = uiViewController.sheetPresentationController {
sheet.detents = [.medium(), .large()]
sheet.prefersGrabberVisible = true
sheet.prefersScrollingExpandsWhenScrolledToEdge = false
}
}
}

struct MultiQuestSelectionBottomSheet: View {
var selectedAnnotationType: String
var selectedAnnotationImage: UIImage
Expand Down
9 changes: 9 additions & 0 deletions GoInfoGame/GoInfoGame/quests/LongQuests/View/LongForm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ struct LongForm: View, QuestForm {
Text("No Quests available")
}
}
.listRowInsets(EdgeInsets(top: 4, leading: 20, bottom: 4, trailing: 20))
.listRowBackground(Color.clear)
.listRowSeparator(.hidden)

Section {
submitButton
Expand All @@ -184,6 +187,7 @@ struct LongForm: View, QuestForm {
.listRowBackground(Color.clear)
.listRowSeparator(.hidden)
}
.scrollContentBackground(.hidden)
.padding(.bottom, keyboardHeight)
.onReceive(Publishers.keyboardHeight) { height in
let safeAreaBottom = UIApplication.shared.safeAreaBottomInset
Expand Down Expand Up @@ -251,6 +255,11 @@ struct LongForm: View, QuestForm {
}
}
}
// Matches the background used everywhere else in the app (ManageQuestsView,
// UserSettingsView, AccessibilityModeView, etc.) instead of the system's default
// sheet background, so it looks consistent whether this sheet is a small preview
// or expanded to full screen.
.background(Color(red: 248 / 255, green: 248 / 255, blue: 248 / 255))
.alert(item: $activeAlert) { alertType in
switch alertType {
case .hideQuestConfirmation:
Expand Down