{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/9208","repository_url":"https://api.github.com/repos/mozilla/pdf.js","labels_url":"https://api.github.com/repos/mozilla/pdf.js/issues/9208/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/9208/comments","events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/9208/events","html_url":"https://github.com/mozilla/pdf.js/pull/9208","id":277639829,"number":9208,"title":"Add scrolling modes to web viewer","user":{"login":"rhendric","id":1570964,"avatar_url":"https://avatars0.githubusercontent.com/u/1570964?v=4","gravatar_id":"","url":"https://api.github.com/users/rhendric","html_url":"https://github.com/rhendric","followers_url":"https://api.github.com/users/rhendric/followers","following_url":"https://api.github.com/users/rhendric/following{/other_user}","gists_url":"https://api.github.com/users/rhendric/gists{/gist_id}","starred_url":"https://api.github.com/users/rhendric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhendric/subscriptions","organizations_url":"https://api.github.com/users/rhendric/orgs","repos_url":"https://api.github.com/users/rhendric/repos","events_url":"https://api.github.com/users/rhendric/events{/privacy}","received_events_url":"https://api.github.com/users/rhendric/received_events","type":"User","site_admin":false},"labels":[{"id":164429,"url":"https://api.github.com/repos/mozilla/pdf.js/labels/1-viewer","name":"1-viewer","color":"DDDDDD","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":64,"created_at":"2017-11-29T06:05:52Z","updated_at":"2018-02-16T17:37:34Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/9208","html_url":"https://github.com/mozilla/pdf.js/pull/9208","diff_url":"https://github.com/mozilla/pdf.js/pull/9208.diff","patch_url":"https://github.com/mozilla/pdf.js/pull/9208.patch"},"body":"**Note: these screenshots are out of date, as are the descriptions, somewhat. See [this comment](https://github.com/mozilla/pdf.js/pull/9208#issuecomment-359899094) and [this comment](https://github.com/mozilla/pdf.js/pull/9208#issuecomment-362190512) for the new details.**\r\n\r\nIn addition to the default scrolling mode (vertical), this commit adds horizontal, grid, and grid+cover scrolling, implemented primarily with flexbox CSS.\r\n\r\nYou want some SHOTS???\r\n\r\nThe default: vertical scrolling. Yawn.\r\n![vertical scrolling](https://user-images.githubusercontent.com/1570964/33395115-80211898-d512-11e7-9f9b-901a94bcebd2.png)\r\n\r\nHorizontal scrolling! #2545, that's what's up!\r\n![horizontal scrolling](https://user-images.githubusercontent.com/1570964/33394768-65b0cb9e-d511-11e7-87ce-d6b363dcafbb.png)\r\n\r\nAnd I know my peeps down at #590 have been begging for that GRID SCROLLING!\r\n![grid scrolling, two pages wide](https://user-images.githubusercontent.com/1570964/33394810-88f09d78-d511-11e7-9be8-882631befa53.png)\r\n\r\nAs you can see, weirdly-sized pages are *not a problem* for the mighty flexbox!\r\n\r\nDid you want special cover page handling for your grid scrolling? I GOT YOU.\r\n![grid scrolling with cover page](https://user-images.githubusercontent.com/1570964/33394892-cee8fffa-d511-11e7-93f3-d29a50b80d97.png)\r\n\r\nBut why is it called grid scrolling instead of two-up or dual? Because depending on your zoom and your browser width, it could look like this!\r\n![grid scrolling, three pages wide](https://user-images.githubusercontent.com/1570964/33394931-ec1e56e2-d511-11e7-9326-043ed96525fb.png)\r\n\r\nDon't thank me, thank flexbox!\r\n\r\n---\r\n\r\nI manually tested this in Chrome and Firefox, with large and small PDF files, and made sure it doesn't interfere with presentation mode. I am all about adding those automated tests when submitting pull requests because that's how my momma raised me, but in this case I'm not sure what kind of test to add and/or how! If my reviewer has any ideas, I'm all ears.\r\n\r\n---\r\n\r\nCloses #590, closes #2545, opens the door to your heart."},"comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments/366305132","html_url":"https://github.com/mozilla/pdf.js/pull/9208#issuecomment-366305132","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/9208","id":366305132,"user":{"login":"rhendric","id":1570964,"avatar_url":"https://avatars0.githubusercontent.com/u/1570964?v=4","gravatar_id":"","url":"https://api.github.com/users/rhendric","html_url":"https://github.com/rhendric","followers_url":"https://api.github.com/users/rhendric/followers","following_url":"https://api.github.com/users/rhendric/following{/other_user}","gists_url":"https://api.github.com/users/rhendric/gists{/gist_id}","starred_url":"https://api.github.com/users/rhendric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhendric/subscriptions","organizations_url":"https://api.github.com/users/rhendric/orgs","repos_url":"https://api.github.com/users/rhendric/repos","events_url":"https://api.github.com/users/rhendric/events{/privacy}","received_events_url":"https://api.github.com/users/rhendric/received_events","type":"User","site_admin":false},"created_at":"2018-02-16T17:37:34Z","updated_at":"2018-02-16T17:37:34Z","author_association":"NONE","body":"@Rob--W:\r\n> About the test plan from [#9208 (comment)](/mozilla/pdf.js/pull/9208#issuecomment-366106788): I don't expect anything spectacular with the default PDF, where all pages have the same size. I think that the more interesting (edge) cases appear in documents with varying page sizes.\r\n\r\nThat's just the test plan for checking that the new CSS margins and such match the old, visually. Honestly, while I did test with the PDF with varying page sizes (see last step in the test plan), discrepancies were all visible in the default PDF until I got it right. The relevant dimensions are the spaces between page edges and scroll container edges, and the vertical space between pages, none of which are really affected by varying page sizes.\r\n\r\n> When I have a (vertically) narrow window, many pages of the default PDF file fit in wrapped mode. However, arrow left/right will sometimes still not have any effect (i.e. the scroll position doesn't change, while I somewhat expected the next row to become visible). What is the expected behavior? Would a visual highlight (e.g. a focus ring around a page) make sense here?\r\n\r\nI'll also direct you to [this comment](/mozilla/pdf.js/pull/9208#issuecomment-362822733)! The expected behavior is that you should see the page number advance one, at least (there was an earlier bug where sometimes even that wasn't happening, so if you don't see the page number advance, please flag), and then the page corresponding to that number should be fully visible, if possible. A focus ring is an interesting idea—I like it, but can that be deferred to a future iteration on this feature? I'd like to get the basics agreed on as quickly as possible."}}
{"actor":{"display_login":"rhendric"}}