1. 19 Dec, 2016 1 commit
    • 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
  2. 16 Dec, 2016 2 commits
  3. 30 Nov, 2016 3 commits
  4. 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
  5. 18 Nov, 2016 2 commits
  6. 17 Nov, 2016 1 commit
  7. 16 Nov, 2016 1 commit
  8. 15 Nov, 2016 1 commit
  9. 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
  10. 04 Nov, 2016 4 commits
  11. 28 Oct, 2016 2 commits
  12. 25 Oct, 2016 5 commits
  13. 24 Oct, 2016 4 commits
  14. 21 Oct, 2016 5 commits
  15. 20 Oct, 2016 2 commits
  16. 19 Oct, 2016 3 commits
    • Sean Roberts's avatar
      Merge pull request #128 from hypothesis/remove-annotation-ui-controller · b6860bcb
      Sean Roberts authored
      Remove AnnotationUIController
      b6860bcb
    • Robert Knight's avatar
      Remove the "-app" suffix from Gulp tasks · 096a1177
      Robert Knight authored
      This is a holdover from when the Hypothesis service front-end and client
      application lived in the same repository and the "-app" suffix was used
      to indicate client-specific tasks. Removing this gives the tasks more
      obvious names - "build", "build-js", "test" etc.
      096a1177
    • Robert Knight's avatar
      Remove AnnotationUIController · 39c18023
      Robert Knight authored
      All of the functionality in this module is either unused or duplicated
      elsewhere:
      
       * The $scope.{selectedAnnotations, focusedAnnotations,
         selectedAnnotationsCount} properties were unused.
      
         Note that there is a very similarly named `selectedAnnotationCount`
         scope property defined in `WidgetController` which _is_ used
      
       * The ANNOTATION_DELETED event handler duplicated another one in
         root-thread.js
      39c18023