Skip to content

Commit a790468

Browse files
authored
Update the site creation loading illustration (#25761)
* Swap the site creation loading illustration Replaces the dated illustration on the "Almost done" site-assembly screen with design's current browser-windows artwork (CMM-2138). Vector PDFs for light and dark, scaled from the 602pt artboard to a 220pt display width. * Add SwiftUI previews for the site assembly screen Light and dark `#Preview`s that render `SiteAssemblyContentView` in its `.inProgress` state, so the loading illustration can be reviewed in isolation.
1 parent 9235384 commit a790468

4 files changed

Lines changed: 30 additions & 0 deletions

File tree

WordPress/Classes/ViewRelated/Site Creation/Final Assembly/SiteAssemblyContentView.swift

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import UIKit
2+
import SwiftUI
23
import Gridicons
34
import WordPressShared
45
import WordPressUI
@@ -603,3 +604,29 @@ private enum Strings {
603604
)
604605
}
605606
}
607+
608+
// MARK: - Previews
609+
610+
/// Renders the in-progress assembly screen in isolation so the loading illustration can be
611+
/// reviewed without driving the whole site-creation flow. The view is laid out in `.idle`
612+
/// first (which hides the completion labels) and then advanced to `.inProgress`.
613+
private func makeSiteAssemblyLoadingPreview(style: UIUserInterfaceStyle) -> UIViewController {
614+
let contentView = SiteAssemblyContentView(siteCreator: SiteCreator())
615+
contentView.frame = CGRect(x: 0, y: 0, width: 402, height: 874)
616+
contentView.status = .idle
617+
contentView.layoutIfNeeded()
618+
contentView.status = .inProgress
619+
620+
let controller = UIViewController()
621+
controller.overrideUserInterfaceStyle = style
622+
controller.view = contentView
623+
return controller
624+
}
625+
626+
#Preview("Site Assembly – Light") {
627+
makeSiteAssemblyLoadingPreview(style: .light)
628+
}
629+
630+
#Preview("Site Assembly – Dark") {
631+
makeSiteAssemblyLoadingPreview(style: .dark)
632+
}

WordPress/Resources/AppImages.xcassets/site-creation-loading.imageset/Contents.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@
2727
"info" : {
2828
"version" : 1,
2929
"author" : "xcode"
30+
},
31+
"properties" : {
32+
"preserves-vector-representation" : true
3033
}
3134
}
Binary file not shown.

0 commit comments

Comments
 (0)