• Eduardo Sanz García's avatar
    Remove `AnnotationSync` utility · e63a0be7
    Eduardo Sanz García authored
    AnnotationSync utility didn't have a clear purpose, except for assigning a
    temporarily `$tag` to newly created annotations. For that, it used an
    internal cache of annotation objects from the Guest, that were mutated
    in-place. `AnnotationSync` used a very indirect method of communication
    to the `Guest`, using an event emitter, even though their mutual
    relationship was quite straightforward.
    
    In this PR, we have:
    
    * Simplified the messages that are sent between the host and the
      sidebar. We have assumed that a `$tag` value is always present if it
      comes from the `sidebar`, and a temporarily `$tag` is assigned in the
      `Guest` class for newly created annotations. Therefore, the type of
      the message sent between these two frames can be simplified to always
      be of the shape of `AnnotationData`, a safe version of `Annotation`.
    
    * Added a few missing types.
    
    * Changed the RPC method `deleteAnnotation` to send astring tag, similar
      to other RPC methods, like `focusAnnotations` or `scrollToAnnoation`.
      As a consequence of that we changed the `Guest#detach` method
      signature.
    e63a0be7
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...
tox.ini Loading commit data...
tsconfig.json Loading commit data...
yarn.lock Loading commit data...