-
Notifications
You must be signed in to change notification settings - Fork 78
[RelatedArtists] Added a RelatedArtists component #28
Conversation
sarahscott
commented
May 4, 2016
•
edited
Loading
edited
- RelatedArtist component
- Temporary horizontal RelatedArtists view (until a collection view can be used instead)
- Relay for all necessary information
} | ||
|
||
artworksString(artist) { | ||
const forSale = artist.counts.for_sale_artworks ? artist.counts.for_sale_artworks + ' for sale' : null |
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.
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.
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.
Seems like you really only need to pass in artist.counts
instead of the complete artist
.
0d89422
to
e7a93d4
Compare
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. |
You’re on 🔥 |
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. |
@sarahscott See how far you can get with just flexbox: artsy/eigen#1136 (comment) |
I'll give it a shot! |
aspectRatio={1.7} | ||
<View style={{ width: imageWidth }}> | ||
<ImageView style={{ height: imageWidth/1.5 }} | ||
aspectRatio={1.5} |
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.
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.
justifyContent: 'space-around', | ||
alignItems: 'stretch', | ||
marginTop: 20, | ||
marginLeft: -10, |
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.
I'll find a better way to do this here and elsewhere because I'm still trying to figure out the default side margins.
🍏 |
artistContainer: { | ||
flexWrap: 'wrap', | ||
flexDirection: 'row', | ||
justifyContent: 'space-around', |
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.
This was very useful.
…instead of aspectRatio prop
3762ad6
to
64cb2ea
Compare
<ImageView style={{ height: imageWidth/1.5 }} | ||
aspectRatio={1.5} | ||
<View style={{paddingBottom: 30, width: imageWidth}}> | ||
<ImageView style={{ width: imageWidth, height: imageWidth/imageAspectRatio }} |
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.
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.
That Rob Pruitt looks like Artsy Test data |
@sarahscott Can you check if what @orta said is true? |
It is indeed a Rob Pruitt work! Puppies everywhere. Puppies on everything. "Feels Like Love/Safe Place" by Rob Pruitt on Artsy |
The puppy won't be so distorted after my image cropping PR. |
Thanks for checking 👍 |
[RelatedArtists] Added a RelatedArtists component