1. 29 Sep, 2016 5 commits
  2. 28 Sep, 2016 6 commits
  3. 27 Sep, 2016 1 commit
  4. 26 Sep, 2016 5 commits
  5. 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
  6. 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
  7. 19 Sep, 2016 8 commits
  8. 16 Sep, 2016 4 commits
    • Robert Knight's avatar
      Only save pending updates for annotations in the focused group (#111) · 72859c5e
      Robert Knight authored
      Since we discard all pending updates and deletions when switching
      groups, discard create/update notifications about annotations in
      unfocused groups as soon as we receive them.
      
      This fixes the issue where the 'Apply Update' badge counted updates
      from other groups, with the result that clicking the badge did not
      show any changes.
      72859c5e
    • Robert Knight's avatar
      Move the logic that updates the focused group for new annotations (#108) · 7191e4ba
      Robert Knight authored
      Move the logic that updates the focused group for new annotations
      out of the <annotation> component and into a service.
      
      This fixes the issue where the event handler does not get invoked if no
      <annotation> component instance exists for an annotation because it is
      currently scrolled off-screen.
      
      Fixes #105
      7191e4ba
    • Robert Knight's avatar
      Fix stale copies of annotations being reloaded when switching groups (#110) · ead7c07d
      Robert Knight authored
      Previously when switching groups all of the currently loaded annotations
      would be unloaded and then potentially outdated copies of the annotation
      from the drafts store would be reloaded into the annotation store.
      
      This commit fixes that problem by:
      
       1. Only unloading saved annotations when switching groups.
      
       2. Only storing the annotation ID and tag in the drafts service, to
          ensure that we don't try to use it as a complete annotation anywhere
      
      A consequence of (1) is that new, unsaved annotations no-longer briefly
      disappear when switching groups.
      
      This fixes the problem described in #109 where the orphan status of a
      new annotation is lost when switching groups. It does not fix the
      problem where the new annotation immediately becomes an orphan.
      ead7c07d
    • Robert Knight's avatar
      Fix off-screen empty drafts not being removed when a new annotation is created (#107) · e6746f9a
      Robert Knight authored
      The logic to remove new and empty annotations used to live in the
      <annotation> component because that was the only part of the code that
      had access to the state of unsaved changes.
      
      Since <annotation> instances are only created for on-screen annotations,
      this can result in empty drafts not being removed if the empty
      annotation is off-screen.
      
      Now that the canonical content of unsaved annotations is stored in the
      drafts service, we can move the logic outside of the annotation
      component and fix this problem.
      
      Fixes #97
      e6746f9a
  9. 15 Sep, 2016 6 commits