-
Notifications
You must be signed in to change notification settings - Fork 121
Login Epilogue: Mark I #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| static var defaultTextColor: UIColor { | ||
| return active.defaultTextColor | ||
| static var tableViewBackgroundColor: UIColor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opening Brace Spacing Violation: Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace)
| /// White-Background View, to be placed surrounding the bottom area. | ||
| /// | ||
| @IBOutlet private var backgroundView: UIView! { | ||
| didSet { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opening Brace Spacing Violation: Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace)
|
|
||
| static var buttonPrimaryColor: UIColor { | ||
| return active.buttonPrimaryColor | ||
| static var tableViewBackgroundColor: UIColor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opening Brace Spacing Violation: Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace)
| } | ||
|
|
||
| func downloadGravatarImage() { | ||
| guard let targetURL = StoresManager.shared.sessionManager.defaultAccount?.gravatarUrl, let gravatarURL = URL(string: targetURL) else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Opening braces should be preceded by a single space and on the same line as the declaration. |
|
|
||
| /// AccountHeaderView: Displays an Account's Details: [Gravatar + Name + Username] | ||
| /// | ||
| class AccountHeaderView: UIView { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Opening braces should be preceded by a single space and on the same line as the declaration. |
Generated by 🚫 Danger |
| set { | ||
| fullnameLabel.text = newValue | ||
| } | ||
| get { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Opening braces should be preceded by a single space and on the same line as the declaration. |
mindgraffiti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit tests ✅
Looking good @jleandroperez! Some nitpicky items then ![]()
| /// | ||
| @IBOutlet private var noResultsLabel: UILabel! { | ||
| didSet { | ||
| noResultsLabel.font = UIFont.font(forStyle: .subheadline, weight: .regular) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add to StyleManager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call!!
|
|
||
|
|
||
|
|
||
| // MARK: - Overriden Methods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overridden instead of Overriden
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My GOD you must have sent me that comment 99 times already. SORRY about making the same mistake over and over!!!!
| return | ||
| } | ||
|
|
||
| headerView.username = "@" + defaultAccount.username |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a tiny convenience method (maybe in defaultAccount?) that added the @ symbol to a username string, because we'll be using this a lot more in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Holding this one for a bit... because, honestly, i have no idea what to call this calculated getter, and everything sounds awful (all of it)!!!.
"Prefixed Username" ... "At Username"... "usernameForDisplay"
bummytime
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good @jleandroperez. Unit tests are ✅.
One thing I will point out is that the EmptyStoresTableViewCell doesn't render well in landscape:
You may want to disable landscape on this screen like we do on WPiOS.
Your call if you want to address that 👆 in this PR or create a separate issue.
Other than that, ![]()
|
Thanks for the review @mindgraffiti + @bummytime !!!. Addressing the pendings (Rotation support) in a second PR, which is in the works. For the record, pendings are:
|

Details:
This PR implements the Login Epilogue UI: We'll display a Store Picker, which will allow the user(s) to select the active WooCommerce Store.
I'm splitting this PR in two, since i'm already approaching 586 LOC.
Ref. #90
cc @mindgraffiti @bummytime
Thanks in advance!!
Testing:
Verify that the Login Epilogue should show up. Note that at this stage, the Epilogue is expected to look as follows (no matter if you do have or do not have a Store setup). To be finished in a second PR.