[FEAT] Implement donations controller - #107
Conversation
dillon-mce
left a comment
There was a problem hiding this comment.
I'm new to this project, so just looking over PRs to get a feel for everything. Looks like a lot of good work!
| extension UIStackView { | ||
| func addArrangedSubviews(_ views: UIView...) { | ||
| views.forEach { self.addArrangedSubview($0) } | ||
| } | ||
| } |
| private static func dynamic(light: UIColor, dark: UIColor) -> UIColor { | ||
| return .init { trait in | ||
| return trait.isDarkModeOn ? dark : light | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
I don't know that this is clearer than just using the initializer that you're wrapping. It is also kind of limited. What if you wanted to add colors for high contrast?
There was a problem hiding this comment.
I added this so we could at least start adding dynamic colors to the app so they work during dark mode. definitely a lot of room to improve here in a different PR
| return label | ||
| }() | ||
| private var titleLabel = UILabel.create { | ||
| $0.translatesAutoresizingMaskIntoConstraints = false |
There was a problem hiding this comment.
This line and lines 61-66 were all accomplished in titleLabel.fillSuperView() (L50) before. Is the style you have here preferred? I assumed we should be using those convenience methods.
There was a problem hiding this comment.
Did this to be consistent with the rest of the code in the diff but will add a quick follow up diff to use fillSuperView()
…homePageDiffHeader * commit '0849144d5263661a10facbfca254c978685cf7cc': [Chore] Add theme file (#85) [Chore] Refactor filter category cell constraints (#109) [UI] Use UIColor.STN extension (#108) Implement donations controller (#107) # Conflicts: # SayTheirNames/Source/Controller/Home/HomeController.swift # SayTheirNames/Source/Controller/Home/HomeView.swift
This PR implements almost everything needed for the Donations Controller