• 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
annotation-viewer-controller-test.coffee 2.6 KB