Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic columns as a function prop #124

Merged
merged 3 commits into from
Dec 31, 2018

Conversation

levibuzolic
Copy link
Contributor

@levibuzolic levibuzolic commented Dec 30, 2018

Quick feature request, this makes it much easier/quicker to provide dynamic column counts without needing to measure the container in user-code. I think this is a nice interface and feels appropriate given react-photo-gallery is already doing the measurement.

I've bumped the minor version to indicate new functionality which should be non-breaking.

@levibuzolic levibuzolic force-pushed the columns-function branch 2 times, most recently from bf8e878 to 44b7177 Compare December 30, 2018 10:32
@coveralls
Copy link

coveralls commented Dec 30, 2018

Coverage Status

Coverage increased (+0.2%) to 91.391% when pulling a37ef73 on levibuzolic:columns-function into dfeff66 on neptunian:master.

@levibuzolic
Copy link
Contributor Author

Also removed the package-lock.json which is long long out-of-date and it seems the yarn.lock is more recent.

Ideally projects should use either a yarn.lock or a package-lock.json not both -- as it leads to package inconsistencies.

For example if you currently try and npm install you'll end up with vastly different dependencies, resulting in tests failing.

<Gallery photos={photos} onClick={handleClick} direction={'column'}/>
);
wrapper.setState({containerWidth: '1139'})
wrapper.setState({containerWidth: 1139})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed these setStates were setting the width as a string, which doesn't seem correct, so i've updated them.

@neptunian
Copy link
Owner

neptunian commented Dec 30, 2018

Great idea! I was thinking instead of creating a new Code Sandbox example we can just adjust this already existing one to stop using the Measure component: https://codesandbox.io/s/ll7ym48027 . I can change it after it's published.

@levibuzolic
Copy link
Contributor Author

@neptunian code sandbox examples removed, thanks! 👍

@neptunian neptunian merged commit a37ef73 into neptunian:master Dec 31, 2018
@levibuzolic levibuzolic deleted the columns-function branch January 1, 2019 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants