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

Reader: use react-masonry-component for StartCards #5944

Merged
merged 4 commits into from
Jun 10, 2016

Conversation

TooTallNate
Copy link
Contributor

@TooTallNate TooTallNate commented Jun 9, 2016

Uses Masonry for layout in Cold Start (see https://github.com/eiriklv/react-masonry-component).

This renders the StartCards from left to right, rather then top to bottom via columns.

Example:

screen shot 2016-06-09 at 1 13 20 pm

(Note that "TechnoScience as if People Mattered" is the 2nd entry in the DOM list, and is being rendered to the right of the first StartCard, as expected).

This is expected to make the interaction of loading more recs (#5652) be more pleasant.

/cc @jancavan @bluefuton

Test live: https://calypso.live/?branch=add/reacy-masonry-component

Uses Masonry for layout in Cold Start.

This renders the StartCards from left to right,
rather then top to bottom via columns.
@TooTallNate TooTallNate added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature] Reader The reader site on Calypso. labels Jun 9, 2016
@jancavan
Copy link
Contributor

jancavan commented Jun 9, 2016

This is awesome Nate! 👏

Added a small update here: 949a989, just made margin around cards equal.

@jancavan
Copy link
Contributor

jancavan commented Jun 9, 2016

Fixed a breakpoint issue in: df6faa4

@TooTallNate it seems like the gap between columns stays the same regardless of the size of the cards - even with the original width of 350px. Is there a way to make the gap between columns same size as the gap above cards?

Should be around 14px.

screenshot 2016-06-09 14 21 20

@mtias
Copy link
Member

mtias commented Jun 10, 2016

@jancavan @TooTallNate can't we achieve this just with flexbox these days (with flex-wrap)? I found this link with a quick search.

@mtias mtias added the [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR label Jun 10, 2016
@bluefuton
Copy link
Contributor

The cards don't appear in exact source order (e.g. the final card is on the bottom left for me), but should be close enough to vastly improve the loading experience for new cards 👍

@bluefuton
Copy link
Contributor

bluefuton commented Jun 10, 2016

can't we achieve this just with flexbox these days (with flex-wrap)?

@jancavan has experimented with Flexbox and Columns, and ultimately we've not found a solid solution (yet) that offers:

  • variable height cards
  • variable number of cards (so hard to set fixed height on container)
  • cards flowing horizontally in HTML source order

Horizontal flow seems to be the trickiest part.

@bluefuton
Copy link
Contributor

Looks good to me 🚢

@bluefuton bluefuton added [Status] Ready to Merge and removed [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jun 10, 2016
@bluefuton bluefuton merged commit 3834e81 into master Jun 10, 2016
@bluefuton bluefuton deleted the add/reacy-masonry-component branch June 10, 2016 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Reader The reader site on Calypso.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants