1. 02 Mar, 2021 2 commits
    • Robert Knight's avatar
      Remove `beforeAnnotationCreated` event handler in `DocumentMeta` · 3771ff0e
      Robert Knight authored
      This handler sets the `document` property of new annotations to metadata
      extracted from `<meta>` and `<link>` tags on the page. It is unnecessary
      however because the `Guest` class sets this property using either
      `DocumentMeta.metadata` or `PDF.getMetadata`, depending on the document
      type, before it emits the `beforeAnnotationCreated` event.
      
      In PDFs this code is a serious hazard because if the
      `beforeAnnotationCreated` event subscriber in `DocumentMeta` runs before
      `AnnotationSync`'s corresponding event handler then DocumentMeta will
      overwrite the PDF document-specific annotation metadata with generic
      HTML document metadata - losing the critical `documentFingerprint`
      property. Fortunately this problem did not occur because the `Guest`
      constructor instantiates the `AnnotationSync` class before the
      `DocumentMeta` class. Consequently AnnotationSync's
      `beforeAnnotationCreated` event handler runs before DocumentMeta's and
      pushes new annotations to the sidebar with the correct document metadata
      before `DocumentMeta` overwrites it.
      3771ff0e
    • Kyle Keating's avatar
      Fix test warnings from missing prop · 39d6e181
      Kyle Keating authored
      The ThreadList component has a required felid  `threads` but its value was undefined in tests. The value comes from the mocked version of `useRootThread.children`
      39d6e181
  2. 01 Mar, 2021 16 commits
  3. 26 Feb, 2021 4 commits
  4. 25 Feb, 2021 10 commits
  5. 24 Feb, 2021 1 commit
  6. 23 Feb, 2021 4 commits
  7. 22 Feb, 2021 3 commits