Juicy / juicy-tile-grid

Masonry-like Custom Element for sortable tiles that packs efficiently without changing HTML structure (changes CSS only), and adapts it to CSS Grid Layout. Extended renderer for juicy-tile-list.
http://juicy.github.io/juicy-tile-grid/
MIT License
8 stars 1 forks source link

Invalid dynamic height calculation #17

Closed miyconst closed 9 years ago

miyconst commented 9 years ago

People application, /people/persons/add page.

This is how it looks when email/address/phone is added by button: image

And this is how it looks when they already exists: image

cc @tomalec

tomalec commented 9 years ago

For sure you can solve it by setting some initial value for height, like height: 1 for tile that should grow dynamically.

tomalec commented 9 years ago

I'm not sure what should be desired solution. As in your setup, you make addresses list tile height to be pre-calculated, what in this case resolves to 0.

So the question is where should we put, and how to layout tile with size 0. (https://github.com/Juicy/juicy-tile-grid/issues/18).

Currently, I would say, it was put in correct position. After packing all items with higher priority, the first free space to pack 100% x 0 tile is exactly bellow "Addresses". Then as (due to 0 height) it didn't shrink the free space, next tile was packed to the same spot.

tomalec commented 9 years ago

@miyconst Can we close it, as it occurred to be a result of tile size 0 been packed, and miscalculation of precalculateHeight (as it is done before some content is loaded asynchronously)?

miyconst commented 9 years ago

Yes.