Open stretch1414 opened 6 years ago
This actually might be irrelevant because of #110
What if we have two image components, Image
and Thumbnail
. Thumbnail
will always produce smaller images, and handle the image stacking (for collection thumbs, etc) while Image
is used for individual image viewing and handle the srcSet/sizes attributes.
It makes sense to me to split these in two.
That makes sense to me as well. Would we have a wrapper component that decides which of the two we get? Or would they just pass the URL around if we needed to switch from a Thumbnail to an Image, and vice versa?
I see Thumbnail and Image as simple components, and whatever is using them decides when to use which. So like the modal component requests the image for the view activations and thumbnails elsewhere.
The Thumbnail component should know when to show an image "Stack" and when to just show the primary photo.
Oh okay, sounds good to me.
Yeah it's becoming more clear that a Thumbnail
is distinct from a DisplayImage
or Image
or whatever. Sounds like a sensible change.
My thoughts are that, on a thumbnailable image, we could always return a 100x100 image for quick loading, but then kick off a fetch to ImageService with passed in dimensions that would load after a time. React's state reloading makes this dead simple.