1. 21 Oct, 2016 1 commit
    • Robert Knight's avatar
      Add PDF anchoring unit tests · e0da5628
      Robert Knight authored
      Add a set of tests using a fake implementation of PDF.js'
      PDFViewerApplication interface.
      
      The initial set of tests simulate a nice born-digital PDF in which the
      text layer of the PDF contains one <div> per line. In future we can
      easily extend this to emulate the kind of structure that would be seen
      when working with eg. an OCR-ed PDF
      e0da5628
  2. 20 Oct, 2016 1 commit
  3. 19 Oct, 2016 4 commits
  4. 17 Oct, 2016 3 commits
  5. 14 Oct, 2016 2 commits
    • Robert Knight's avatar
      Add a set of HTML anchoring tests with expected failures · 025d41e2
      Robert Knight authored
      Add a set of tests which check that Ranges within a DOM tree are
      correctly 'described' as selectors and then successfully converted back to
      Range objects by anchoring.
      
      The tests are derived from the suite of test cases collected for the
      Annotator project at
      https://github.com/openannotation/annotator/blob/v1.2.x/test/spec/range_spec.coffee
      
      These tests found failures in describing ranges with position and quote
      selectors in many cases and with a range selector in one case. The test
      lists and checks these expected failures.
      025d41e2
    • Robert Knight's avatar
      Fix formatting changes made via toolbar buttons not persisting · 3e084ccb
      Robert Knight authored
      When making formatting changes to the text of an annotation with the
      toolbar button without subsequently making a manual edit before clicking
      Preview or Save, the onEditText() callback was never triggered and so
      the unsaved changes were reverted when exiting edit mode.
      
      This happened because onEditText() was only fired in response to the
      'input' event which only occurs in response to programmatic, not manual
      changes to the input's value.
      
      Fixes #147
      3e084ccb
  6. 13 Oct, 2016 1 commit
  7. 12 Oct, 2016 1 commit
  8. 29 Sep, 2016 6 commits
  9. 28 Sep, 2016 6 commits
  10. 27 Sep, 2016 1 commit
  11. 26 Sep, 2016 6 commits
  12. 21 Sep, 2016 4 commits
    • Sean Hammond's avatar
      Merge pull request #116 from hypothesis/frame-sync-refactor · f588f1e7
      Sean Hammond authored
      Remove crossframe service and simplify communication with connected frames
      f588f1e7
    • Robert Knight's avatar
    • Robert Knight's avatar
      Move AnnotationSync class to annotator/ dir and remove unused code · e126b97d
      Robert Knight authored
      Now that AnnotationSync is no longer used in the sidebar app, we can
      remove all of the handlers for events and messages arriving through the
      channel which are not needed by the page itself.
      e126b97d
    • Robert Knight's avatar
      Simplify the sidebar app side of sidebar <-> host frame messaging · 55093ebb
      Robert Knight authored
      Previously the communication between the sidebar and host frame was
      implemented by a shared AnnotationSync class, with a 'crossframe'
      service which abstracted the event bus on each side.
      
      This design however assumed that both sides wanted to listen to
      the same messages and react to them in similar ways. This is not
      the case, especially given the change to use Redux for state
      management in the sidebar app.
      
      This commit replaces the crossframe service and AnnotationSync class
      with a new 'frameSync' service which implements only the event
      listeners and sidebar -> page RPC calls that are actually needed.
      
      As a result, local annotation tags for annotations loaded via the API
      can now be assigned by the reducer in the Redux store, making this
      easier to test and getting us another step closer to making Annotation
      objects immutable in the sidebar app.
      55093ebb
  13. 20 Sep, 2016 1 commit
    • Robert Knight's avatar
      Stop fetching result pages if current page is empty (#119) · 13eab232
      Robert Knight authored
      Yesterday a brief issue occurred where the server reported an incorrect
      (too high) total number of results for a URL due to the search index
      being out of date. Once the client reached the end of the actually
      available results, it made queries to the search endpoint which returned
      an empty result set but had a `total` figure implying that there should
      be more pages. The client then ended up polling the server indefinitely
      for more results.
      
      This commit defensively makes the client stop fetching more result pages
      if the current page is empty.
      13eab232
  14. 19 Sep, 2016 3 commits
    • Robert Knight's avatar
      0.44.0 · 42a61c6f
      Robert Knight authored
      42a61c6f
    • Robert Knight's avatar
      Update Change Log · d4e1c421
      Robert Knight authored
      d4e1c421
    • Robert Knight's avatar
      Count pending deletions as pending updates (#114) · e79e117a
      Robert Knight authored
      When calculating the count of pending updates that is used to determine
      whether to show the 'Apply Updates' icon or not, count deletions.
      
      In addition to changing the count calculation itself, this also requires
      that pending deletions are discarded for annotations that are not
      currently loaded. Such notifications may be received because the
      deletion may have happened in an un-focused group. Unlike create/update
      notifications, no group information is included in the notification
      itself so we look up the ID in the local store.
      e79e117a