{"action":"created","issue":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/3161","repository_url":"https://api.github.com/repos/cfpb/cfgov-refresh","labels_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/3161/labels{/name}","comments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/3161/comments","events_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/3161/events","html_url":"https://github.com/cfpb/cfgov-refresh/pull/3161","id":244747512,"number":3161,"title":"Fix for square image within the image inset","user":{"login":"sebworks","id":1696212,"avatar_url":"https://avatars0.githubusercontent.com/u/1696212?v=4","gravatar_id":"","url":"https://api.github.com/users/sebworks","html_url":"https://github.com/sebworks","followers_url":"https://api.github.com/users/sebworks/followers","following_url":"https://api.github.com/users/sebworks/following{/other_user}","gists_url":"https://api.github.com/users/sebworks/gists{/gist_id}","starred_url":"https://api.github.com/users/sebworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebworks/subscriptions","organizations_url":"https://api.github.com/users/sebworks/orgs","repos_url":"https://api.github.com/users/sebworks/repos","events_url":"https://api.github.com/users/sebworks/events{/privacy}","received_events_url":"https://api.github.com/users/sebworks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-21T18:25:42Z","updated_at":"2017-07-24T22:15:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/3161","html_url":"https://github.com/cfpb/cfgov-refresh/pull/3161","diff_url":"https://github.com/cfpb/cfgov-refresh/pull/3161.diff","patch_url":"https://github.com/cfpb/cfgov-refresh/pull/3161.patch"},"body":"Fix for square image inset \r\nGHE/1002\r\n\r\n## Changes\r\n\r\n- Modified `cfgov/jinja2/v1/_includes/molecules/image-inset.html` to use call method on `CFGOVRendition` model.\r\n\r\n- Modified `cfgov/v1/models/images.py` to add orientation method and properties.\r\n\r\n## Testing\r\n\r\nSquare Image\r\n1. Add an image inset to a page.\r\n2. Upload a square image and verify, using Chrome dev tools, that the image has the `__square` modifier.\r\n3. Resize browse to mobile width and verify that the padding bottom is 100%;\r\n4. Verify that the image isn't being cropped.\r\n\r\nLandscape Image\r\n1. Add an image inset to a page.\r\n2. Upload a landscape image and verify, using Chrome dev tools, that the image has the `__landscape` modifier.\r\n3. Resize browse to mobile width and verify that the padding bottom is 56%;\r\n\r\nPortrait Image\r\n1. Add an image inset to a page.\r\n2. Upload a portrait image and verify, using Chrome dev tools, that the image has the `__portrait` modifier.\r\n3. Resize browse to mobile width and verify that the padding bottom is 75%;\r\n\r\n## Screenshots\r\n\r\n\r\n## Notes\r\n\r\n- I'll write tests for this if people are ok with the approach.\r\n\r\n## Todos\r\n\r\n-\r\n\r\n## Checklist\r\n\r\n* [ ] PR has an informative and human-readable title\r\n* [ ] Changes are limited to a single goal (no scope creep)\r\n* [ ] Code can be automatically merged (no conflicts)\r\n* [ ] Code follows the standards laid out in the [development playbook](https://github.com/cfpb/development)\r\n* [ ] Passes all existing automated tests\r\n* [ ] New functions include new tests\r\n* [ ] New functions are documented (with a description, list of inputs, and expected output)\r\n* [ ] Placeholder code is flagged\r\n* [ ] Visually tested in supported browsers and devices\r\n* [ ] Project documentation has been updated\r\n* [ ] Reviewers requested with the [Assignee tool](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) :arrow_right:\r\n"},"comment":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/comments/317570626","html_url":"https://github.com/cfpb/cfgov-refresh/pull/3161#issuecomment-317570626","issue_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/3161","id":317570626,"user":{"login":"Scotchester","id":1044670,"avatar_url":"https://avatars3.githubusercontent.com/u/1044670?v=4","gravatar_id":"","url":"https://api.github.com/users/Scotchester","html_url":"https://github.com/Scotchester","followers_url":"https://api.github.com/users/Scotchester/followers","following_url":"https://api.github.com/users/Scotchester/following{/other_user}","gists_url":"https://api.github.com/users/Scotchester/gists{/gist_id}","starred_url":"https://api.github.com/users/Scotchester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Scotchester/subscriptions","organizations_url":"https://api.github.com/users/Scotchester/orgs","repos_url":"https://api.github.com/users/Scotchester/repos","events_url":"https://api.github.com/users/Scotchester/events{/privacy}","received_events_url":"https://api.github.com/users/Scotchester/received_events","type":"User","site_admin":false},"created_at":"2017-07-24T22:15:11Z","updated_at":"2017-07-24T22:15:11Z","body":"I like this solution a lot! I'd like to have a back-end dev weigh in on it, though, just to make sure they don't think it's ill-advised. I think @chosak has done the most with image renditions."}}
{"actor":{"display_login":"Scotchester"}}