brh55 / react-native-masonry

:raised_hands: A pure JS react-native component to render a masonry~ish layout for images with support for dynamic columns, progressive image loading, device rotation, on-press handlers, and headers/captions.
MIT License
1.32k stars 157 forks source link

name is misleading this is for images only #110

Open ConnectedReasoning opened 5 years ago

ConnectedReasoning commented 5 years ago

Expected Behavior

It should allow for general content

Current Behavior

renders only images

Possible Solution

allow other html components to be displayed as bricks, change name to reflect the narrow image only scope of component.

Steps to Reproduce

replace images in bricks with other kinds of react components, like Text

Context (Environment)

Detailed Description

Possible Implementation

brh55 commented 5 years ago

Excellent point. This really spawned from the limitations of managing images when trying to use flexbox to create a typical masonry layout due to the fact that you need dimensions prior to perform resizing.

With other elements such as text and views, a masonry layout is pretty easy to accomplish with just the use of flexbox and standard column layouts i.e.: [row flex: [column 1][column2] ])

It's possible to expand the scope to other elements, however, some sort ordering will behave oddly due to the async nature, i.e: text will render first in the list no matter what. We just need to discuss the expectations of these behaviors and we should be able to implement it.

bartzy commented 4 years ago

@brh55 How is masonry layout with more than one column easy to accomplish with just using flexbox?