Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

[RelatedArtists] Added a RelatedArtists component #28

Merged
merged 5 commits into from
May 6, 2016

Conversation

sarahscott
Copy link
Contributor

@sarahscott sarahscott commented May 4, 2016

  • RelatedArtist component
  • Temporary horizontal RelatedArtists view (until a collection view can be used instead)
  • Relay for all necessary information

simulator screen shot may 4 2016 3 24 08 pm

}

artworksString(artist) {
const forSale = artist.counts.for_sale_artworks ? artist.counts.for_sale_artworks + ' for sale' : null
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If there's a cooler way to do this, I'm all for it. This is a first go and I'm still not terribly familiar with the syntax.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like you really only need to pass in artist.counts instead of the complete artist.

@sarahscott sarahscott force-pushed the sarah-related-artists branch from 0d89422 to e7a93d4 Compare May 4, 2016 19:29
@sarahscott sarahscott changed the title [WIP - RelatedArtists] Added a RelatedArtists component [RelatedArtists] Added a RelatedArtists component May 4, 2016
@sarahscott
Copy link
Contributor Author

I'm happy with this; could use some feedback on syntax but otherwise it's everything we need for related artists besides the grid view.

@alloy
Copy link
Contributor

alloy commented May 4, 2016

You’re on 🔥

@alloy
Copy link
Contributor

alloy commented May 4, 2016

Might want to check if those same artist work counts labels are needed on other clients, if so it might be worth it to move to metaphysics.

@alloy
Copy link
Contributor

alloy commented May 4, 2016

@sarahscott See how far you can get with just flexbox: artsy/eigen#1136 (comment)

@sarahscott
Copy link
Contributor Author

I'll give it a shot!

aspectRatio={1.7}
<View style={{ width: imageWidth }}>
<ImageView style={{ height: imageWidth/1.5 }}
aspectRatio={1.5}
Copy link
Contributor

Choose a reason for hiding this comment

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

If these need to be a fixed size, then you should be able to just specify the two dimensions and leave out the aspectRatio prop, saves a bit of calculations during the render pass.

@sarahscott
Copy link
Contributor Author

simulator screen shot may 6 2016 1 07 37 pm

justifyContent: 'space-around',
alignItems: 'stretch',
marginTop: 20,
marginLeft: -10,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll find a better way to do this here and elsewhere because I'm still trying to figure out the default side margins.

@sarahscott
Copy link
Contributor Author

🍏

artistContainer: {
flexWrap: 'wrap',
flexDirection: 'row',
justifyContent: 'space-around',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was very useful.

@sarahscott sarahscott force-pushed the sarah-related-artists branch from 3762ad6 to 64cb2ea Compare May 6, 2016 17:22
<ImageView style={{ height: imageWidth/1.5 }}
aspectRatio={1.5}
<View style={{paddingBottom: 30, width: imageWidth}}>
<ImageView style={{ width: imageWidth, height: imageWidth/imageAspectRatio }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I thought you had fixed dimensions, but I see now that this was a mistake on my part, as clearly you wanted it to be based on the view’s width. So using the aspectRatio prop would have made more sense then, as now you just need to repeat the native code we have in the image view… sorry about that. It’s not a blocker, we can just fix that up next time we go through this file.

@alloy
Copy link
Contributor

alloy commented May 6, 2016

Awesome 🎉

@alloy alloy merged commit 8e782bf into master May 6, 2016
@alloy alloy deleted the sarah-related-artists branch May 6, 2016 20:09
@orta
Copy link
Contributor

orta commented May 6, 2016

That Rob Pruitt looks like Artsy Test data

@alloy
Copy link
Contributor

alloy commented May 7, 2016

@sarahscott Can you check if what @orta said is true?

@sarahscott
Copy link
Contributor Author

It is indeed a Rob Pruitt work!

Puppies everywhere. Puppies on everything.

"Feels Like Love/Safe Place" by Rob Pruitt on Artsy
https://www.artsy.net/artwork/rob-pruitt-feels-like-love-slash-safe-place-1

@sarahscott
Copy link
Contributor Author

The puppy won't be so distorted after my image cropping PR.

@alloy
Copy link
Contributor

alloy commented May 9, 2016

Thanks for checking 👍

alloy added a commit that referenced this pull request Jun 6, 2016
[RelatedArtists] Added a RelatedArtists component
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants