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
@ashfurrow => Related artworks. #277
Conversation
Btw, I’m gonna cleanup the commits, or maybe even squash, once I’m fully done. |
Yeah the SaleArtwork is used to show a countdown and to provide auction metadata, it gets used here:
|
UICollectionView *artworksCollectionView = [artworksVCView.subviews lastObject]; | ||
NSAssert(!CGSizeEqualToSize(artworksCollectionView.frame.size, CGSizeZero), | ||
@"There are no visible cells in a UICollectionView if it has no visible frame."); | ||
return [[artworksCollectionView visibleCells] valueForKeyPath:@"metadataView.secondaryLabel.text"]; |
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.
Neat! Might make sore sense to use an Objective-Sugar map:
here instead of valueForKeyPath:
, for explicitness' sake.
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 yeah, I keep forgetting about that pod being included, sweet 👌
Looks good so far. Very nice on the tests. Don't forget to make indenting consistent – Orta gets fussy. |
And rightfully so! I’ll have to setup some project specific vim config. Is it ok if I add that to the repo? |
Fine with me! |
changelog |
I’m stuck on how to determine that an artwork was shown in the context of an auction, as the auction views are martsy views and so the artwork is shown with the abstract Would it be possible to have martsy include a GET parameter that’s only really used by Eigen? E.g.:
Or do you have another/better/existing solution? |
the presence of a SaleAuction object means it is in an auction |
@orta I understand, but that does not indicate if the artwork was shown from an auction context. |
Ah I see, in this case there is no auction context ( not like how we do a fair context ) - the runtime saleartwork lookup is all we use to determine whether to show auction related views. |
Should be good, functionality-wise. Going to cleanup and go over it once more tomorrow and make it a final PR. |
Cool! |
@orta I’m assuming that you meant in another view, e.g. ARArtworkView, because I really don’t see anything related to any of that in this view. |
yeah, deeper in the hierarchy |
no idea :D |
Described at #113.
* Can’t use `-[MTLModel dictionaryValue]` as it’s not the JSON version. * Can’t use `MTLJSONAdapter` because of all the `null` fields in limited test fixtures.
}); | ||
}); | ||
|
||
//describe(@"concerning layout", ^{ |
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.
Meant to be included?
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.
Needed to be fixed, done so now.
Generally looks great! A few points. Indenting in the tests is inconsistent (and we don't want to upset Orta). And would this benefit from snapshot tests at all? Sidetone: I don't love KSPromise, but a bigger conversation needs to happen around our network code in general. |
Yeah, agreed on the “we need to have this discussion” part, let’s do that when I’m in NYC. /cc @1aurabrown @orta |
Did you mean these inconsistencies c3e1a19 ? |
I thought it wouldn’t, because this is more about logic as to what to show then it is about how it is being showed. I assumed there would already be snapshots for what a grid of (related) artworks look like? Here’s an example of the snapshots for these tests: |
Yes, those consistencies. And you're right about the snapshot tests – we're already testing the constituent parts, so it's coooool. |
@ashfurrow Anything holding this merge back that I overlooked? |
Nope - mentioned here that it was good to merge. I'll do so now. |
@ashfurrow => Related artworks.
🎉 |
also that JSON formatting is fine, I get triggered by things like this:
or other, weird don't flow along the left edge things |
Aiiight, thanks! |
( this requires updating some snapshots BTW ) |
Ah yeah, good catch Orta. |
I must have kept focused testing on :( I'll make a PR tonight. |
I missed it too – I'm too used to merging on reds that I've stopped verifying why CI failed 😞 |
This fixes #113.
So I decided to take the if-else block out of
ARArtworkRelatedArtworksView
and make that a controller concern (still to do). The controller then simply adds the sections for the right context and the view doesn’t need to know about it.Right now my biggest question is about the sale update, it’s not really clear to me how this is working. I assumed it was so that when you’re looking at an auction lot, it keeps the bids up-to-date? But besides it setting a property (
saleArtwork
) I don’t see how it would do that. Any hints?