• Robert Knight's avatar
    Improve handling of annotation fetch error in single annotation view · 23a13091
    Robert Knight authored
    Previously if the user visited a `/a/<ID>` URL and the request to fetch
    the annotation failed with a 404 then the user would see a blank page.
    If the fetch failed because the annotation was private, logging in did
    not cause the annotation to be fetched.
    
    This commit resolves the two issues:
    
     - When the logged-in user changes, re-fetch the annotation
     - If the annotation fetch fails, an "Annotation unavailable" message is
       shown. This currently repurposes the error that is shown when a
       direct-linked annotation fetch fails, but without the "Clear
       selection" button.
    
    This commit also fixes an issue where a direct link to a group that
    could not be fetched would show a "Clear selection" button even though
    there was no active selection to clear. That button is only needed when
    following a direct link to an annotation.
    23a13091
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
docs Loading commit data...
embedding-examples Loading commit data...
images Loading commit data...
scripts Loading commit data...
src Loading commit data...
.babelrc Loading commit data...
.dockerignore Loading commit data...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.npmrc Loading commit data...
.prettierignore Loading commit data...
.prettierrc Loading commit data...
.python-version Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT Loading commit data...
Dockerfile Loading commit data...
Jenkinsfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
codecov.yml Loading commit data...
gulpfile.js Loading commit data...
package.json Loading commit data...
requirements-dev.in Loading commit data...
tox.ini Loading commit data...
yarn.lock Loading commit data...