Skip to content

Commit 167d53b

Browse files
committed
move guides feature
1 parent 0a33e9e commit 167d53b

File tree

4 files changed

+7
-36
lines changed

4 files changed

+7
-36
lines changed

CriticalMapsKit/Sources/AppFeature/AppNavigationView.swift

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ public struct AppNavigationView: View {
4646
.accessibility(label: Text("App navigation \(L10n.Chat.title)"))
4747
menuSeperator
4848

49-
// Rules
50-
rulesFeature
51-
.accessibility(label: Text("App navigation \(L10n.Rules.title)"))
52-
menuSeperator
53-
5449
// Settings
5550
settingsFeature
5651
.accessibility(label: Text("App navigation \(L10n.Settings.title)"))
@@ -122,36 +117,6 @@ public struct AppNavigationView: View {
122117
)
123118
}
124119

125-
var rulesFeature: some View {
126-
Button(
127-
action: {
128-
viewStore.send(.setNavigation(tag: .rules))
129-
},
130-
label: {
131-
Image(systemName: "exclamationmark.square")
132-
.iconModifier()
133-
}
134-
)
135-
.frame(maxWidth: .infinity, minHeight: minHeight)
136-
.contentShape(Rectangle())
137-
.accessibilityShowsLargeContentViewer {
138-
Label(L10n.Rules.title, systemImage: "exclamationmark.square")
139-
}
140-
.sheet(
141-
isPresented: viewStore.binding(
142-
get: \.isRulesViewPresented,
143-
send: AppFeature.Action.dismissSheetView
144-
),
145-
onDismiss: { viewStore.send(.dismissSheetView) },
146-
content: {
147-
CMNavigationView {
148-
GuideView()
149-
.accessibilityAddTraits([.isModal])
150-
}
151-
}
152-
)
153-
}
154-
155120
var settingsFeature: some View {
156121
Button(
157122
action: {

CriticalMapsKit/Sources/AppFeature/AppView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public struct AppView: View {
8888
.frame(maxWidth: 400)
8989
}
9090
.frame(maxWidth: .infinity, alignment: .center)
91+
.padding(.horizontal, .grid(8))
9192
}
9293
.bottomSheet(
9394
bottomSheetPosition: viewStore.$bottomSheetPosition,

CriticalMapsKit/Sources/GuideFeature/GuideView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public struct GuideView: View {
2020
}
2121
.listStyle(PlainListStyle())
2222
.navigationTitle(L10n.Rules.title)
23-
.dismissable()
2423
}
2524
}
2625

CriticalMapsKit/Sources/SettingsFeature/SettingsView.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import AcknowList
22
import ComposableArchitecture
3+
import GuideFeature
34
import Helpers
45
import L10n
56
import Styleguide
@@ -215,6 +216,11 @@ public struct SettingsView: View {
215216
.accessibilityAddTraits(.isLink)
216217
}
217218

219+
SettingsNavigationLink(
220+
destination: GuideView(),
221+
title: L10n.Rules.title
222+
)
223+
218224
if let acknowledgementsPlistPath = viewStore.acknowledgementsPlistPath {
219225
SettingsNavigationLink(
220226
destination: AcknowListSwiftUIView(plistPath: acknowledgementsPlistPath),

0 commit comments

Comments
 (0)