Closed ashleyjelks closed 4 years ago
Very cool! This is just what I had in mind.
One thing that would make this really great is a unit test. Here is an example of how you can mock things in the
react-native
module (likeDimensions
in this case) and here is an example of how to test that a query variable is passed through. I wouldn't say that the unit test is necessary before merging, since the code isn't too complex, but the latter is an example of using Relay's new Test Utils, which we're trying to standardize on, so it could be useful as practice.
I think this is a great idea! I'll make a ticket to track the work.
:rocket: PR was released in v1.21.7 :rocket:
Follow up to #2032.
Instead of resizing the artworks images based on a static width of 500 px, this PR adds a variable to the Featured Artists Collections relay query to resize images based on the screen width.