• Robert Knight's avatar
    Only send annotations to matching frame · 0a1077b3
    Robert Knight authored
    When the sidebar is connected to multiple guest frames it will send all
    incoming annotations to all frames. The result is typically that the
    annotation will anchor in one frame and orphan in the others. Depending
    on what order this happens in, the annotation will non-deterministically
    show up as an Annotation or Orphan in the sidebar.
    
    In order to determine which frames an annotation should be sent to in
    all cases, we'd either need the backend to return information about which
    search URIs an annotation matches or make a separate search request for
    each frame and record the associated frame with the results. This
    will require some significant refactoring of the annotation search
    service.
    
    As an interim step, make `FrameSyncService` send annotations only to a
    single frame based on matching URL, with a fallback to sending to the
    main frame if there is no exact match. This will work as expected for
    most pages, and is at least deterministic when it does fail. When we
    have a solution for being able to match annotations to frames more
    generally, we can adapt this code to use it.
    
    This is a partial solution to https://github.com/hypothesis/client/issues/3992.
    0a1077b3
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
dev-server Loading commit data...
docs Loading commit data...
embedding-examples Loading commit data...
images Loading commit data...
requirements 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...
.python-version 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.mjs Loading commit data...
package.json Loading commit data...
pyproject.toml Loading commit data...
requirements-dev.in Loading commit data...
rollup-boot.config.mjs Loading commit data...
rollup-tests.config.mjs Loading commit data...
rollup.config.mjs Loading commit data...
tailwind.config.mjs Loading commit data...
tox.ini Loading commit data...
tsconfig.json Loading commit data...
yarn.lock Loading commit data...