{"action":"created","issue":{"url":"https://api.github.com/repos/drewolson/scrivener/issues/8","labels_url":"https://api.github.com/repos/drewolson/scrivener/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/drewolson/scrivener/issues/8/comments","events_url":"https://api.github.com/repos/drewolson/scrivener/issues/8/events","html_url":"https://github.com/drewolson/scrivener/pull/8","id":94215574,"number":8,"title":"Start on making link pagination easier for the view layer. Needs tests.","user":{"login":"mgwidmann","id":5035724,"avatar_url":"https://avatars.githubusercontent.com/u/5035724?v=3","gravatar_id":"","url":"https://api.github.com/users/mgwidmann","html_url":"https://github.com/mgwidmann","followers_url":"https://api.github.com/users/mgwidmann/followers","following_url":"https://api.github.com/users/mgwidmann/following{/other_user}","gists_url":"https://api.github.com/users/mgwidmann/gists{/gist_id}","starred_url":"https://api.github.com/users/mgwidmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgwidmann/subscriptions","organizations_url":"https://api.github.com/users/mgwidmann/orgs","repos_url":"https://api.github.com/users/mgwidmann/repos","events_url":"https://api.github.com/users/mgwidmann/events{/privacy}","received_events_url":"https://api.github.com/users/mgwidmann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-10T05:15:15Z","updated_at":"2015-07-10T12:49:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/drewolson/scrivener/pulls/8","html_url":"https://github.com/drewolson/scrivener/pull/8","diff_url":"https://github.com/drewolson/scrivener/pull/8.diff","patch_url":"https://github.com/drewolson/scrivener/pull/8.patch"},"body":"After seeing an elixir-sips episode using this tool, I thought it was a shame that it didn't have a simpler tool for printing the view layer.\r\n\r\nI've still got a bit more work to do on it, but I wanted to get it out there and see what your thoughts were on what I started.\r\n\r\n@knewter :+1: "},"comment":{"url":"https://api.github.com/repos/drewolson/scrivener/issues/comments/120402088","html_url":"https://github.com/drewolson/scrivener/pull/8#issuecomment-120402088","issue_url":"https://api.github.com/repos/drewolson/scrivener/issues/8","id":120402088,"user":{"login":"drewolson","id":3536,"avatar_url":"https://avatars.githubusercontent.com/u/3536?v=3","gravatar_id":"","url":"https://api.github.com/users/drewolson","html_url":"https://github.com/drewolson","followers_url":"https://api.github.com/users/drewolson/followers","following_url":"https://api.github.com/users/drewolson/following{/other_user}","gists_url":"https://api.github.com/users/drewolson/gists{/gist_id}","starred_url":"https://api.github.com/users/drewolson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewolson/subscriptions","organizations_url":"https://api.github.com/users/drewolson/orgs","repos_url":"https://api.github.com/users/drewolson/repos","events_url":"https://api.github.com/users/drewolson/events{/privacy}","received_events_url":"https://api.github.com/users/drewolson/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T12:49:13Z","updated_at":"2015-07-10T12:49:13Z","body":"Thanks for this, I thought the same thing when I saw the video. A few thoughts.\r\n\r\n* I think we should put it in the module `Scrivener.HTML` to be consistent with phoenix\r\n* I'd prefer the function be called `pagination_links`\r\n* While your code[1] works in the naive case, users may need to pass other options when generating the link other than just the page number.\r\n* We may want to think about an API closer to Scrivener itself. Perhaps you'd mix this into your view\r\n\r\n```elixir\r\ndefmodule MyApp.View do\r\n  use Scrivener.HTML, # options go here, like window size, etc\r\nend\r\n```\r\n\r\nThis would generate a `pagination_links` function on your view module that would be accessible from templates.\r\n\r\nFinally, if this goes well I'll probably eventually pull it out to a separate package `scrivener_html`, again for consistency with phoenix.\r\n\r\nThoughts?\r\n\r\n[1] - https://github.com/drewolson/scrivener/pull/8/files#diff-8b9bf4af357da1cb11dacde83dc1ede2R25"}}