1. 30 Oct, 2015 3 commits
    • Sean Hammond's avatar
      Use the USER_CHANGED event · d53580a5
      Sean Hammond authored
      d53580a5
    • Sean Hammond's avatar
      Refactor client-side annotation permissions generation · 034ef9e9
      Sean Hammond authored
      Move the responsibility for creating the default permissions for new
      annotations according to the cached-in-local-storage shared/private setting
      into permissions.coffee, where it's with other permissions related stuff and
      can be tested more easily.
      034ef9e9
    • Sean Hammond's avatar
      Set permissions of new annotations on login · d4027d01
      Sean Hammond authored
      While signed out create a new annotation. You'll see a "You must sign in
      to create an annotation" card. This card is in fact an annotation
      in the client-side code, but one that has no user, no permissions, etc
      etc. If you sign in, you'll then see a full annotation card with editor
      open in place of the previous card, you can type an annotation and save
      it.
      
      Except that this will send invalid permissions to the server, which will
      happy save them (no validation) and then crash.
      
      The fix:
      
      On sign in, set the model.permissions of such annotations. This means
      that the Post dropdown will set itself correctly to shared or private
      and on posting the annotation the correct permissions will be sent to
      the server.
      
      Also fixed permissions.coffee to return null instead of invalid
      permissions when not signed in.
      
      Fixes #2686.
      d4027d01
  2. 29 Oct, 2015 11 commits
    • Nick Stenning's avatar
      Merge pull request #2691 from robertknight/publish-btn-cleanup · 887ac52d
      Nick Stenning authored
      Fix 'Post to' button not updating when an annotation's group changed & cleanup code
      887ac52d
    • Robert Knight's avatar
      Fix 'Post to' button not updating when groups changed · 4cafca01
      Robert Knight authored
      The 'group' property on the scope used by the 'Post to' button
      was set when the component was instantiated but not updated
      if the group subsequently changed.
      
      Fix this and simplify the code by using the 'bindToController'
      facility from Angular 1.3.x to avoid copying properties
      from the directive's scope to the controller.
      
      This means that 'vm.group' expressions in the controller now
      update when the corresponding attribute changes.
      4cafca01
    • Nick Stenning's avatar
      Merge pull request #2679 from robertknight/t148-card_group_style_refactor · 58a8abab
      Nick Stenning authored
      Adjust annotation card style to fit groups design
      58a8abab
    • Sean Hammond's avatar
      Merge pull request #2690 from hypothesis/match-tags-according-to-mapping-analyzer · cb8859ed
      Sean Hammond authored
      Query tags field with a match query (use mapping analyzer)
      cb8859ed
    • Robert Knight's avatar
      Adjust annotation card style to fit groups design · f9ffbcaf
      Robert Knight authored
       * Move the group name and scope indicator onto a line
         below the username
      
       * Make the group name a lighter gray in the default state
      
       * Adjust the margins around the group card
      
       * Use a consistent font size from the typography palette
         for all text in the annotation card header.
      
       * Remove the 'Only Me' text next to the lock badge.
         Along with everything else in the header this added
         too much noise.
      
       * Increase the spacing between the group name and
         the excerpt
      
       * Fix unnecessary margin above annotations with no quotes
         by hide the annotation quote list section if an annotation
         does not have quotes.
      
       * Add a minimum margin between the annotation heading and the editor
      
      T-148
      f9ffbcaf
    • Nick Stenning's avatar
      Merge pull request #2684 from hypothesis/gh2675-wait_for_features · fc913bb3
      Nick Stenning authored
      Wait for feature flag data before loading sidebar view
      fc913bb3
    • Nick Stenning's avatar
      Merge pull request #2683 from hypothesis/document_link_refactor · d11c2dfa
      Nick Stenning authored
      Document link refactor
      d11c2dfa
    • Robert Knight's avatar
      Clear features cache only when logged in user changes · 4c04077d
      Robert Knight authored
      Clear the features cache only when the logged-in user changes,
      rather than on any change to session data.
      4c04077d
    • Robert Knight's avatar
      Wait for feature flag data before loading sidebar view · 7299b4d8
      Robert Knight authored
      Feature flags can affect the initial search query when
      the app loads. eg. If the groups feature is enabled then
      we will by default load annotations for the most recently
      used group, otherwise we'll load public annotations.
      
      Therefore, wait for the feature flags to be retrieved
      before loading the view.
      
      The feature flags endpoint is very fast so the behavior
      was correct most of the time previously but occassionally
      the app would load and fetch Public annotations before
      the feature data was available which would have resulted
      in fetching group annotations.
      
      At the same time, this clears the feature flag data
      when the current user changes and fixes an issue where
      switching from a non-groups enabled account to a groups-enabled
      account did not immediately update the UI.
      
      Fixes #2675
      7299b4d8
    • Nick Stenning's avatar
      Merge pull request #2688 from robertknight/groups_changed_exception · c6975968
      Nick Stenning authored
      Fix exception when GROUPS_CHANGED event is broadcast during route load
      c6975968
    • Robert Knight's avatar
      Fix exception when GROUPS_CHANGED event is broadcast during route load · e30dffdd
      Robert Knight authored
      The <group-list> directive attempted to update itself in
      response to a group change notification without triggering
      a full digest cycle by using `$scope.$apply`.
      
      This was based on the incorrect understanding that $apply only
      dirty-checks the current scope downwards. In fact, in dirty-checks
      the root scope. Additionally, the logic was pointless since
      group list/focus changes happen in response to two types of events,
      both of which are triggered in the context of $apply:
      
       * An event handler when the user selects a group
      
       * A callback from angular-websocket when a WebSocket message
         is received.
      e30dffdd
  3. 28 Oct, 2015 6 commits
  4. 27 Oct, 2015 18 commits
  5. 26 Oct, 2015 2 commits