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

Add Content model and list display #63

Merged
merged 10 commits into from
Jan 28, 2019
Merged

Add Content model and list display #63

merged 10 commits into from
Jan 28, 2019

Conversation

lokae0
Copy link
Collaborator

@lokae0 lokae0 commented Jan 18, 2019

screen shot 2019-01-17 at 3 54 26 pm

  • Added Content protocol and an example conforming type. This will next be passed onto the presented table view via protocol. Included a list display transformation with unit test.

  • colors.txt is now part of the Xcode project, so the hex values can be modified within the editor.

  • Also made some UI tweaks and code cleanup.

ps. if you want to keep the tone of the project serious, I'm happy to rename the Food enum & cases to something more boring. But then I'll tell your gf and she'll make fun of you

@lokae0 lokae0 requested a review from n8chur January 18, 2019 00:48
Application/Source/Detail/View/DetailViewModel.swift Outdated Show resolved Hide resolved
Application/Source/Detail/View/DetailViewModel.swift Outdated Show resolved Hide resolved
Application/Source/Detail/View/DetailViewModel.swift Outdated Show resolved Hide resolved
Application/Source/Extensions/Extensions.swift Outdated Show resolved Hide resolved
/**
It's not a side project if you can't have some fun, right?
- [Original.](https://www.youtube.com/watch?v=amONEHAhLHY)
- [Crispy.](https://www.youtube.com/watch?v=1BC1G33-fNY)
Copy link
Owner

Choose a reason for hiding this comment

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

BANGER

Application/Source/Models/Content.swift Outdated Show resolved Hide resolved
Application/Source/Models/Content.swift Outdated Show resolved Hide resolved
Core/Source/Themes/Styles/LabelStyle.swift Show resolved Hide resolved
@lokae0
Copy link
Collaborator Author

lokae0 commented Jan 24, 2019

@n8chur PR updated

private let spacingView: UIView = {
let view = UIView()
view.snp.makeConstraints { $0.height.equalTo(35) }
return view
Copy link
Owner

Choose a reason for hiding this comment

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

Rather than having a spacing view, could we have two UIStackViews inside of an outer UIStackView, then just give that UIStackView the appropriate spacing value? If we build it this way, we could even easily use a theme to define the spacing.

.joined(separator: ", ")
}
return Property(observable, initial: "")
}()
Copy link
Owner

Choose a reason for hiding this comment

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

This looks much cleaner! Nice.

@lokae0
Copy link
Collaborator Author

lokae0 commented Jan 26, 2019

@n8chur PR updated

@lokae0
Copy link
Collaborator Author

lokae0 commented Jan 27, 2019

@n8chur CI failure possibly related to microsoft/azure-pipelines-tasks#8840?

@n8chur
Copy link
Owner

n8chur commented Jan 27, 2019

@n8chur CI failure possibly related to microsoft/azure-pipelines-tasks#8840?

@lokae0: Yup, pretty sure it’s the same issue. Doesn’t look like anyone’s found a solution yet ¯_(ツ)_/¯

Sent with GitHawk

Copy link
Owner

@n8chur n8chur left a comment

Choose a reason for hiding this comment

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

LGTM!

@lokae0 lokae0 merged commit 5330eaf into contents_feature Jan 28, 2019
@lokae0 lokae0 deleted the detail_model branch January 28, 2019 00:51
lokae0 added a commit that referenced this pull request Jan 28, 2019
* Abstract centered label, remove unnecessary button boilerplate, and add spacing view

* No longer excluding colors.txt from project in Xcode

* Add alternate body text color

* Adding content / food enum for testing

* Display contents in detail view

* Further abstract contents list creation and add unit test

* Refactor contents list to be more reactive

* Changes per PR review

* Remove centeredLabel extension in favor of UILabelStyle additions

* Use container stackView instead of spacingView
lokae0 added a commit that referenced this pull request Jun 13, 2019
* Add content title and button to Details view (#60)

* Added strings for 'Contents' on details view

* Change simulated delay to 1.0 to be more noticable

* Clarify presenting VM vs presented VM in comments

* Added content list title and button to detail view

* Add some breathing room to stackViews

* Fix unit test timeout

* Add Content model and list display (#63)

* Abstract centered label, remove unnecessary button boilerplate, and add spacing view

* No longer excluding colors.txt from project in Xcode

* Add alternate body text color

* Adding content / food enum for testing

* Display contents in detail view

* Further abstract contents list creation and add unit test

* Refactor contents list to be more reactive

* Changes per PR review

* Remove centeredLabel extension in favor of UILabelStyle additions

* Use container stackView instead of spacingView

* Add Basic Food Table View (#66)

* Add FoodTable class cluster

* Populate basic tableView

* Add tests for FoodTable

* Per Swift4 convention, use AnyObject instead of class for protocol constraints

* Per PR review, fix FoodVCFactoryProtocol conformance

* Per PR review, rename FoodTable to FoodInfo

* Per PR review, streamline DetailVM factory protocol parameter

* Per PR review, make cell identifier local var

* Per PR review, update foods dependency structure

* PR cleanup

* Per PR review, cleanup where Food is located
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.

2 participants