Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ target 'WooCommerce' do
pod 'Gridicons', '~> 1.2.0'

# To allow pod to pick up beta versions use -beta. E.g., 1.1.7-beta.1
pod 'WordPressAuthenticator', '~> 9.10.1'
# pod 'WordPressAuthenticator', '~> 9.10.1'
# pod 'WordPressAuthenticator', git: 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', branch: ''
# pod 'WordPressAuthenticator', git: 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', commit: ''
pod 'WordPressAuthenticator', git: 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', commit: 'e5247b2d9bdb522c5d210dd6b66d58a4013eed99'
# pod 'WordPressAuthenticator', path: '../WordPressAuthenticator-iOS'

wordpress_shared
Expand Down
18 changes: 13 additions & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,14 @@ DEPENDENCIES:
- StripeTerminal (~> 3.9.1)
- SwiftLint (= 0.54.0)
- WordPress-Editor-iOS (~> 1.19)
- WordPressAuthenticator (~> 9.10.1)
- WordPressAuthenticator (from `https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git`, commit `e5247b2d9bdb522c5d210dd6b66d58a4013eed99`)
- WordPressShared (~> 2.1)
- WordPressUI (~> 1.15)
- Wormholy (~> 1.6.6)
- WPMediaPicker (~> 1.8)
- ZendeskSupportSDK (~> 9.0.0)

SPEC REPOS:
https://github.com/wordpress-mobile/cocoapods-specs.git:
- WordPressAuthenticator
trunk:
- Alamofire
- Automattic-Tracks-iOS
Expand Down Expand Up @@ -109,6 +107,16 @@ SPEC REPOS:
- ZendeskSupportProvidersSDK
- ZendeskSupportSDK

EXTERNAL SOURCES:
WordPressAuthenticator:
:commit: e5247b2d9bdb522c5d210dd6b66d58a4013eed99
:git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git

CHECKOUT OPTIONS:
WordPressAuthenticator:
:commit: e5247b2d9bdb522c5d210dd6b66d58a4013eed99
:git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git

SPEC CHECKSUMS:
Alamofire: 3ca42e259043ee0dc5c0cdd76c4bc568b8e42af7
Automattic-Tracks-iOS: 2d4bee68ff9db4d51f2f6c9fc85857dc69a008a4
Expand All @@ -127,7 +135,7 @@ SPEC CHECKSUMS:
UIDeviceIdentifier: 442b65b4ff1832d4ca9c2a157815cb29ad981b17
WordPress-Aztec-iOS: 8eaa928fb3a5694924ed3befac64beaae5656e12
WordPress-Editor-iOS: 98ce1fc542c3a09e48ddc9423405b1d1e48240f1
WordPressAuthenticator: 2896e9a678fbe09463866fe7ee82bb5c7c1ba530
WordPressAuthenticator: d54323ca733b41b10a7fd64f5d1ca2d9efc47720
WordPressKit: faf8c6de7c2acfe71cf95b4db896901060967089
WordPressShared: 0aa459e5257a77184db87805a998f447443c9706
WordPressUI: 700e3ec5a9f77b6920c8104c338c85788036ab3c
Expand All @@ -142,6 +150,6 @@ SPEC CHECKSUMS:
ZendeskSupportProvidersSDK: 281acf2bb731d2a67f913cfe653ed0da9f5b2f42
ZendeskSupportSDK: b512cfc74b6bf8490e589f02cf52e27ed4f2bebe

PODFILE CHECKSUM: 9b0e747f08251a1b347a70debab470e5e105f89a
PODFILE CHECKSUM: 3c4625f3cbe2d1db480727650952ee77b82c2931

COCOAPODS: 1.16.2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ enum LoginProloguePageType: CaseIterable {
case orderManagement
case products
case reviews
case getStarted

var title: String {
switch self {
Expand All @@ -25,9 +24,6 @@ enum LoginProloguePageType: CaseIterable {
case .reviews:
return NSLocalizedString("Monitor and approve your product reviews",
comment: "Caption displayed in promotional screens shown during the login flow.")
case .getStarted:
return NSLocalizedString("The ecommerce platform that grows with you",
comment: "Caption displayed in the simplified prologue screen")
}
}

Expand All @@ -42,58 +38,23 @@ enum LoginProloguePageType: CaseIterable {
case .products:
return NSLocalizedString("We enable you to process them effortlessly.",
comment: "Subtitle displayed in promotional screens shown during the login flow.")
case .getStarted:
return NSLocalizedString("loginProloguePageType.getStartedText",
value: "From your first sale to millions in revenue, Woo is with you. "
+ "See why merchants trust us to power 3.9 million online stores.",
comment: "Subtitle displayed in the simplified prologue screen")
default:
return nil
}
}

var subtitleColor: UIColor {
switch self {
case .stats, .orderManagement, .products, .reviews:
return .textSubtle
case .getStarted:
return .text
}
}

var image: UIImage {
switch self {
case .stats:
return UIImage.prologueAnalyticsImage
case .orderManagement:
return UIImage.prologueOrdersImage
case .products:
return UIImage.prologueProductsImage
case .reviews:
return UIImage.prologueReviewsImage
case .getStarted:
return UIImage.prologueWooMobileImage
}
}

var imageHeightMultiplier: CGFloat {
switch self {
case .stats, .orderManagement, .products, .reviews:
return 0.35
case .getStarted:
return 0.6
}
}

// Space between image and text
var stackSpacing: CGFloat {
switch self {
case .stats, .orderManagement, .products, .reviews:
return 16
case .getStarted:
return 8
var image: UIImage {
switch self {
case .stats:
return UIImage.prologueAnalyticsImage
case .orderManagement:
return UIImage.prologueOrdersImage
case .products:
return UIImage.prologueProductsImage
case .reviews:
return UIImage.prologueReviewsImage
}
}
}
}

// MARK: - View Controller
Expand Down Expand Up @@ -147,7 +108,7 @@ private extension LoginProloguePageTypeViewController {
// Stack view layout
stackView.axis = .vertical
stackView.alignment = .center
stackView.spacing = pageType.stackSpacing
stackView.spacing = Constants.stackSpacing


// Set constraints
Expand All @@ -166,7 +127,7 @@ private extension LoginProloguePageTypeViewController {
imageView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
imageView.widthAnchor.constraint(equalTo: stackView.widthAnchor),
imageView.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: pageType.imageHeightMultiplier)
imageView.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: Constants.imageHeightMultiplier)
])

// Image contents
Expand All @@ -178,9 +139,7 @@ private extension LoginProloguePageTypeViewController {

// Label style & layout
titleLabel.font = {
if pageType == .getStarted {
return .title3SemiBold
} else if showsSubtitle {
if showsSubtitle {
return .font(forStyle: .title2, weight: .semibold)
} else {
return .body
Expand Down Expand Up @@ -208,7 +167,7 @@ private extension LoginProloguePageTypeViewController {
// Label style & layout
subtitleLabel.font = .body
subtitleLabel.adjustsFontForContentSizeCategory = true
subtitleLabel.textColor = pageType.subtitleColor
subtitleLabel.textColor = Constants.subtitleColor
subtitleLabel.textAlignment = .center
subtitleLabel.numberOfLines = 0
subtitleLabel.translatesAutoresizingMaskIntoConstraints = false
Expand All @@ -226,5 +185,8 @@ private extension LoginProloguePageTypeViewController {
enum Constants {
static let stackBottomMargin: CGFloat = -24 // Minimum margin between stack view and login buttons, including space required for UIPageControl
static let labelLeadingMargin: CGFloat = 48
static let imageHeightMultiplier: CGFloat = 0.35
static let stackSpacing: CGFloat = 16 // Space between image and text
static let subtitleColor: UIColor = .textSubtle
}
}
Loading