@@ -40,11 +40,7 @@ public struct ContentView: View {
40
40
startRadiusFraction: 0.3 ,
41
41
endRadiusFraction: 5 )
42
42
43
- private let monitor : DatadogMonitor
44
-
45
- public init ( monitor: DatadogMonitor ) {
46
- self . monitor = monitor
47
-
43
+ public init ( ) {
48
44
// change the background of all the tables
49
45
UITableView . appearance ( ) . backgroundColor = . clear
50
46
}
@@ -70,7 +66,7 @@ public struct ContentView: View {
70
66
}
71
67
. scrollContentBackground ( . hidden)
72
68
. navigationTitle ( " SwiftUI Catalog " )
73
- . modifier ( monitor . viewModifier ( name: " SwiftUI Catalog " ) )
69
+ . trackView ( name: " SwiftUI Catalog " )
74
70
}
75
71
76
72
}
@@ -88,6 +84,7 @@ public struct ContentView: View {
88
84
. padding ( . top, 24 )
89
85
. padding ( . bottom, 16 )
90
86
. foregroundColor ( . white)
87
+ . privacyOverride ( text: . maskAll)
91
88
92
89
HStack ( alignment: . center, spacing: 2 ) {
93
90
Spacer ( )
@@ -114,31 +111,31 @@ public struct ContentView: View {
114
111
. font ( . title)
115
112
. modifier ( ListSectionFontModifier ( ) ) ) {
116
113
Group {
117
- Link ( destination: ButtonsComponentsView ( ) . modifier ( monitor . viewModifier ( name: " Buttons " ) ) ,
114
+ Link ( destination: ButtonsComponentsView ( ) . trackView ( name: " Buttons " ) ,
118
115
label: " Buttons " )
119
- Link ( destination: ImagesComponentView ( ) . modifier ( monitor . viewModifier ( name: " Images " ) ) ,
116
+ Link ( destination: ImagesComponentView ( ) . trackView ( name: " Images " ) ,
120
117
label: " Images " )
121
- Link ( destination: TextsComponentsView ( ) . modifier ( monitor . viewModifier ( name: " Texts " ) ) ,
118
+ Link ( destination: TextsComponentsView ( ) . trackView ( name: " Texts " ) ,
122
119
label: " Texts " )
123
- Link ( destination: LabelsView ( ) . modifier ( monitor . viewModifier ( name: " Labels " ) ) ,
120
+ Link ( destination: LabelsView ( ) . trackView ( name: " Labels " ) ,
124
121
label: " Labels " )
125
- Link ( destination: MenusComponentView ( ) . modifier ( monitor . viewModifier ( name: " Menus " ) ) ,
122
+ Link ( destination: MenusComponentView ( ) . trackView ( name: " Menus " ) ,
126
123
label: " Menus " )
127
124
}
128
125
Group {
129
- Link ( destination: TogglesView ( ) . modifier ( monitor . viewModifier ( name: " Toggles " ) ) ,
126
+ Link ( destination: TogglesView ( ) . trackView ( name: " Toggles " ) ,
130
127
label: " Toggles " )
131
- Link ( destination: SlidersView ( ) . modifier ( monitor . viewModifier ( name: " Sliders " ) ) ,
128
+ Link ( destination: SlidersView ( ) . trackView ( name: " Sliders " ) ,
132
129
label: " Sliders " )
133
- Link ( destination: SteppersView ( ) . modifier ( monitor . viewModifier ( name: " Steppers " ) ) ,
130
+ Link ( destination: SteppersView ( ) . trackView ( name: " Steppers " ) ,
134
131
label: " Steppers " )
135
- Link ( destination: PickersView ( ) . modifier ( monitor . viewModifier ( name: " Pickers " ) ) ,
132
+ Link ( destination: PickersView ( ) . trackView ( name: " Pickers " ) ,
136
133
label: " Pickers " )
137
- Link ( destination: DatePickersView ( ) . modifier ( monitor . viewModifier ( name: " Date Pickers " ) ) ,
134
+ Link ( destination: DatePickersView ( ) . trackView ( name: " Date Pickers " ) ,
138
135
label: " Date Pickers " )
139
- Link ( destination: ColorPickersView ( ) . modifier ( monitor . viewModifier ( name: " Color Pickers " ) ) ,
136
+ Link ( destination: ColorPickersView ( ) . trackView ( name: " Color Pickers " ) ,
140
137
label: " Color Pickers " )
141
- Link ( destination: ProgressViews ( ) . modifier ( monitor . viewModifier ( name: " Progress View " ) ) ,
138
+ Link ( destination: ProgressViews ( ) . trackView ( name: " Progress View " ) ,
142
139
label: " Progress View " )
143
140
}
144
141
}
@@ -151,7 +148,7 @@ public struct ContentView: View {
151
148
. modifier ( ListSectionFontModifier ( ) ) ) {
152
149
Group {
153
150
Link ( destination: ExampleProductView ( productId: " product.consumable.example.1 " , productImageName: " giftcard.fill " ) ,
154
- label: " Consumable Product View " ) . modifier ( monitor . viewModifier ( name: " Consumable Product View " ) )
151
+ label: " Consumable Product View " ) . trackView ( name: " Consumable Product View " )
155
152
}
156
153
}
157
154
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -162,17 +159,17 @@ public struct ContentView: View {
162
159
Section ( header: Text ( " Layouts " )
163
160
. font ( . title)
164
161
. modifier ( ListSectionFontModifier ( ) ) ) {
165
- Link ( destination: ListsComponentView ( ) . modifier ( monitor . viewModifier ( name: " Lists " ) ) ,
162
+ Link ( destination: ListsComponentView ( ) . trackView ( name: " Lists " ) ,
166
163
label: " Lists " )
167
- Link ( destination: StacksView ( ) . modifier ( monitor . viewModifier ( name: " Stacks " ) ) ,
164
+ Link ( destination: StacksView ( ) . trackView ( name: " Stacks " ) ,
168
165
label: " Stacks " )
169
- Link ( destination: GridsView ( ) . modifier ( monitor . viewModifier ( name: " Grids " ) ) ,
166
+ Link ( destination: GridsView ( ) . trackView ( name: " Grids " ) ,
170
167
label: " Grids " )
171
- Link ( destination: ContainersView ( ) . modifier ( monitor . viewModifier ( name: " Containers " ) ) ,
168
+ Link ( destination: ContainersView ( ) . trackView ( name: " Containers " ) ,
172
169
label: " Containers " )
173
- Link ( destination: ScrollViewsView ( ) . modifier ( monitor . viewModifier ( name: " Scrollviews " ) ) ,
170
+ Link ( destination: ScrollViewsView ( ) . trackView ( name: " Scrollviews " ) ,
174
171
label: " Scrollviews " )
175
- Link ( destination: TableViews ( ) . modifier ( monitor . viewModifier ( name: " Table Views " ) ) ,
172
+ Link ( destination: TableViews ( ) . trackView ( name: " Table Views " ) ,
176
173
label: " Table Views " )
177
174
}
178
175
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -181,13 +178,13 @@ public struct ContentView: View {
181
178
var hierachicalViews : some View {
182
179
Section ( header: Text ( " Hierachical Views " ) . font ( . title)
183
180
. modifier ( ListSectionFontModifier ( ) ) ) {
184
- Link ( destination: NavigationBarsComponentView ( ) . modifier ( monitor . viewModifier ( name: " Navigation " ) ) ,
181
+ Link ( destination: NavigationBarsComponentView ( ) . trackView ( name: " Navigation " ) ,
185
182
label: " Navigation " )
186
- Link ( destination: OutlinesGroupsView ( ) . modifier ( monitor . viewModifier ( name: " Outlines " ) ) ,
183
+ Link ( destination: OutlinesGroupsView ( ) . trackView ( name: " Outlines " ) ,
187
184
label: " Outlines " )
188
- Link ( destination: DisclosureGroupsView ( ) . modifier ( monitor . viewModifier ( name: " Disclosures " ) ) ,
185
+ Link ( destination: DisclosureGroupsView ( ) . trackView ( name: " Disclosures " ) ,
189
186
label: " Disclosures " )
190
- Link ( destination: TabsView ( ) . modifier ( monitor . viewModifier ( name: " Tabs " ) ) ,
187
+ Link ( destination: TabsView ( ) . trackView ( name: " Tabs " ) ,
191
188
label: " Tabs " )
192
189
}
193
190
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -198,15 +195,15 @@ public struct ContentView: View {
198
195
Section ( header: Text ( " Drawing and animations " )
199
196
. font ( . title)
200
197
. modifier ( ListSectionFontModifier ( ) ) ) {
201
- Link ( destination: CanvasView ( ) . modifier ( monitor . viewModifier ( name: " Canvas " ) ) ,
198
+ Link ( destination: CanvasView ( ) . trackView ( name: " Canvas " ) ,
202
199
label: " Canvas " )
203
- Link ( destination: GraphicContextsView ( ) . modifier ( monitor . viewModifier ( name: " Graphic Context " ) ) ,
200
+ Link ( destination: GraphicContextsView ( ) . trackView ( name: " Graphic Context " ) ,
204
201
label: " Graphic Context " )
205
- Link ( destination: ShapesView ( ) . modifier ( monitor . viewModifier ( name: " Shapes " ) ) ,
202
+ Link ( destination: ShapesView ( ) . trackView ( name: " Shapes " ) ,
206
203
label: " Shapes " )
207
- Link ( destination: AnimationsView ( ) . modifier ( monitor . viewModifier ( name: " Animations " ) ) ,
204
+ Link ( destination: AnimationsView ( ) . trackView ( name: " Animations " ) ,
208
205
label: " Animations " )
209
- Link ( destination: GeometriesView ( ) . modifier ( monitor . viewModifier ( name: " Geometries " ) ) ,
206
+ Link ( destination: GeometriesView ( ) . trackView ( name: " Geometries " ) ,
210
207
label: " Geometries " )
211
208
}
212
209
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -218,7 +215,7 @@ public struct ContentView: View {
218
215
Section ( header: Text ( " Charts " )
219
216
. font ( . title)
220
217
. modifier ( ListSectionFontModifier ( ) ) ) {
221
- Link ( destination: ChartsViews ( ) . modifier ( monitor . viewModifier ( name: " Swift Charts " ) ) ,
218
+ Link ( destination: ChartsViews ( ) . trackView ( name: " Swift Charts " ) ,
222
219
label: " Swift Charts " )
223
220
}
224
221
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -229,11 +226,11 @@ public struct ContentView: View {
229
226
Section ( header: Text ( " Gestures " )
230
227
. font ( . title)
231
228
. modifier ( ListSectionFontModifier ( ) ) ) {
232
- Link ( destination: GesturesView ( ) . modifier ( monitor . viewModifier ( name: " Gestures " ) ) ,
229
+ Link ( destination: GesturesView ( ) . trackView ( name: " Gestures " ) ,
233
230
label: " Gestures " )
234
- Link ( destination: ComposingGesturesView ( ) . modifier ( monitor . viewModifier ( name: " Composing Gestures " ) ) ,
231
+ Link ( destination: ComposingGesturesView ( ) . trackView ( name: " Composing Gestures " ) ,
235
232
label: " Composing Gestures " )
236
- Link ( destination: SensoryFeedbackInViews ( ) . modifier ( monitor . viewModifier ( name: " Sensory Feedback " ) ) ,
233
+ Link ( destination: SensoryFeedbackInViews ( ) . trackView ( name: " Sensory Feedback " ) ,
237
234
label: " Sensory Feedback " )
238
235
}
239
236
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -244,11 +241,11 @@ public struct ContentView: View {
244
241
Section ( header: Text ( " View modifiers " )
245
242
. font ( . title)
246
243
. modifier ( ListSectionFontModifier ( ) ) ) {
247
- Link ( destination: TextModifiersView ( ) . modifier ( monitor . viewModifier ( name: " Text modifiers " ) ) ,
244
+ Link ( destination: TextModifiersView ( ) . trackView ( name: " Text modifiers " ) ,
248
245
label: " Text modifiers " )
249
- Link ( destination: EffectsModifiersView ( ) . modifier ( monitor . viewModifier ( name: " Effect modifiers " ) ) ,
246
+ Link ( destination: EffectsModifiersView ( ) . trackView ( name: " Effect modifiers " ) ,
250
247
label: " Effect modifiers " )
251
- Link ( destination: LayoutModifiersView ( ) . modifier ( monitor . viewModifier ( name: " Layout modifiers " ) ) ,
248
+ Link ( destination: LayoutModifiersView ( ) . trackView ( name: " Layout modifiers " ) ,
252
249
label: " Layout modifiers " )
253
250
254
251
}
@@ -261,7 +258,7 @@ public struct ContentView: View {
261
258
. font ( . title)
262
259
. modifier ( ListSectionFontModifier ( ) ) ) {
263
260
264
- Link ( destination: AccesibilityView ( ) . modifier ( monitor . viewModifier ( name: " Accesibility " ) ) ,
261
+ Link ( destination: AccesibilityView ( ) . trackView ( name: " Accesibility " ) ,
265
262
label: " Accesibility " )
266
263
}
267
264
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -272,7 +269,7 @@ public struct ContentView: View {
272
269
Section ( header: Text ( " Status and tool bars " )
273
270
. font ( . title)
274
271
. modifier ( ListSectionFontModifier ( ) ) ) {
275
- Link ( destination: ToolbarsComponentView ( ) . modifier ( monitor . viewModifier ( name: " Tool Bars " ) ) ,
272
+ Link ( destination: ToolbarsComponentView ( ) . trackView ( name: " Tool Bars " ) ,
276
273
label: " Tool Bars " )
277
274
}
278
275
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -284,7 +281,7 @@ public struct ContentView: View {
284
281
. font ( . title)
285
282
. modifier ( ListSectionFontModifier ( ) ) ) {
286
283
287
- Link ( destination: StylesView ( ) . modifier ( monitor . viewModifier ( name: " Styles " ) ) ,
284
+ Link ( destination: StylesView ( ) . trackView ( name: " Styles " ) ,
288
285
label: " Styles " )
289
286
}
290
287
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -298,7 +295,7 @@ public struct ContentView: View {
298
295
299
296
// Link(destination: PopoversComponentView(),
300
297
// label: "Popovers")
301
- Link ( destination: SheetsView ( ) . modifier ( monitor . viewModifier ( name: " Sheets " ) ) ,
298
+ Link ( destination: SheetsView ( ) . trackView ( name: " Sheets " ) ,
302
299
label: " Sheets " )
303
300
// Link(destination: AlertsComponentView(),
304
301
// label: "Alerts")
@@ -315,13 +312,13 @@ public struct ContentView: View {
315
312
Section ( header: Text ( " Composed components to help speed up development " )
316
313
. font ( . title)
317
314
. modifier ( ListSectionFontModifier ( ) ) ) {
318
- Link ( destination: CommonlyUsedViews ( ) . modifier ( monitor . viewModifier ( name: " Commonly used views " ) ) ,
315
+ Link ( destination: CommonlyUsedViews ( ) . trackView ( name: " Commonly used views " ) ,
319
316
label: " Commonly used views " )
320
- Link ( destination: CollectionsViews ( ) . modifier ( monitor . viewModifier ( name: " Collections of components " ) ) ,
317
+ Link ( destination: CollectionsViews ( ) . trackView ( name: " Collections of components " ) ,
321
318
label: " Collections of components " )
322
- Link ( destination: StackedCardsView < CardView > ( elementsCount: 22 ) . modifier ( monitor . viewModifier ( name: " Stacked cards with dragging " ) ) ,
319
+ Link ( destination: StackedCardsView < CardView > ( elementsCount: 22 ) . trackView ( name: " Stacked cards with dragging " ) ,
323
320
label: " Stacked cards with dragging " )
324
- Link ( destination: InterfacingWithUIKitView ( pages: ModelData ( ) . features. map { FeatureCardView ( landmark: $0) } ) . modifier ( monitor . viewModifier ( name: " UIKit Interface " ) ) ,
321
+ Link ( destination: InterfacingWithUIKitView ( pages: ModelData ( ) . features. map { FeatureCardView ( landmark: $0) } ) . trackView ( name: " UIKit Interface " ) ,
325
322
label: " UIKit Interface " )
326
323
}
327
324
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -337,7 +334,7 @@ public struct ContentView: View {
337
334
#Preview {
338
335
339
336
Group {
340
- ContentView ( monitor : NOPDatadogMonitor ( ) )
337
+ ContentView ( )
341
338
. preferredColorScheme ( . dark)
342
339
}
343
340
}
0 commit comments