1. 11 Dec, 2015 2 commits
    • Robert Knight's avatar
      Implement the new home page design · e31b216c
      Robert Knight authored
       * Split out the header and footer of the design
         into their own templates to facilitate re-use in WordPress
         and other pages on the site
      
       * Rename the existing logo-only header to logo-header.
      
       * Rename 'nav-bar' to 'header' since that is a better description
         for how it is used
      
       * Move inline styles and scripts out of the template and into
         appropriate JS/SCSS files
      e31b216c
    • Robert Knight's avatar
      New navigation bar for the homepage · 0b443a06
      Robert Knight authored
      Update the style of the navigation bar on the homepage
      to the new design from https://trello.com/c/h6kQMQG8/
      0b443a06
  2. 10 Dec, 2015 8 commits
    • Sean Hammond's avatar
      Merge pull request #2784 from hypothesis/consolidate-validation · 8ca3615f
      Sean Hammond authored
      Consolidate API validation
      8ca3615f
    • Sean Hammond's avatar
      Merge pull request #2790 from hypothesis/consolidate-templates · 052e930c
      Sean Hammond authored
      Move all templates into `templates/` directory
      052e930c
    • Nick Stenning's avatar
      Move all templates into `templates/` directory · 6ce010ad
      Nick Stenning authored
      It would be nice if each module could be responsible for their own
      templates, but in reality nearly every template forms part of a large
      tree of templates, extending base layouts, and so on.
      
      In the interests of consistency, it makes sense to have all templates in
      the `h/templates/` directory rather than some being in `h/templates/`
      and some being in their respective module directories.
      6ce010ad
    • Sean Hammond's avatar
      Merge pull request #2791 from hypothesis/dont-explode-on-invalid-json · a06be299
      Sean Hammond authored
      Don't 500 when non-object JSON is POSTed to API create
      a06be299
    • Sean Hammond's avatar
      Merge pull request #2787 from hypothesis/fix-realtime-for-replies-standalone · a2d81275
      Sean Hammond authored
      Fix standalone annotation page realtime updates for replies to replies
      a2d81275
    • Sean Hammond's avatar
      Merge pull request #2786 from hypothesis/fix-standalone-reply-pages · 2cae4fe8
      Sean Hammond authored
      Fix standalone reply pages
      2cae4fe8
    • Nick Stenning's avatar
      Fix standalone annotation page realtime updates for replies to replies · ce6d5113
      Nick Stenning authored
      This commit fixes a bug where a standalone annotation page only receives
      realtime updates for replies on that page if the top-level annotation on
      the page is also the root of its message thread.
      
      The annotation `references` field contains the ids of all ancestors in
      the message thread, from oldest to newest -- that is, the earlier in the
      references field an id appears, the higher it is in the message tree.
      
      In order to receive realtime updates for all messages in the part of the
      thread displayed on a standalone annotation page, we need to ask for:
      
      - all updates in which the id in the URL matches the id in the
        annotation (i.e. updates to the top-most displayed annotation, which
        may itself be a reply).
      
      - all updates in which the id in the URL *is contained in* the
        `references` field of an annotation (i.e. updates for any annotation
        lower in the message thread)
      
      Previously, this code requested all updates in which the id *was the
      first entry* in the references field, which is only ever true for the
      root of a message thread, meaning that it only ever worked on standalone
      annotation pages for top-level annotations, and not on pages for
      replies.
      ce6d5113
    • Nick Stenning's avatar
      Fix standalone reply pages · fe0250ca
      Nick Stenning authored
      This commit is a partial revert of 4628b26, affecting standalone
      annotation pages only.
      
      That commit changed the AnnotationViewerController (the component
      responsible for standalone annotation pages) to make a single request to
      the search API to load an annotation and all its replies, rather than
      two requests -- for the annotation and then for its replies.
      
      This works just fine so long as the top-level annotation is not itself a
      reply. In that case, however, the search endpoint returns nothing, as
      the (temporary) `_separate_replies` parameter ensures that only
      top-level annotations are matched.
      
      This commit switches back to making two requests to populate the
      client-side data structures for the standalone annotation page:
      
      1. To fetch the annotation referenced in the URL (which may itself be a
         reply).
      2. To fetch any replies to the annotation referenced in the URL.
      
      Fixes #2775.
      fe0250ca
  3. 07 Dec, 2015 14 commits
  4. 04 Dec, 2015 11 commits
  5. 03 Dec, 2015 5 commits
    • Sean Hammond's avatar
      1ae2f1ed
    • Sean Hammond's avatar
      Refactor saving highlights in AnnotationController · 0931f483
      Sean Hammond authored
      * Rename local variable `highlight` to `newlyCreatedByHighlightButton` and add
        a docstring - clarify what this piece of state actually means.
      
      * Fix `vm.isHighlight()`: It now returns `false` for new annotations that the
        user hasn't entered any text or tags for yet (instead of `true`).
      
      * Move the code for saving new highlights to the server into a
        `saveNewHighlight()` function that's called on AnnotationController
        instantiation instead of having it in a `$watch()` function that's called
        every time the local variable `model` changes.
      
        Also use the presence of `model.id` to avoid re-saving highlights that have
        already been saved - instead of abusing the `highlight`
        (now `newlyCreatedByHighlightButton`) variable and confusing what it
        represents.
      
      * Don't automatically open the annotation editor on Annotationcontroller
        instantiation if the annotation is a highlight. This fixes this bug:
      
        1. Create a new highlight while logged out
        2. Log in
        3. Your highlight is saved to the server, but also the annotation editor is
           open on your highlight.
      
        The intention is that highlights are simply saved to the server, not opened
        for editing.
      
        _Annotations_ created while logged out, on the other hand, are _not_ saved
        to the server on login but _are_ opened for editing on login.
      0931f483
    • Robert Knight's avatar
      Merge pull request #2763 from hypothesis/2728-refactor-annotation-controller-tests · 696909f7
      Robert Knight authored
      Refactor annotation controller tests
      696909f7
    • Sean Hammond's avatar
      Semicolon fix · 8b1f01ba
      Sean Hammond authored
      8b1f01ba
    • Sean Hammond's avatar
      No need for createDirective() to be a var · 9955538c
      Sean Hammond authored
      9955538c