{"action":"created","issue":{"url":"https://api.github.com/repos/jasonmit/virtual-each/issues/7","labels_url":"https://api.github.com/repos/jasonmit/virtual-each/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/jasonmit/virtual-each/issues/7/comments","events_url":"https://api.github.com/repos/jasonmit/virtual-each/issues/7/events","html_url":"https://github.com/jasonmit/virtual-each/pull/7","id":114351612,"number":7,"title":"Fix positioning scroll persistance","user":{"login":"flexyford","id":8826403,"avatar_url":"https://avatars.githubusercontent.com/u/8826403?v=3","gravatar_id":"","url":"https://api.github.com/users/flexyford","html_url":"https://github.com/flexyford","followers_url":"https://api.github.com/users/flexyford/followers","following_url":"https://api.github.com/users/flexyford/following{/other_user}","gists_url":"https://api.github.com/users/flexyford/gists{/gist_id}","starred_url":"https://api.github.com/users/flexyford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flexyford/subscriptions","organizations_url":"https://api.github.com/users/flexyford/orgs","repos_url":"https://api.github.com/users/flexyford/repos","events_url":"https://api.github.com/users/flexyford/events{/privacy}","received_events_url":"https://api.github.com/users/flexyford/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-30T20:37:22Z","updated_at":"2015-11-02T19:34:32Z","closed_at":"2015-11-02T08:41:45Z","pull_request":{"url":"https://api.github.com/repos/jasonmit/virtual-each/pulls/7","html_url":"https://github.com/jasonmit/virtual-each/pull/7","diff_url":"https://github.com/jasonmit/virtual-each/pull/7.diff","patch_url":"https://github.com/jasonmit/virtual-each/pull/7.patch"},"body":"Add integration testing (previously unit tests)\r\n\r\nThese tests exercise standard functionality and I have added tests and fixes for use-cases which I found were broken. \r\n\r\nI was unable to update the list when using jquery scroll events, however, I was able to mock scrolling by setting the positionIndex. **Need to open an issue for scrolling in the integration tests!**\r\n\r\nAdded tests and fixed the following:\r\n\r\n> Fix Test: Setting a position index past the maximum top index should place the last visible item flush with the bottom of the visibleContent. Previously, it set the maximum top visible item was set flush with the top of the visible content, which could leave the final item cut-off depending on the `height` of the `virtual-each` and the `itemHeight`\r\n\r\nMy team and I are implementing [ember-impagination - README Pending] (https://github.com/thefrontside/ember-impagination) which is an infinite-scroll component. This implementation will continually update the immutable `items` array, which will fire the `didReceiveAttrs` hook. Therefore, we need to persists the positionIndex if the items are updated\r\n\r\n > Fix Test: persist position index if `items` array is updated"},"comment":{"url":"https://api.github.com/repos/jasonmit/virtual-each/issues/comments/153134110","html_url":"https://github.com/jasonmit/virtual-each/pull/7#issuecomment-153134110","issue_url":"https://api.github.com/repos/jasonmit/virtual-each/issues/7","id":153134110,"user":{"login":"jasonmit","id":3108309,"avatar_url":"https://avatars.githubusercontent.com/u/3108309?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonmit","html_url":"https://github.com/jasonmit","followers_url":"https://api.github.com/users/jasonmit/followers","following_url":"https://api.github.com/users/jasonmit/following{/other_user}","gists_url":"https://api.github.com/users/jasonmit/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmit/subscriptions","organizations_url":"https://api.github.com/users/jasonmit/orgs","repos_url":"https://api.github.com/users/jasonmit/repos","events_url":"https://api.github.com/users/jasonmit/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmit/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T19:34:32Z","updated_at":"2015-11-02T19:34:32Z","body":"@flexyford I don't really like the idea of a attribute to drive reset behavior.\r\n\r\nInstead, we should be able to hook into the didReceiveAttrs to know what the user switched the position index back to 0.  In order for this to all work, we may need to implement position index as internal state and action for `positionIndexChanged`.  This would make this flow subscribe to DDAU."}}