{"action":"created","issue":{"url":"https://api.github.com/repos/Instagram/IGListKit/issues/1248","repository_url":"https://api.github.com/repos/Instagram/IGListKit","labels_url":"https://api.github.com/repos/Instagram/IGListKit/issues/1248/labels{/name}","comments_url":"https://api.github.com/repos/Instagram/IGListKit/issues/1248/comments","events_url":"https://api.github.com/repos/Instagram/IGListKit/issues/1248/events","html_url":"https://github.com/Instagram/IGListKit/issues/1248","id":356191279,"node_id":"MDU6SXNzdWUzNTYxOTEyNzk=","number":1248,"title":"bindViewModel has wrong cellSize","user":{"login":"maxiundtesa","id":17526240,"node_id":"MDQ6VXNlcjE3NTI2MjQw","avatar_url":"https://avatars2.githubusercontent.com/u/17526240?v=4","gravatar_id":"","url":"https://api.github.com/users/maxiundtesa","html_url":"https://github.com/maxiundtesa","followers_url":"https://api.github.com/users/maxiundtesa/followers","following_url":"https://api.github.com/users/maxiundtesa/following{/other_user}","gists_url":"https://api.github.com/users/maxiundtesa/gists{/gist_id}","starred_url":"https://api.github.com/users/maxiundtesa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxiundtesa/subscriptions","organizations_url":"https://api.github.com/users/maxiundtesa/orgs","repos_url":"https://api.github.com/users/maxiundtesa/repos","events_url":"https://api.github.com/users/maxiundtesa/events{/privacy}","received_events_url":"https://api.github.com/users/maxiundtesa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-01T10:20:13Z","updated_at":"2018-09-13T16:09:23Z","closed_at":null,"author_association":"NONE","body":"### General information\r\n\r\n- `IGListKit` version: 3.4.0\r\n- iOS version(s): 11.4\r\n- Xcode version: 9.4.1\r\n- Reproducible in the demo project?: Yes\r\n\r\nHello,\r\nI think I found a bug: If you call `contentView.frame.size` inside your `bindViewModel` method, it returns the size of the xib (in storyboard), not the size of the cell, which was specified in the `sectionController(_ sectionController: ListBindingSectionController<ListDiffable>, sizeForViewModel viewModel: Any, at index: Int)`.\r\nThis bug also occurs in the `IGListKit-Binding-Guide` example project.\r\n\r\nThe cell still has the right size (from `sizeForViewModel`), but I’m creating a MKSnapshotter inside `bindViewModel`, which unfortunately uses the wrong size of the contentView.\r\n\r\nIn my project, the bug only occurs when the cell is loaded for the first time. After that, `contentView.frame.size` returns the correct size."},"comment":{"url":"https://api.github.com/repos/Instagram/IGListKit/issues/comments/421062805","html_url":"https://github.com/Instagram/IGListKit/issues/1248#issuecomment-421062805","issue_url":"https://api.github.com/repos/Instagram/IGListKit/issues/1248","id":421062805,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTA2MjgwNQ==","user":{"login":"rnystrom","id":739696,"node_id":"MDQ6VXNlcjczOTY5Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/739696?v=4","gravatar_id":"","url":"https://api.github.com/users/rnystrom","html_url":"https://github.com/rnystrom","followers_url":"https://api.github.com/users/rnystrom/followers","following_url":"https://api.github.com/users/rnystrom/following{/other_user}","gists_url":"https://api.github.com/users/rnystrom/gists{/gist_id}","starred_url":"https://api.github.com/users/rnystrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnystrom/subscriptions","organizations_url":"https://api.github.com/users/rnystrom/orgs","repos_url":"https://api.github.com/users/rnystrom/repos","events_url":"https://api.github.com/users/rnystrom/events{/privacy}","received_events_url":"https://api.github.com/users/rnystrom/received_events","type":"User","site_admin":false},"created_at":"2018-09-13T16:09:23Z","updated_at":"2018-09-13T16:09:23Z","author_association":"MEMBER","body":"This is probably an issue with how XIBs work. We don’t use them at all in Instagram so I’m not surprised this hasn’t come up. \n\nCan you repro the issue in an example app or better-yet unit test?\n\nI won’t be able to work on a fix for this, but I’d gladly accept a PR!\n\n<sub>Sent with <a href=\"http://githawk.com\">GitHawk</a></sub>"}}
{"actor":{"display_login":"rnystrom"}}