MemePlace / Frontend

Frontend Repo
3 stars 0 forks source link

Meme Layout Algorithm #30

Closed Step7750 closed 6 years ago

Step7750 commented 6 years ago

Currently, the layout just fixes memes by a given height and fills them onto the page.

This can cause issues such as in image

where there are gaps at the end of the row that don't fit the next meme.

Since the order that the images appear in is important, we can't use a partition algorithm that may present confusing and differing results to the user.

There are a couple approaches that can be taken to reduce this by effectively scaling the height of each row based upon the contents to ensure it fits perfectly.

We can solve for the height of a row if we know the total width. In order to know how many images we should put on a given row, we can add images until the row goes below a given threshold height.

You can find more details here: http://blog.vjeux.com/2012/image/image-layout-algorithm-google-plus.html

Continuing article: http://blog.vjeux.com/2014/image/google-plus-layout-find-best-breaks.html

Step7750 commented 6 years ago

Some progress on this issue on the feature/browse-layout-algo branch: image

xiningchen commented 6 years ago

Lol, I think it's great! I do notice a tiny little thing but I don't think we should worry about it~ :D

Step7750 commented 6 years ago

Yeah, it's hard to get the far right stuff to align due to differing widths beyond my control.

xiningchen commented 6 years ago

I think it's good enough~ :P

bandgeekdante commented 6 years ago

Is this feature good to go?

Step7750 commented 6 years ago

No, it needs tweaking. It probably won't be done by tomorrow.

Step7750 commented 6 years ago

Closed in #87