This PR updates the samples and sample viewer to use LabeledContent to display label/value pairs instead of using a HStack or badge(_:) modifier. The affected samples should be functionally equivalently with minimal UI changes. Generally, the value now has a secondary foreground style if it didn't already.
Linked Issue(s)
swift/issues/5822
How To Test
Ensure that the label/value pairs display as expected in the affected samples.
Replacing FavoritesView.favoriteSamples in arcgis-maps-sdk-swift-samples/Shared/Supporting Files/Views/FavoritesView.swift with the following code will load all of the affected samples in the "Favorites" category for easy testing.
I didn't update Analyze network with subnetwork trace since the label/value pairs in the that samples should probably be implemented with a Picker instead.
Description
This PR updates the samples and sample viewer to use
LabeledContent
to display label/value pairs instead of using aHStack
orbadge(_:)
modifier. The affected samples should be functionally equivalently with minimal UI changes. Generally, the value now has asecondary
foreground style if it didn't already.Linked Issue(s)
swift/issues/5822
How To Test
Replacing
FavoritesView.favoriteSamples
inarcgis-maps-sdk-swift-samples/Shared/Supporting Files/Views/FavoritesView.swift
with the following code will load all of the affected samples in the "Favorites" category for easy testing.Test Code
```swift private var favoriteSamples: [Sample] { let sampleViews: [any View] = [ AddDynamicEntityLayerView(), AddFeaturesWithContingentValuesView(), Animate3DGraphicView(), ChangeMapViewBackgroundView(), ConfigureClustersView(), CreateLoadReportView(), DensifyAndGeneralizeGeometryView(), GenerateOfflineMapWithCustomParametersView(), OrbitCameraAroundObjectView(), SetVisibilityOfSubtypeSublayerView(), ShowViewshedFromPointInSceneView(), StyleSymbolsFromMobileStyleFileView() ] return sampleViews.map { view in let sampleName = "\(type(of: view))" .dropLast(4) return SamplesApp.samples.first { $0.nameInUpperCamelCase == sampleName }! } } ```