Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Sandra
    @neptunian
    for example they want to use it as a sort of collage of images
    Stephan Meijer
    @smeijer
    Hmm.. Not really seeing what the amount of images has to do with it?
    Sandra
    @neptunian
    because the browser if it is has srcset and sizes will only load little ones if its directed to do so
    wehreas if it has to load 100 images that are probably going to be much higher res than necessary that's quite a bit more bandwidth
    Stephan Meijer
    @smeijer
    Aaah, I get it.
    Sandra
    @neptunian
    like if they wanted a 10 column gallery.. for a collage type affect
    but i do think we have the same goal functionality wise.. i'm sold on the idea of giving the user most of the control by making the gallery as simple as possible but super flexible.
    Sandra
    @neptunian
    i love all of the changes and refactor, its much better code than mine.. its really just the image srcset and sizes i'm worried about.
    Stephan Meijer
    @smeijer
    Yes. I understand. The image and the extra renders / flickering should be fixed before you can go further with something like my branch.
    I think I would have decided the same in your case.
    Sandra
    @neptunian
    so you think i should fix it like i'm doing and then manually implement whatever changes i want from your branch?
    Sandra
    @neptunian
    okay i think i'm all done! @smeijer last commit was for a select demo which looks quite nice: https://github.com/neptunian/react-photo-gallery/pull/63/commits/5d256714047abcc1ef1cd65efdcb0d9ab8c45902
    for some reason modifying a photo prop wasnt triggering the gallery to render but adding shouldComponentUpdate with return true seemed to work... no idea why
    all the commits: neptunian/react-photo-gallery#63
    i plan to put better examples and docs but want to get it out now
    Sandra
    @neptunian
    for now this new demo page will have to do http://neptunian.github.io/react-photo-gallery/
    i think this same idea for a custom image component needs to be implemented in react-images
    jossmac/react-images#54
    Arash D
    @ArashDai
    hi which version of react-photo-gallery should i use for compatibility with react 15.3.1 ?
    i checked npm and github but there is o information about what previous versions used to exist
    Arash D
    @ArashDai
    nevermind i found it in the old git commits
    Alex Luna
    @Luna2442
    Hey all, new to this room. I have a hopefully simply question. Anyway to assign a key to the children <Gallery /> produces?
    Sandra
    @neptunian
    each image component should have a key @Luna2442
    Michelangelo Partipilo
    @mpartipilo
    It seems that the Lightbox is always using 100vw as the sizes attribute. I'm looking into this.
    Sandra
    @neptunian
    @mpartipilo shouldn't that be desirable?
    a lightbox usually always takes up as much screen space as it can and is positioned as such
    i supposed the caption and close button take up some vertical width
    Michelangelo Partipilo
    @mpartipilo
    Yes, I am just learning this responsive image thing. I was trying to use a different file for smaller devices and found that it was always using the highes res one. Not sure if it's for cache reasons.
    Will look into it
    Sandra
    @neptunian
    @mpartipilo that actually has nothing to do with 100vw. 100vw is just saying image is taking up 100% of the space available which it will no matter what device size is
    you would need to pass in a list of images into srcSet if you different files for different device sizes
    Michelangelo Partipilo
    @mpartipilo
    Cool, thanks
    Sandra
    @neptunian
    used react-sortable-hoc to make the gallery sortable (no changes to the library). check it out: https://codesandbox.io/s/8y7n1r9y5j
    drag and drop images to see it in action
    Sandra
    @neptunian
    @smeijer one of the benefits of not having having the images in row elementes I think!
    Stephan Meijer
    @smeijer
    possibly @neptunian , the demo looks awesome :)
    Zoltan Paricsi
    @pzoli1988
    hi, is it possible to change the layout of Gallery?
    Sandra
    @neptunian
    @pzoli1988 what do you have in mind
    the only thing that can change really are the amount of columns.
    Michelangelo Partipilo
    @mpartipilo
    @neptunian When resizing that sortable example in codesadbox.io I got this: Invariant Violation
    Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
    Sandra
    @neptunian
    @mpartipilo thanks i'll do some testing. i've thought about putting a debounce on the window resize but i like how it looks like its animating when you resize it! not really necessary to let it call so many times though.
    Ibrahima Toure
    @FredEb
    Hello guys, wanted to ask if there was any way I could pass in the aspect ratio for the set of photos given to the Gallery component
    Michelangelo Partipilo
    @mpartipilo
    @FredEb that's what width and height are for
    whitneyseiler
    @whitneyseiler
    Hey all - does anyone have tips for limiting the maximum height of the Gallery container?
    Sandra
    @neptunian
    @FredEb that's all height and width attributes are provided for. the code determines the aspect ratio based on those attributes or you can just pass in 1, 3 or whatever your ratio is... it's the same thing.
    @whitneyseiler you should be able to just do that with CSS? Wrap it in a containing div with a max-height?
    Sebastián Lorenzo
    @slorenzo
    Hi @neptunian, how are you?
    I have worked on your code to add just one feature: thumbnails. But when I was doing it, I realize that I could improve many more things like the tests behaviors.
    I created a PR with this features/improvements.
    Sebastián Lorenzo
    @slorenzo
    neptunian/react-photo-gallery#85