1. 05 Jan, 2017 1 commit
  2. 23 Dec, 2016 4 commits
  3. 22 Dec, 2016 1 commit
    • Robert Knight's avatar
      Display annotations in Annotations tab after timeout · cd4039ca
      Robert Knight authored
      Instead of marking annotations as orphans after the anchoring timeout
      expires, instead display them in the Annotations tab but with a visual
      indicator that they have not yet anchored. This avoids showing
      annotations that are still anchoring in the Orphans tab, which can be
      confusing when it happens in long PDF documents with many annotations.
      
       * Add an `$anchorTimeout` flag to annotations that is set if
         annotations fail to anchor within the timeout period.
      
       * Display annotations with this flag set in the Annotations tab,
         on the optimistic basis that they will eventually anchor.
      
       * When rendering annotations with this flag set, display them with
         a quote struck through (same as orphans) to indicate that they are
         pending. The visual representation of the pending state may be
         tweaked in future.
      cd4039ca
  4. 21 Dec, 2016 2 commits
  5. 20 Dec, 2016 1 commit
  6. 19 Dec, 2016 3 commits
    • Robert Knight's avatar
      Remove unused module stub · 51daa256
      Robert Knight authored
      51daa256
    • Robert Knight's avatar
      Consolidate logic for annotation <-> tab assignment · f9ee271c
      Robert Knight authored
      Previously the logic for determining which tab an annotation should appear
      in occurred both in `root-thread.js` where it was used to filter
      annotations based on the selected tab, and in `widget-controller.js` where
      it was used to switch to the tab containing a particular annotation.
      
      Consolidate all the logic for deciding which tab an annotation should
      appear in into a single module. This makes it easier to test that tab
      assignment is correct with different combinations of feature flags and
      annotation states and to add additional logic in future.
      f9ee271c
    • Robert Knight's avatar
      Move the list of connected frames to the Redux store · 5df4a9cd
      Robert Knight authored
      Move metadata about the frames that are connected to the sidebar app,
      such as the document's URL and fingerprint, to the central app state
      store.
      
      This is part of an effort to unify how important application state is
      managed.
      5df4a9cd
  7. 16 Dec, 2016 2 commits
  8. 30 Nov, 2016 3 commits
  9. 28 Nov, 2016 2 commits
    • Nick Stenning's avatar
      Remove 'defer_realtime_updates' feature flagging · fad29df7
      Nick Stenning authored
      This is now enabled by for everyone, so we don't need the feature flag
      any more.
      fad29df7
    • Robert Knight's avatar
      Speed up PDF anchoring (#171) · ff8e000e
      Robert Knight authored
      When anchoring many annotations on a PDF, the text of the same page may
      be requested many times.
      
      The text is initially fetched via an async call to
      PDFViewerApplication.pdfViewer.getPageTextContent() and the result is
      then cached for future use.
      
      Previously the cache was only updated once this expensive call
      returned a result. Consequently when anchoring many annotations at once,
      there would be a lot of unnecessary cache misses and repeated calls to
      PDFViewerApplication.pdfViewer.getPageTextContent()
      
      Fix the problem by storing a promise for the result in the cache when
      the text for a given page is requested the first time. Consequently the
      text for each page will only be fetched once.
      ff8e000e
  10. 27 Nov, 2016 1 commit
    • Robert Knight's avatar
      Use a custom element name for highlight spans · 2d971124
      Robert Knight authored
      Use the same trick that was applied to the adder in
      d9644a80 to reduce the likelihood of the
      page's own CSS styling modifying the appearance of highlights.
      
      Compared to alternative methods which would raise the precedence of
      highlight styling (inline styles, !important !all !the !things, selector
      precedence hacks), this approach is simpler as it makes the conflicting
      rule from the page's own styling not apply at all.
      
      Fixes hypothesis/h#3520
      2d971124
  11. 18 Nov, 2016 2 commits
  12. 17 Nov, 2016 1 commit
  13. 16 Nov, 2016 1 commit
  14. 15 Nov, 2016 1 commit
  15. 08 Nov, 2016 2 commits
    • Robert Knight's avatar
      Fix incorrect usage of Sinon assertions (#162) · 6975c449
      Robert Knight authored
      This fixes a couple of incorrect usages of Sinon assertions which
      resulted in test failures with the latest patch version of Sinon.
      
       * assert.calledOnce() only takes one argument
      
       * Sinon assertions do not take a message argument as Chai assertions
         do. See http://sinonjs.org/docs/#assertions
      6975c449
    • Robert Knight's avatar
      Remove AnnotationUISync service (#127) · bb71cd77
      Robert Knight authored
      * Move event handlers out of AnnotationUISync
      
      As a step towards having all bridge event handlers in one place, move
      these event handlers into frameSync.
      
       * Add tests for findIDsForTags() and for re-exporting of this
         function from annotationUI
      
      * Move sidebarOpened event handler to FrameSync service
      
      * Remove the AnnotationUISync service
      
      Its functionality has now been moved into the FrameSync service, except
      for the logic that was intended to synchronize the "Show Annotation
      Highlights" logic across multiple frames, since this is clearly broken
      [1].
      
      The two pieces of functionality related to this we need to support at
      the moment are:
      
       1. The `showHighlights` config option to set whether highlights are
          initially visible.
      
       2. The highlight toggle button in the sidebar's outer frame
      
      Both of these work without the sidebar app's involvement.
      
      [1] See https://github.com/hypothesis/h/issues/3433 and
          https://github.com/hypothesis/h/pull/3295
      bb71cd77
  16. 04 Nov, 2016 4 commits
  17. 28 Oct, 2016 2 commits
  18. 25 Oct, 2016 5 commits
  19. 24 Oct, 2016 2 commits