1. 26 Apr, 2017 1 commit
    • Sean Hammond's avatar
      Clarify in tooltip what flag button does · e64fa192
      Sean Hammond authored
      The flag button on an annotation has a tooltip that says simply "Flag"
      (or "Annotation has been flagged" if it's already flagged) but there's
      no indication to the user what flagging is or does (even when they click
      the button, all that happens is the flag turns red).
      
      "Flagging" can certainly be misinterpreted. I think some apps use it as
      a way to keep track of "special" or "favorite" items (usually called
      "starring" in most modern apps), or have a variety of different "flags"
      that you can apply to an email or whatever it is (important, work,
      personal, etc, this is usually called "tagging" or "labelling" in most
      modern apps).
      
      This commit changes the tooltips to clarify that what the button does is
      report the annotation to the moderators. I've used the verb "report"
      rather than "flag" as I think "Report this annotation to the moderators"
      sounds better than "Flag this annotation to the moderators".  Either way
      I think "to the moderators" is important to clarify that this button
      sends a message to the moderators and isn't, for example, just flagging
      for personal use like starring / tagging / labeling.
      e64fa192
  2. 24 Apr, 2017 11 commits
  3. 21 Apr, 2017 2 commits
  4. 20 Apr, 2017 6 commits
  5. 19 Apr, 2017 5 commits
  6. 18 Apr, 2017 8 commits
    • Robert Knight's avatar
      Merge pull request #356 from hypothesis/use-new-links-api · d49669b3
      Robert Knight authored
      Use the new `/api/links` resource
      d49669b3
    • Sean Hammond's avatar
      Log a warning if the links API request is rejected · b40af32e
      Sean Hammond authored
      There's no unit test for this. Because of Promises, it cannot be tested
      without refactoring serviceUrl.
      b40af32e
    • Sean Hammond's avatar
      Change serviceUrl to use the /api/links · ea9069a7
      Sean Hammond authored
      Change serviceUrl to return URLs by expanding URL templates received
      from h's /api/links resource, rather than using hardcoded URL templates
      as it previously did.
      
      The interface and contract that serviceUrl presents to its users remains
      the same - the fact it's now sending an API request to get the URL
      templates, and waiting for the response, is completely hidden from its
      users.
      
      This hiding is achieved by two tricks:
      
      1. Always returning "" for an expanded URL if the API response hasn't
         been received yet, rather than, for example, changing the interface
         to return Promises instead of strings (which would then require
         changes to every user of the interface, and possibly their users...)
      
      2. Updating annotationUI, the Redux state store, with the new URL
         templates when the API response is received. This causes any
         AngularJS components that might have used an (empty string) URL to be
         re-rendered, they will call sericeUrl URL again and this time get the
         actual URLs.
      
         This is completely transparent to the components - annotationUI
         causes AngularJS to call them again and this time they will get a
         different result from serviceUrl. The code of the components
         themselves doesn't need to change.
      
      Additionally, serviceUrl will never throw errors if it hasn't received
      the API response yet. For example there is no error if an unknown link
      name is requested, or if unused template params are given. It just
      always returns "". Once it _does_ have the API response then it will
      start throwing errors for bad requests, the same as it did previously.
      ea9069a7
    • Sean Hammond's avatar
      Add store.links() API wrapper · 50aeb3b5
      Sean Hammond authored
      Add a new function to `store`, the https://hypothes.is/api wrapper,
      that provides access to the new https://hypothes.is/api/links resource.
      50aeb3b5
    • Sean Hammond's avatar
      Add links reducer · ad8cbf1c
      Sean Hammond authored
      Add a Redux reducer for storing the links (URL templates) from the
      /api/links HTTP resource in the state store.
      ad8cbf1c
    • Robert Knight's avatar
      Add test to verify that link field is focused and selected when dialog opens · 29ded206
      Robert Knight authored
      This adds a missing test for the behavior and also fixes variance in
      test coverage between runs because the code that implements this
      behavior sometimes ran and sometimes did not.
      29ded206
    • Robert Knight's avatar
      Use a transparent backdrop to intercept clicks outside share dialog · b376de32
      Robert Knight authored
      Instead of adding event listeners to the document to track clicks
      outside the share dialog, use a transparent backdrop element behind the
      share dialog which covers the whole page.
      
      This avoids the need to register/unregister document-level event
      handlers in the controller, removing some code which was untested.
      b376de32
    • Robert Knight's avatar
      Consistency improvements for `<annotation-share-dialog>` · 56f5043f
      Robert Knight authored
      Refactor the annotation share dialog's controller for consistency with
      other components:
      
       - Move controller to a top-level function in the file
      
       - Capture `this` as `self` rather than using `bind`
      
       - Attach `onShareClick` to controller rather than `$scope`
      56f5043f
  7. 13 Apr, 2017 5 commits
  8. 12 Apr, 2017 2 commits