Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 541ce42

Browse files
authored
Merge pull request #240 from wordpress-mobile/issue/239-remove-showURLUsernamePassword
UL&S: Remove `showURLUsernamePassword`
2 parents fc0f91c + 2840083 commit 541ce42

File tree

5 files changed

+33
-17
lines changed

5 files changed

+33
-17
lines changed

WordPressAuthenticator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "WordPressAuthenticator"
3-
s.version = "1.13.0-beta.2"
3+
s.version = "1.13.0-beta.3"
44
s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps."
55

66
s.description = <<-DESC

WordPressAuthenticator/NUX/NUXViewController.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ open class NUXViewController: UIViewController, NUXViewControllerBase, UIViewCon
2525
// MARK: associated type for NUXSegueHandler
2626
/// Segue identifiers to avoid using strings
2727
public enum SegueIdentifier: String {
28-
case showURLUsernamePassword
2928
case showWPUsernamePassword
3029
case showSelfHostedLogin
3130
case showWPComLogin

WordPressAuthenticator/Signin/Login.storyboard

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Ck1-vY-O11">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Ck1-vY-O11">
33
<device id="retina4_7" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
77
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
88
</dependencies>
99
<scenes>
@@ -351,7 +351,6 @@
351351
<segue destination="lmD-c6-SLs" kind="show" identifier="showWPComLogin" id="ySQ-EM-6JI"/>
352352
<segue destination="anK-hg-K4j" kind="show" identifier="showSelfHostedLogin" id="bK1-J1-hfT"/>
353353
<segue destination="klu-4U-PyL" kind="show" identifier="showSignupEmail" id="dh4-9P-l8W"/>
354-
<segue destination="SZS-o3-1P7" kind="show" identifier="showURLUsernamePassword" id="4SK-mG-U33"/>
355354
</connections>
356355
</viewController>
357356
<placeholder placeholderIdentifier="IBFirstResponder" id="wWl-qb-1Yp" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -361,7 +360,7 @@
361360
<!--Login Self Hosted View Controller-->
362361
<scene sceneID="b2O-iW-wfB">
363362
<objects>
364-
<viewController storyboardIdentifier="selfHosted" useStoryboardIdentifierAsRestorationIdentifier="YES" id="SZS-o3-1P7" customClass="LoginSelfHostedViewController" customModule="WordPressAuthenticator" sceneMemberID="viewController">
363+
<viewController storyboardIdentifier="LoginSelfHostedViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="SZS-o3-1P7" customClass="LoginSelfHostedViewController" customModule="WordPressAuthenticator" sceneMemberID="viewController">
365364
<layoutGuides>
366365
<viewControllerLayoutGuide type="top" id="Yjk-Cc-Bxb"/>
367366
<viewControllerLayoutGuide type="bottom" id="Ktl-It-Kmo"/>
@@ -1145,7 +1144,6 @@
11451144
<outlet property="siteAddressHelpButton" destination="roL-ID-k8n" id="QB2-ri-X5V"/>
11461145
<outlet property="siteURLField" destination="ZrT-CY-qD7" id="561-Zw-Ja9"/>
11471146
<outlet property="submitButton" destination="ltO-hW-mbe" id="wwr-D5-5kK"/>
1148-
<segue destination="SZS-o3-1P7" kind="show" identifier="showURLUsernamePassword" id="TkG-0R-c3i"/>
11491147
<segue destination="iMi-vX-AxR" kind="show" identifier="showWPUsernamePassword" id="dtm-iK-PLb"/>
11501148
<segue destination="hed-vB-osh" kind="presentation" identifier="showLoginMethod" id="5hL-j3-eMs"/>
11511149
<segue destination="lmD-c6-SLs" kind="show" identifier="showWPComLogin" id="8p6-rS-9Ml"/>
@@ -1425,16 +1423,15 @@
14251423
<point key="canvasLocation" x="-460" y="1248"/>
14261424
</scene>
14271425
</scenes>
1428-
<resources>
1429-
<image name="icon-password-field" width="18" height="22"/>
1430-
<image name="icon-url-field" width="18" height="22"/>
1431-
<image name="icon-username-field" width="18" height="18"/>
1432-
</resources>
14331426
<inferredMetricsTieBreakers>
14341427
<segue reference="N3P-wt-Rn3"/>
14351428
<segue reference="Njv-lY-Lyi"/>
14361429
<segue reference="UV4-XI-c0q"/>
1437-
<segue reference="4SK-mG-U33"/>
14381430
<segue reference="iD4-VS-n3M"/>
14391431
</inferredMetricsTieBreakers>
1432+
<resources>
1433+
<image name="icon-password-field" width="18" height="22"/>
1434+
<image name="icon-url-field" width="18" height="22"/>
1435+
<image name="icon-username-field" width="18" height="18"/>
1436+
</resources>
14401437
</document>

WordPressAuthenticator/Signin/LoginEmailViewController.swift

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,24 @@ open class LoginEmailViewController: LoginViewController, NUXKeyboardResponder {
403403
}
404404

405405
/// Configures loginFields to log into wordpress.com and
406-
/// navigates to the selfhosted username/password form. Displays the specified
407-
/// error message when the new view controller appears.
406+
/// navigates to the selfhosted username/password form.
407+
/// Displays the specified error message when the new
408+
/// view controller appears.
408409
///
409410
@objc func showSelfHostedUsernamePasswordAndError(_ error: Error) {
410411
loginFields.siteAddress = "https://wordpress.com"
411412
errorToPresent = error
412-
performSegue(withIdentifier: .showURLUsernamePassword, sender: self)
413+
414+
guard let vc = LoginSelfHostedViewController.instantiate(from: .login) else {
415+
DDLogError("Failed to navigate from LoginEmailViewController to LoginSelfHostedViewController")
416+
return
417+
}
418+
419+
vc.loginFields = loginFields
420+
vc.dismissBlock = dismissBlock
421+
vc.errorToPresent = errorToPresent
422+
423+
navigationController?.pushViewController(vc, animated: true)
413424
}
414425

415426
override open func displayRemoteError(_ error: Error) {

WordPressAuthenticator/Signin/LoginSiteAddressViewController.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,16 @@ class LoginSiteAddressViewController: LoginViewController, NUXKeyboardResponder
258258
///
259259
@objc func showSelfHostedUsernamePassword() {
260260
configureViewLoading(false)
261-
performSegue(withIdentifier: .showURLUsernamePassword, sender: self)
261+
guard let vc = LoginSelfHostedViewController.instantiate(from: .login) else {
262+
DDLogError("Failed to navigate from LoginEmailViewController to LoginSelfHostedViewController")
263+
return
264+
}
265+
266+
vc.loginFields = loginFields
267+
vc.dismissBlock = dismissBlock
268+
vc.errorToPresent = errorToPresent
269+
270+
navigationController?.pushViewController(vc, animated: true)
262271
}
263272

264273
/// Break away from the self-hosted flow.

0 commit comments

Comments
 (0)