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

Fix percentage-columns-layout #87

Merged

Conversation

raytiley
Copy link
Contributor

@raytiley raytiley commented Feb 1, 2016

Looks like a made a silly change that the tests didn't catch when first doing the percentage-columns-layout. This fixes that so the layout works properly. I also improved the tests so that it will catch it. The tests now check the top / left as well as the width property for the rendered items.

While I was in the code I changed a design decision that was bothering me. Instead of having to pass an array with the same number of items as the content to the layout, you just need to pass the number of items.

Finally I made the assert for the size of the columns more strict, since using a set of columns that were under 100 could cause the items to not fit into rows as desired. I fixed the tests that make sure we assert properly.

Looks like a made a silly change that the tests didn't catch when first doing the percentage-columns-layout. This fixes that so the layout works properly. I also improved the tests so that it will catch it. The tests now check the top / left as well as the width property for the rendered items.

While I was in the code I changed a design decision that was bothering me. Instead of having to pass an array with the same number of items as the content to the layout, you just need to pass the number of items.

Finally I made the assert for the size of the columns more strict, since using a set of columns that were under 100 could cause the items to not fit into rows as desired. I fixed the tests that make sure we assert properly.
@lukemelia
Copy link
Collaborator

LGTM

@nkgm
Copy link
Contributor

nkgm commented Feb 2, 2016

Does this fix the percentages demo?

krisselden added a commit that referenced this pull request Feb 2, 2016
@krisselden krisselden merged commit c0dec04 into adopted-ember-addons:master Feb 2, 2016
@nkgm
Copy link
Contributor

nkgm commented Feb 2, 2016

Yes it does 👍

Edit
Works for all except 33-33-33 variation

ember.debug.js:16316 Uncaught Error: Assertion Failed: All columns must total 100 99

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.

4 participants