{"action":"created","issue":{"url":"https://api.github.com/repos/hypothesis/client/issues/176","repository_url":"https://api.github.com/repos/hypothesis/client","labels_url":"https://api.github.com/repos/hypothesis/client/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/hypothesis/client/issues/176/comments","events_url":"https://api.github.com/repos/hypothesis/client/issues/176/events","html_url":"https://github.com/hypothesis/client/issues/176","id":193488935,"number":176,"title":"Annotations can initially appear in the wrong tab in long PDFs when orphans tab is enabled","user":{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false},"assignees":[{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-12-05T12:51:35Z","updated_at":"2016-12-19T18:00:37Z","closed_at":null,"body":"**Steps to reproduce**\r\n\r\n1. Given an account for which the orphans_tab feature flag is enabled, activate the H client on a long PDF with many annotations\r\n2. Open the sidebar as soon as possible and observe the Annotations and Orphans tab\r\n\r\nObserved behavior: Many annotations initially appear in the Orphans tab and then \"move\" to the Annotations tab one-by-one.\r\n\r\n**Background**\r\n\r\nAnnotations can take several seconds to anchor in long PDFs, because anchoring annotations involves rendering pages of a PDF to text which can be slow.\r\n\r\nWhile annotations are anchoring, the sidebar does not display them - since it is unknown whether they should appear in the Annotations or Orphans tab. After 500ms however, annotations that are still anchoring are automatically marked (at least temporarily) as orphans. This ensures that annotations are eventually displayed in the sidebar if an error occurs during anchoring in the page (eg. due to a bug in the client or problems caused by the page's own JS or DOM structure).\r\n\r\nOn long PDFs, the result is that annotations may initially appear in the Orphans tab, then transfer one-by-one to the Annotations tab as anchoring completes.\r\n\r\n**Possible solutions**\r\n\r\n1. Increase the anchoring timeout if the connected document is a PDF. _This would result in annotations not appearing in the UI at all until they have been anchored, but would at least avoid them appearing in the wrong tab._\r\n2. Display both Annotations and Orphans in the Annotations tab in PDFs to avoid them moving between tabs while anchoring completes. Orphans are still displayed with a struck-through quote to indicate that they have not been located in the document. _This would result in all annotations displaying in the Annotations tab instantly, but there would be a visual cue indicating whether an annotation can be scrolled to by clicking it_\r\n3. Pretend that annotations always anchor in PDFs. This means always display them like an anchored annotation, even if they have not been located yet. _This would result in all annotations displaying in the Annotations tab instantly, but would provide no visual cue as to whether clicking on an annotation will scroll to it_"},"comment":{"url":"https://api.github.com/repos/hypothesis/client/issues/comments/268033062","html_url":"https://github.com/hypothesis/client/issues/176#issuecomment-268033062","issue_url":"https://api.github.com/repos/hypothesis/client/issues/176","id":268033062,"user":{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T18:00:37Z","updated_at":"2016-12-19T18:00:37Z","body":"Discussion of a revised and slightly simplified plan which does not require different treatments of PDFs and HTML documents: https://hypothes-is.slack.com/archives/frontend/p1482162799000721"}}
{"actor":{"display_login":"robertknight"}}