Skip to content

Commit d56df3e

Browse files
committed
Remove New to Woo button from the store picker
1 parent 5454b6c commit d56df3e

File tree

2 files changed

+6
-41
lines changed

2 files changed

+6
-41
lines changed

WooCommerce/Classes/Authentication/Epilogue/StorePickerViewController.swift

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,6 @@ final class StorePickerViewController: UIViewController {
109109
}
110110
}
111111

112-
/// New To Woo button
113-
///
114-
@IBOutlet var newToWooButton: UIButton! {
115-
didSet {
116-
newToWooButton.applyLinkButtonStyle()
117-
newToWooButton.setTitle(Localization.newToWooCommerce, for: .normal)
118-
}
119-
}
120-
121112
/// Main tableView
122113
///
123114
@IBOutlet private var tableView: UITableView! {
@@ -426,10 +417,8 @@ private extension StorePickerViewController {
426417
case .empty:
427418
updateActionButtonAndTableState(animating: false, enabled: false)
428419
addStoreButton.isHidden = false
429-
newToWooButton.isHidden = true
430420
case .available(let sites):
431421
addStoreButton.isHidden = true
432-
newToWooButton.isHidden = true
433422
if sites.allSatisfy({ $0.isWooCommerceActive == false }) {
434423
updateActionButtonAndTableState(animating: false, enabled: false)
435424
}
@@ -545,7 +534,6 @@ private extension StorePickerViewController {
545534
hideActionButton()
546535
displayFancyWCRequirementAlert(siteName: siteName)
547536
addStoreButton.isHidden = false
548-
newToWooButton.isHidden = true
549537
}
550538

551539
/// Update the UI when the user has a valid login
@@ -634,17 +622,6 @@ private extension StorePickerViewController {
634622
}
635623
}
636624

637-
/// Displays a web view with introduction to WooCommerce
638-
///
639-
@IBAction private func newToWooWasPressed() {
640-
ServiceLocator.analytics.track(event: .SitePicker.newToWooTapped())
641-
guard let url = URL(string: StorePickerConstants.newToWooCommerceURL) else {
642-
return assertionFailure("Cannot generate URL.")
643-
}
644-
645-
WebviewHelper.launch(url, with: self)
646-
}
647-
648625
/// Proceeds with the Logout Flow.
649626
///
650627
@IBAction func secondaryActionWasPressed() {
@@ -826,8 +803,6 @@ private extension StorePickerViewController {
826803
static let continueButton = NSLocalizedString("Continue", comment: "Button on the Store Picker screen to select a store")
827804
static let tryAnotherAccount = NSLocalizedString("Log In With Another Account",
828805
comment: "Button to trigger connection to another account in store picker")
829-
static let newToWooCommerce = NSLocalizedString("New to WooCommerce?",
830-
comment: "Title of button on the site picker screen for users who are new to WooCommerce.")
831806
static let createStore = NSLocalizedString("Create a new store",
832807
comment: "Button to create a new store from the store picker")
833808
static let connectExistingStore = NSLocalizedString("Connect an existing store",
@@ -843,7 +818,6 @@ private extension StorePickerViewController {
843818
//
844819
private enum StorePickerConstants {
845820
static let estimatedRowHeight = CGFloat(50)
846-
static let newToWooCommerceURL = "https://woocommerce.com/woocommerce-features"
847821
}
848822

849823

WooCommerce/Classes/Authentication/Epilogue/StorePickerViewController.xib

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<connections>
1313
<outlet property="actionButton" destination="0KD-hY-YaS" id="mJR-Pi-S0z"/>
1414
<outlet property="addStoreButton" destination="mXN-0a-h6C" id="AR4-GV-obp"/>
15-
<outlet property="newToWooButton" destination="X1y-bd-PXx" id="Rhc-sE-XIZ"/>
1615
<outlet property="secondaryActionButton" destination="Slo-h4-7qY" id="YFU-eL-sGS"/>
1716
<outlet property="tableView" destination="oVs-XS-592" id="tgt-K5-nCu"/>
1817
<outlet property="view" destination="jLk-oK-hVZ" id="6Kv-ov-h6s"/>
@@ -24,29 +23,21 @@
2423
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
2524
<subviews>
2625
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" contentInsetAdjustmentBehavior="never" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="oVs-XS-592" userLabel="Sites Table View">
27-
<rect key="frame" x="0.0" y="44" width="414" height="533.66666666666663"/>
26+
<rect key="frame" x="0.0" y="44" width="414" height="588"/>
2827
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
2928
<connections>
3029
<outlet property="dataSource" destination="-1" id="m9y-Av-zfJ"/>
3130
<outlet property="delegate" destination="-1" id="srI-Ru-BMi"/>
3231
</connections>
3332
</tableView>
3433
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="H5J-Qa-DXp">
35-
<rect key="frame" x="0.0" y="577.66666666666663" width="414" height="318.33333333333337"/>
34+
<rect key="frame" x="0.0" y="632" width="414" height="264"/>
3635
<subviews>
3736
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="0a6-Ee-KF8">
38-
<rect key="frame" x="20" y="20.000000000000014" width="374" height="244.33333333333337"/>
37+
<rect key="frame" x="20" y="20" width="374" height="190"/>
3938
<subviews>
40-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="X1y-bd-PXx">
41-
<rect key="frame" x="0.0" y="0.0" width="374" height="34.333333333333336"/>
42-
<state key="normal" title="Button"/>
43-
<buttonConfiguration key="configuration" style="plain" title="New To Woo?"/>
44-
<connections>
45-
<action selector="newToWooWasPressed" destination="-1" eventType="touchUpInside" id="Aga-hj-WbH"/>
46-
</connections>
47-
</button>
4839
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mXN-0a-h6C" userLabel="Action Button" customClass="FancyAnimatedButton" customModule="WooCommerce" customModuleProvider="target">
49-
<rect key="frame" x="0.0" y="54.333333333333371" width="374" height="50"/>
40+
<rect key="frame" x="0.0" y="0.0" width="374" height="50"/>
5041
<color key="backgroundColor" red="0.58823529409999997" green="0.34509803919999998" blue="0.54117647059999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
5142
<constraints>
5243
<constraint firstAttribute="height" constant="50" id="vyG-JP-b9F"/>
@@ -61,7 +52,7 @@
6152
</connections>
6253
</button>
6354
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0KD-hY-YaS" userLabel="Action Button" customClass="FancyAnimatedButton" customModule="WooCommerce" customModuleProvider="target">
64-
<rect key="frame" x="0.0" y="124.33333333333337" width="374" height="50"/>
55+
<rect key="frame" x="0.0" y="70" width="374" height="50"/>
6556
<color key="backgroundColor" red="0.58823529409999997" green="0.34509803919999998" blue="0.54117647059999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
6657
<constraints>
6758
<constraint firstAttribute="height" constant="50" id="Bue-lt-N74"/>
@@ -76,7 +67,7 @@
7667
</connections>
7768
</button>
7869
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Slo-h4-7qY" userLabel="secondary action button" customClass="FancyAnimatedButton" customModule="WooCommerce" customModuleProvider="target">
79-
<rect key="frame" x="0.0" y="194.33333333333337" width="374" height="50"/>
70+
<rect key="frame" x="0.0" y="140" width="374" height="50"/>
8071
<constraints>
8172
<constraint firstAttribute="height" constant="50" id="HG6-bp-QRu"/>
8273
</constraints>

0 commit comments

Comments
 (0)