From e28d75d9376dec611bc7966a7276970e84a9155d Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Mon, 1 Jun 2020 15:13:14 -0500 Subject: [PATCH 01/15] Add a tableview and a NUXButton below the tableview --- .../View Related/SiteAddress.storyboard | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard b/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard index 83cb64dab..2efe2d7ad 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard +++ b/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard @@ -16,15 +16,25 @@ - + + + + + + + + + + + + + + From 00cb0c227aba451ad65c265448a09246f19ad71b Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Mon, 1 Jun 2020 15:21:02 -0500 Subject: [PATCH 02/15] Attach the tableView and continueButton outlets --- .../Unified Auth/View Related/SiteAddress.storyboard | 4 ++++ .../View Related/SiteAddressViewController.swift | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard b/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard index 2efe2d7ad..7536f987d 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard +++ b/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard @@ -37,6 +37,10 @@ + + + + diff --git a/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift b/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift index d37d43cce..7c17966b8 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift +++ b/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift @@ -3,7 +3,11 @@ import UIKit /// SiteAddressViewController: log in by Site Address. /// -class SiteAddressViewController: UIViewController { +final class SiteAddressViewController: UIViewController { + + @IBOutlet private weak var tableView: UITableView! + + @IBOutlet private weak var continueButton: NUXButton! override func viewDidLoad() { super.viewDidLoad() From 333b8198a468fdddf5458332eee07f2888cb6ee6 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Mon, 1 Jun 2020 15:41:28 -0500 Subject: [PATCH 03/15] Connect tableview delegate and datasource --- .../View Related/SiteAddress.storyboard | 10 +++++++++- .../SiteAddressViewController.swift | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard b/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard index 7536f987d..7a06a6e31 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard +++ b/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard @@ -16,13 +16,21 @@ - + + + + + + diff --git a/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift b/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift index 7c17966b8..8d8776f66 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift +++ b/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift @@ -13,3 +13,21 @@ final class SiteAddressViewController: UIViewController { super.viewDidLoad() } } + + +// MARK: - UITableViewDataSource +extension SiteAddressViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 1 + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return UITableViewCell() + } +} + + +// MARK: - UITableViewDelegate conformance +extension SiteAddressViewController: UITableViewDelegate { + +} From fff9f7c4b4f6a92f3af3a06d78369ec403d56e75 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Mon, 1 Jun 2020 15:54:58 -0500 Subject: [PATCH 04/15] Change the continue button to be a primary NUX button --- .../Unified Auth/View Related/SiteAddress.storyboard | 4 ++-- .../Unified Auth/View Related/SiteAddressViewController.swift | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard b/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard index 7a06a6e31..9bb4ff9fb 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard +++ b/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard @@ -25,7 +25,7 @@ - + + + + + + + + + + - + + + + + + + + + + + + + + - - + - - + + + + @@ -55,4 +215,7 @@ + + + From dfd7f4fbac76e2d303e26c4796d1ad6bf89e75fe Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 2 Jun 2020 13:05:15 -0500 Subject: [PATCH 10/15] Add table row cells and conform to NUXKeyboardResponder --- .../SiteAddressViewController.swift | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift b/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift index f106a6d16..4b5d78183 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift +++ b/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift @@ -6,6 +6,7 @@ import UIKit final class SiteAddressViewController: LoginViewController { @IBOutlet private weak var tableView: UITableView! + @IBOutlet var bottomContentConstraint: NSLayoutConstraint? var displayStrings: WordPressAuthenticatorDisplayStrings { return WordPressAuthenticator.shared.displayStrings @@ -28,10 +29,34 @@ final class SiteAddressViewController: LoginViewController { // MARK: - UITableViewDataSource extension SiteAddressViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return 1 + return 4 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + if indexPath.row == 0 { + return tableView.dequeueReusableCell(withIdentifier: "largetitlecell") ?? UITableViewCell() + } + + if indexPath.row == 1 { + return tableView.dequeueReusableCell(withIdentifier: "emailcell") ?? UITableViewCell() + } + + if indexPath.row == 2 { + return tableView.dequeueReusableCell(withIdentifier: "instructionscell") ?? UITableViewCell() + } + + if indexPath.row == 3 { + return tableView.dequeueReusableCell(withIdentifier: "textfieldcell") ?? UITableViewCell() + } + + if indexPath.row == 4 { + return tableView.dequeueReusableCell(withIdentifier: "errorcell") ?? UITableViewCell() + } + + if indexPath.row == 5 { + return tableView.dequeueReusableCell(withIdentifier: "secondaryhelperbuttoncell") ?? UITableViewCell() + } + return UITableViewCell() } } @@ -41,3 +66,20 @@ extension SiteAddressViewController: UITableViewDataSource { extension SiteAddressViewController: UITableViewDelegate { } + +// MARK: - Keyboard Notifications +extension SiteAddressViewController: NUXKeyboardResponder { + var verticalCenterConstraint: NSLayoutConstraint? { + // no-op + return nil + } + + @objc func handleKeyboardWillShow(_ notification: Foundation.Notification) { + keyboardWillShow(notification) + } + + + @objc func handleKeyboardWillHide(_ notification: Foundation.Notification) { + keyboardWillHide(notification) + } +} From 4af1f3ddb7c078d378874147107efa5da530a776 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 2 Jun 2020 13:05:15 -0500 Subject: [PATCH 11/15] Revert "Add table row cells and conform to NUXKeyboardResponder" This reverts commit dfd7f4fbac76e2d303e26c4796d1ad6bf89e75fe. --- .../SiteAddressViewController.swift | 44 +------------------ 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift b/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift index 4b5d78183..f106a6d16 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift +++ b/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift @@ -6,7 +6,6 @@ import UIKit final class SiteAddressViewController: LoginViewController { @IBOutlet private weak var tableView: UITableView! - @IBOutlet var bottomContentConstraint: NSLayoutConstraint? var displayStrings: WordPressAuthenticatorDisplayStrings { return WordPressAuthenticator.shared.displayStrings @@ -29,34 +28,10 @@ final class SiteAddressViewController: LoginViewController { // MARK: - UITableViewDataSource extension SiteAddressViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return 4 + return 1 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - if indexPath.row == 0 { - return tableView.dequeueReusableCell(withIdentifier: "largetitlecell") ?? UITableViewCell() - } - - if indexPath.row == 1 { - return tableView.dequeueReusableCell(withIdentifier: "emailcell") ?? UITableViewCell() - } - - if indexPath.row == 2 { - return tableView.dequeueReusableCell(withIdentifier: "instructionscell") ?? UITableViewCell() - } - - if indexPath.row == 3 { - return tableView.dequeueReusableCell(withIdentifier: "textfieldcell") ?? UITableViewCell() - } - - if indexPath.row == 4 { - return tableView.dequeueReusableCell(withIdentifier: "errorcell") ?? UITableViewCell() - } - - if indexPath.row == 5 { - return tableView.dequeueReusableCell(withIdentifier: "secondaryhelperbuttoncell") ?? UITableViewCell() - } - return UITableViewCell() } } @@ -66,20 +41,3 @@ extension SiteAddressViewController: UITableViewDataSource { extension SiteAddressViewController: UITableViewDelegate { } - -// MARK: - Keyboard Notifications -extension SiteAddressViewController: NUXKeyboardResponder { - var verticalCenterConstraint: NSLayoutConstraint? { - // no-op - return nil - } - - @objc func handleKeyboardWillShow(_ notification: Foundation.Notification) { - keyboardWillShow(notification) - } - - - @objc func handleKeyboardWillHide(_ notification: Foundation.Notification) { - keyboardWillHide(notification) - } -} From e80c6727d38365e86929c22d2fae5caa4cae8611 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 2 Jun 2020 13:04:35 -0500 Subject: [PATCH 12/15] Revert "Quick sketch to lay out a few example tableview cells" This reverts commit cf90a80445e051b4d2a512582b4254ad9e37d906. --- .../View Related/SiteAddress.storyboard | 185 ++---------------- 1 file changed, 11 insertions(+), 174 deletions(-) diff --git a/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard b/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard index 5e59bf31f..da94d0b36 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard +++ b/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard @@ -19,193 +19,33 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + - - + - - @@ -215,7 +55,4 @@ Not seeing the email? Check your Spam or Junk Mail folder. - - - From d357666da674dd3d6a95f17aad98c71c90768d1b Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 2 Jun 2020 13:04:16 -0500 Subject: [PATCH 13/15] Revert "bump the podspec" This reverts commit 4f981722b7b05e1cd6f374c3127a091a6802c80a. --- WordPressAuthenticator.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressAuthenticator.podspec b/WordPressAuthenticator.podspec index f97c2fa9f..86555068f 100644 --- a/WordPressAuthenticator.podspec +++ b/WordPressAuthenticator.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressAuthenticator" - s.version = "1.18.0-beta.3" + s.version = "1.18.0-beta.2" s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps." s.description = <<-DESC From 412f0ec578176afc8f401a2a080ccd4790a016f9 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 2 Jun 2020 13:34:30 -0500 Subject: [PATCH 14/15] Bump podspec --- WordPressAuthenticator.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressAuthenticator.podspec b/WordPressAuthenticator.podspec index 86555068f..f97c2fa9f 100644 --- a/WordPressAuthenticator.podspec +++ b/WordPressAuthenticator.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressAuthenticator" - s.version = "1.18.0-beta.2" + s.version = "1.18.0-beta.3" s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps." s.description = <<-DESC From 42fef108a3599a82544da32b95394fccaf7e2b97 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 2 Jun 2020 13:39:48 -0500 Subject: [PATCH 15/15] Change comment text for translators --- .../Authenticator/WordPressAuthenticatorDisplayStrings.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressAuthenticator/Authenticator/WordPressAuthenticatorDisplayStrings.swift b/WordPressAuthenticator/Authenticator/WordPressAuthenticatorDisplayStrings.swift index 9e52656c7..f2faf0a77 100644 --- a/WordPressAuthenticator/Authenticator/WordPressAuthenticatorDisplayStrings.swift +++ b/WordPressAuthenticator/Authenticator/WordPressAuthenticatorDisplayStrings.swift @@ -39,7 +39,7 @@ public extension WordPressAuthenticatorDisplayStrings { siteLoginInstructions: NSLocalizedString("Enter the address of the WordPress site you'd like to connect.", comment: "Instruction text on the login's site addresss screen."), continueButtonTitle: NSLocalizedString("Continue", - comment: "The primary call-to-action button text on the unified site address screen.") + comment: "The button title text when there is a next step for logging in or signing up.") ) } }