Skip to content

Commit 9b30912

Browse files
committed
Update floating control leading offset. Add preview for content state.
1 parent a9b9cbe commit 9b30912

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private extension PointOfSaleDashboardView {
159159
// For the moment we're just considering landscape for the POS mode
160160
// https://github.com/woocommerce/woocommerce-ios/issues/13251
161161
static let cartWidth: CGFloat = 0.35
162-
static let floatingControlHorizontalOffset: CGFloat = 24
162+
static let floatingControlHorizontalOffset: CGFloat = 16
163163
static let floatingControlVerticalOffset: CGFloat = 0
164164
static let exitPOSSheetMaxWidth: CGFloat = 900.0
165165
static let supportTag = "origin:point-of-sale"
@@ -175,8 +175,9 @@ private extension PointOfSaleDashboardView {
175175
}
176176

177177
#if DEBUG
178+
178179
@available(iOS 17.0, *)
179-
#Preview {
180+
#Preview("Container loading state") {
180181
let posModel = PointOfSaleAggregateModel(
181182
itemsController: PointOfSalePreviewItemsController(),
182183
cardPresentPaymentService: CardPresentPaymentPreviewService(),
@@ -187,4 +188,20 @@ private extension PointOfSaleDashboardView {
187188
.environmentObject(POSModalManager())
188189
}
189190
}
191+
192+
@available(iOS 17.0, *)
193+
#Preview("Content loading state") {
194+
let itemsController = PointOfSalePreviewItemsController()
195+
let posModel = PointOfSaleAggregateModel(
196+
itemsController: itemsController,
197+
cardPresentPaymentService: CardPresentPaymentPreviewService(),
198+
orderController: PointOfSalePreviewOrderController())
199+
itemsController.itemsViewState = .init(containerState: .content, itemsStack: .init(root: .loading([]), itemStates: [:]))
200+
return NavigationStack {
201+
PointOfSaleDashboardView()
202+
.environment(posModel)
203+
.environmentObject(POSModalManager())
204+
}
205+
}
206+
190207
#endif

0 commit comments

Comments
 (0)