-
Notifications
You must be signed in to change notification settings - Fork 576
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
[WorksForYou] V1 of the view controller #1185
Conversation
Generated by 🚫 danger |
An easy rule to remember is that we never use Avant Garde with lowercase letters, so double check the designs WRT the title |
|
||
|
||
@interface ARWorksForYouViewController : UIViewController | ||
@interface ARWorksForYouViewController : UIViewController <AREmbeddedModelsViewControllerDelegate, UIScrollViewDelegate> |
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.
does this information need to be public knowledge? e.g. could it of in the .m
@mennenia tiny to do, not sure if you want to add it to this PR or not but the artist names should be all caps. This is looking awesome tho! |
Yup that's been fixed in the label pod :) I know it's not reflected in the gif yet, sorry! |
Okay, @orta I'm ready for this one to be reviewed/closed. I thought I did what I could to disable horizontal scrolling, but that isn't working at the moment. Will revisit. Upcoming PRs: I will make the artist clickable (which will make the VC a bit nicer, as I'll take out some of the view code and put it in a separate class), sort out iPad (needs some better spacing), then snapshots. |
[df setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"]; | ||
|
||
return [df dateFromString:(NSString *)_publishedAt]; | ||
} |
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's probably better that you leave this to the view controller - I don't think an user of the model would expect the performance hit that would come with this, ( you can also use ARStandardDateFormatter to use the standard for setting formats )
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.
Not sure if I follow - the problem is that the type of "publishedAt" is an NSString, even though it's described as an NSDate. Basically, when getting it from the json, the string is put into the property without converting it into a date. If you want I can do this logic in the VC, but then the type should become "NSString *publisedAt" right?
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.
Ah, then you need to create a value transformer for it, then it's done on the BG parsing thread, e.g.
+ (NSValueTransformer *)startDateJSONTransformer
{
return [ARStandardDateFormatter sharedFormatter].stringTransformer;
}
+ (NSValueTransformer *)endDateJSONTransformer
{
return [ARStandardDateFormatter sharedFormatter].stringTransformer;
}
I think you'd want:
+ (NSValueTransformer *)publishedAtJSONTransformer
{
return [ARStandardDateFormatter sharedFormatter].stringTransformer;
}
Cool beans - this looks solid 10/10 |
[WorksForYou] V1 of the view controller
TODO (on top of what's in #1158)
Demo:
Scroll and load:
Click:
Will do this later today hopefully, and then separately do new snapshot tests, mark notification as read, etc