-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update and sync some global styles #104
Conversation
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.
Seems legit!
@@ -17,6 +18,10 @@ internal final class ProjectNotificationsViewController: UITableViewController { | |||
self.tableView.dataSource = self.dataSource | |||
} | |||
|
|||
override func bindStyles() { |
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.
Probably just want an internal
here for consistency.
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.
and can call super
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.
i think i understand what's going on, but i have a few clarifying questions.
@@ -25,7 +25,8 @@ internal final class CommentCell: UITableViewCell, ValueCell { | |||
|
|||
_ = self | |||
|> baseTableViewCellStyle() | |||
|> CommentCell.lens.contentView.layoutMargins .~ | |||
|> UITableViewCell.lens.backgroundColor .~ .white |
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.
would we wanna bake this background color into the base table view style so that we didnt have to update it everywhere?
@@ -29,6 +29,8 @@ internal final class ActivitiesViewController: UITableViewController { | |||
} | |||
|
|||
internal override func viewDidLayoutSubviews() { | |||
super.viewDidLayoutSubviews() |
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.
oof good catch
Library/Styles/BaseStyles.swift
Outdated
@@ -14,13 +14,17 @@ public enum Styles { | |||
} | |||
} | |||
|
|||
public func baseControllerFeedStyle <VC: UIViewControllerProtocol> () -> ((VC) -> VC) { | |||
return VC.lens.view.backgroundColor .~ .ksr_grey_300 | |||
} |
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.
is there a need to have a separate concept of baseControllerFeedStyle
and baseTableControllerStyle
? should we ever use baseTableControllerStyle
now?
@@ -17,6 +18,10 @@ internal final class ProjectNotificationsViewController: UITableViewController { | |||
self.tableView.dataSource = self.dataSource | |||
} | |||
|
|||
override func bindStyles() { |
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.
and can call super
@@ -33,6 +33,9 @@ internal final class ProjectCreatorViewController: WebViewController { | |||
|
|||
_ = self | |||
|> baseControllerStyle() | |||
|
|||
_ = self.navigationController?.navigationBar | |||
?|> baseNavigationBarStyle |
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.
i have an idea to be able to bake baseNavigationBarStyle
into our baseControllerStyle
so we wouldn't have to do any of this manually. lemme know if you wanna pair on it today
@@ -110,7 +110,7 @@ public final class LiveStreamContainerViewController: UIViewController { | |||
super.bindStyles() | |||
|
|||
_ = self | |||
|> baseControllerStyle() | |||
|> baseControllerFeedStyle() |
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.
i think this should also go back to baseControllerStyle
cause it's just a plain view controller and it sets its own background color
@@ -15,12 +15,14 @@ public enum Styles { | |||
} | |||
|
|||
public func baseControllerStyle <VC: UIViewControllerProtocol> () -> ((VC) -> VC) { | |||
return VC.lens.view.backgroundColor .~ .ksr_grey_200 | |||
return VC.lens.view.backgroundColor .~ .white | |||
<> (VC.lens.navigationController • navBarLens) %~ { $0.map(baseNavigationBarStyle) } |
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.
welcome back @mbrandonw! :D
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.
@theginbin i missed the smell of lenses in the morning!
i've just updated the |
What
While working on updating the backer dashboard, I felt it necessary to separately update the entire app to match the new design in terms of navigation bar and background colors. As we keep going forward with new designs, it will be easier to start from a place where colors are in sync.
The main changes here are a white background for navigation bars and a white background color for screens that are not table view or collection view controllers. The table/collection view controllers have been updated to have a white foreground color and a darker grey background color. Navigation titles are now black.
I'd like to get the navigation bar border image to be the same across the app (grey_500), but for the sake of time, am keeping the default shadow for now.
Note: Still have to run past @maggieKSR but wanted to get the code and screenshots out for review.