-
Notifications
You must be signed in to change notification settings - Fork 64
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
feat: use exponential increase for srcset widths #224
Conversation
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.
Huh, I thought this change landed months ago! I must have gotten it confused with changes to Ember.
Looks good to me. Will look again once the tests land.
@jayeb seems like the tests have passed - is this good to go? |
Ah, I saw something about tests in the description and assumed there would be tests coming to cover the new behavior. Could we get some? |
Similar to the comment over on imgix.js (imgix/imgix.js#130), not sure what tests I can add which don't over-specify on the implementation. |
…om/imgix/react-imgix into fred/use-exponential-srcset-widths * 'fred/use-exponential-srcset-widths' of https://github.com/imgix/react-imgix: chore(deps): update dependency webpack to v4.26.0 (#226) chore(deps): update react monorepo to v16.6.3 (#223) chore(deps): update dependency prettier to v1.15.2 (#222)
Hey @jayeb I've added some more tests as discussed offline - can you have a look? |
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.
Great tests, thank you.
Description
This PR updates the srcset width-generation logic. The widths now grow exponentially, rather than by a fixed amount. This means that the dimensions of a rendered image are at most 8% from the "pixel-perfect" dimensions.
Fixes #227
Steps to test
Ensure that tests still pass.