@@ -114,7 +114,11 @@ struct PointOfSaleSettingsStoreDetailView: View {
114114 @ViewBuilder
115115 private func settingValueView( for value: String ? ) -> some View {
116116 if isLoading {
117- GhostSettingRowView ( )
117+ Rectangle ( )
118+ . fill ( Color . posOnSurfaceVariantLowest)
119+ . frame ( width: Constants . shimmeringTextWidth, height: Constants . shimmeringTextHeight)
120+ . clipShape ( RoundedRectangle ( cornerRadius: POSCornerRadiusStyle . small. value) )
121+ . shimmering ( )
118122 } else {
119123 Text ( value ?? Localization . notSet)
120124 . font ( . posBodyMediumRegular( ) )
@@ -123,46 +127,13 @@ struct PointOfSaleSettingsStoreDetailView: View {
123127 }
124128}
125129
126- // Temporary: Simplified copy from PointOfSaleOrderListView.GhostOrderRowView
127- private struct GhostSettingRowView : View {
128- @ScaledMetric private var scale : CGFloat = 1.0
129- @Environment ( \. dynamicTypeSize) var dynamicTypeSize
130130
131- private var minHeight : CGFloat {
132- min ( Constants . orderCardMinHeight * scale, Constants . maximumOrderCardHeight)
133- }
134-
135- var body : some View {
136- HStack ( alignment: . center, spacing: POSSpacing . medium) {
137- VStack ( alignment: . leading, spacing: POSSpacing . xSmall) {
138- Rectangle ( )
139- . fill ( Color . posOnSurfaceVariantLowest)
140- . frame ( width: 70 , height: 16 )
141- . clipShape ( RoundedRectangle ( cornerRadius: 4 ) )
142- . shimmering ( )
143-
144- Rectangle ( )
145- . fill ( Color . posOnSurfaceVariantLowest)
146- . frame ( width: 160 , height: 14 )
147- . clipShape ( RoundedRectangle ( cornerRadius: 4 ) )
148- . shimmering ( )
149- }
150- }
151- . padding ( . horizontal, POSPadding . medium * ( 1 / scale) )
152- . padding ( . vertical, POSPadding . medium * ( 1 / scale) )
153- . frame ( maxWidth: . infinity, minHeight: dynamicTypeSize. isAccessibilitySize ? nil : minHeight, alignment: . leading)
154- . background ( Color . posSurfaceContainerLowest)
155- . posItemCardBorderStyles ( )
156- . geometryGroup ( )
131+ private extension PointOfSaleSettingsStoreDetailView {
132+ enum Constants {
133+ static let shimmeringTextWidth : CGFloat = 70
134+ static let shimmeringTextHeight : CGFloat = 16
157135 }
158136
159- private enum Constants {
160- static let orderCardMinHeight : CGFloat = 90
161- static let maximumOrderCardHeight : CGFloat = Constants . orderCardMinHeight * 2
162- }
163- }
164-
165- private extension PointOfSaleSettingsStoreDetailView {
166137 enum Localization {
167138 static let notSet = NSLocalizedString (
168139 " pointOfSaleSettingsStoreDetailView.notSet " ,
0 commit comments