Skip to content
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

Merged
merged 17 commits into from
Mar 16, 2017
Merged

Update and sync some global styles #104

merged 17 commits into from
Mar 16, 2017

Conversation

theginbin
Copy link
Contributor

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.

Copy link
Contributor

@justinswart justinswart left a 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() {
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and can call super

Copy link
Contributor

@mbrandonw mbrandonw left a 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
Copy link
Contributor

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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oof good catch

@@ -14,13 +14,17 @@ public enum Styles {
}
}

public func baseControllerFeedStyle <VC: UIViewControllerProtocol> () -> ((VC) -> VC) {
return VC.lens.view.backgroundColor .~ .ksr_grey_300
}
Copy link
Contributor

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() {
Copy link
Contributor

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
Copy link
Contributor

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()
Copy link
Contributor

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) }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

welcome back @mbrandonw! :D

Copy link
Contributor

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!

@mbrandonw mbrandonw self-assigned this Mar 14, 2017
@theginbin
Copy link
Contributor Author

i've just updated the borderButtonStyle with a darker border as that was the main problematic change. when circle passes, will merge!

@theginbin theginbin merged commit edc8b49 into master Mar 16, 2017
@theginbin theginbin deleted the update-global-styles branch March 16, 2017 16:05
@mbrandonw mbrandonw mentioned this pull request Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants