-
Notifications
You must be signed in to change notification settings - Fork 1
Data card #71
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
Data card #71
Conversation
|
This looks brilliant, thank you @sgroi-l ! My only question is about how the layout is determined in the masonry layout (e.g. on
EDIT: I was so busy looking at the bottom I missed that the cards aren't aligned at the top!
(this is in Safari, btw - it's aligned in Chrome) |
|
Hi @robredpath Good spot on the misalignment in Safari, I missed that in cross browser testing. The latest commit should have fixed that issue. I've added some documentation at Depending on the exact order of the cards this can sometimes lead to a final column that looks like it is missing a card. The cards themselves can be reordered in the template by just moving them around in the masonry container to achieve an optimal layout, as shown in the screenshot below.
|
|
Thanks for all of this, @sgroi-l - this is great. I've approved it because it's fundamentally fine, but I do want to make sure that we understand how to control this. In the cases where I'm envisaging us using this, there will be a fairly clear order of precedence in terms of the cards that we want people to see first - either above the fold or first as they scroll down. Therefore, I want to make sure that we understand how to control that. As I understand it, the default is that something that's at the top of the second column in four-column layout may be at the bottom of the first column in a three-column layout. That's fine in some cases, but where there are (for example) six items that it's important that people see first, I want to make sure that they're at the top regardless of the number of columns. Is it possible to make the card ordering go left-to-right rather than top-to-bottom? Or, are we able to configure which cards are shown in which column in each of the 2/3/4 column layout? Or, do we need to split cards up in those cases and have multiple masonries (if that's a word!) per page? |
codemacabre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned on our call @sgroi-l, this is an awesome custom masonry layout before the official CSS spec is mainstream, and it certainly seems robust (at least in the four browsers I've tested it in). Thank you for providing documentation too, this will really help with future implementations. We just need to add a little documentation on the data cards themselves, but that'll come later as we put them into use. Approved!
|
(rebased via GH UI) |
|
🎉 This PR is included in version 4.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |



What's New
stats, charts, and buttons
Chart.js installed with npm