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

@ashfurrow => Related artworks. #277

Merged
merged 31 commits into from Mar 19, 2015
Merged

Conversation

alloy
Copy link
Contributor

@alloy alloy commented Mar 12, 2015

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?

@alloy
Copy link
Contributor Author

alloy commented Mar 12, 2015

Btw, I’m gonna cleanup the commits, or maybe even squash, once I’m fully done.

@orta
Copy link
Contributor

orta commented Mar 13, 2015

Yeah the SaleArtwork is used to show a countdown and to provide auction metadata, it gets used here:

returnable = self.saleArtwork.auction;
when both networking promises are fulfilled.

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"];
Copy link
Contributor

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.

Copy link
Contributor Author

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 👌

@ashfurrow
Copy link
Contributor

Looks good so far. Very nice on the tests. Don't forget to make indenting consistent – Orta gets fussy.

@alloy
Copy link
Contributor Author

alloy commented Mar 13, 2015

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?

@ashfurrow
Copy link
Contributor

Fine with me!

@orta
Copy link
Contributor

orta commented Mar 16, 2015

changelog

@alloy
Copy link
Contributor Author

alloy commented Mar 16, 2015

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 "/artwork/:id" JLRoute.

Would it be possible to have martsy include a GET parameter that’s only really used by Eigen? E.g.:

https://m.artsy.net/artwork/derrick-adams-head-study-figure-plate-4?auction_id=watermill-center-auction

Or do you have another/better/existing solution?

@orta
Copy link
Contributor

orta commented Mar 16, 2015

the presence of a SaleAuction object means it is in an auction

@alloy
Copy link
Contributor Author

alloy commented Mar 16, 2015

@orta I understand, but that does not indicate if the artwork was shown from an auction context.

@orta
Copy link
Contributor

orta commented Mar 16, 2015

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.

@alloy
Copy link
Contributor Author

alloy commented Mar 16, 2015

Should be good, functionality-wise. Going to cleanup and go over it once more tomorrow and make it a final PR.

@ashfurrow
Copy link
Contributor

Cool!

@alloy
Copy link
Contributor Author

alloy commented Mar 17, 2015

Yeah the SaleArtwork is used to show a countdown and to provide auction metadata

@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.

@orta
Copy link
Contributor

orta commented Mar 17, 2015

yeah, deeper in the hierarchy

@alloy
Copy link
Contributor Author

alloy commented Mar 17, 2015

Any clues as to what this is about? Is it about returning, for instance, the saleArtwork here instead? And, if so, what could that impact (seeing as it wasn’t done yet)?

@orta
Copy link
Contributor

orta commented Mar 17, 2015

no idea :D

});
});

//describe(@"concerning layout", ^{
Copy link
Contributor

Choose a reason for hiding this comment

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

Meant to be included?

Copy link
Contributor Author

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.

@ashfurrow
Copy link
Contributor

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.

@alloy
Copy link
Contributor Author

alloy commented Mar 18, 2015

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

@alloy alloy mentioned this pull request Mar 18, 2015
8 tasks
@alloy
Copy link
Contributor Author

alloy commented Mar 18, 2015

Did you mean these inconsistencies c3e1a19 ?

@alloy
Copy link
Contributor Author

alloy commented Mar 18, 2015

And would this benefit from snapshot tests at all?

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:

screen shot 2015-03-19 at 00 07 08

@ashfurrow
Copy link
Contributor

Yes, those consistencies.

And you're right about the snapshot tests – we're already testing the constituent parts, so it's coooool.

@alloy
Copy link
Contributor Author

alloy commented Mar 19, 2015

@ashfurrow Anything holding this merge back that I overlooked?

@ashfurrow
Copy link
Contributor

Nope - mentioned here that it was good to merge. I'll do so now.

ashfurrow added a commit that referenced this pull request Mar 19, 2015
@ashfurrow ashfurrow merged commit 16fcee0 into master Mar 19, 2015
@orta
Copy link
Contributor

orta commented Mar 19, 2015

🎉

@orta
Copy link
Contributor

orta commented Mar 19, 2015

also that JSON formatting is fine, I get triggered by things like this:

    if ([UIDevice isPad]) {
        [_userOptions addObject:@{
                  AROptionsKey : AROptionsUseWhiteFolio,
                 AROptionsName : @"White Folio"
        }];
    }

or other, weird don't flow along the left edge things

@alloy
Copy link
Contributor Author

alloy commented Mar 19, 2015

Aiiight, thanks!

@alloy
Copy link
Contributor Author

alloy commented Mar 19, 2015

@orta
Copy link
Contributor

orta commented Mar 19, 2015

( this requires updating some snapshots BTW )
https://eigen-ci.s3.amazonaws.com/snapshots/55092032/index.html

@ashfurrow
Copy link
Contributor

Ah yeah, good catch Orta.

@alloy
Copy link
Contributor Author

alloy commented Mar 20, 2015

I must have kept focused testing on :( I'll make a PR tonight.

@ashfurrow
Copy link
Contributor

I missed it too – I'm too used to merging on reds that I've stopped verifying why CI failed 😞

@alloy
Copy link
Contributor Author

alloy commented Mar 23, 2015

alloy added a commit that referenced this pull request Mar 23, 2015
@alloy alloy deleted the alloy-artwork-related-outside-genes branch April 1, 2015 16:42
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.

What to show on artwork view
3 participants