1. 02 Mar, 2021 6 commits
    • Kyle Keating's avatar
      14f4ad80
    • Kyle Keating's avatar
      Remove frontend-share subfolder · e3467f5d
      Kyle Keating authored
      - Remove github actions related to frontend-shared
      - Remove scripts and gulp commands related to frontend-shared
      - frontend-shared is now managed from its own repository.
      e3467f5d
    • Kyle Keating's avatar
      Update shared package · 4ac2b1b5
      Kyle Keating authored
      There was a version issue between the current installed version 1.4.0 and the local copy being using in the subfolder (/frontend-shared). The newest shared package exports an _index.scss file which is required by the client, but it was not formally importing a version of the shared package which exported the _index.scss file. The client now imports 1.9.0 which has _index.scss and now the frontend-shared folder can be fully removed from the client.
      
      TL;DR, This is just more reason to move the shared package to its own repo because this issue was being masked.
      4ac2b1b5
    • Robert Knight's avatar
      Fix clicking on PDF closing sidebar when side-by-side is active · f69f3803
      Robert Knight authored
      Fix a regression introduced in b52f00e0 where clicking in a PDF
      when side-by-side is active would cause the sidebar to close instead of
      remaining open. That PR made `PdfSidebar` no longer inherit (indirectly)
      from Guest but did not update the references to the `closeSidebarOnDocumentClick`
      property of the Guest.
      f69f3803
    • 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 3 commits
    • Robert Knight's avatar
      Update annotator toolbar CSS class names to match conventions · 243c06d3
      Robert Knight authored
      Rename CSS class names for `Toolbar` component to match the component itself.
      This component name is really overly generic but at least this brings
      the CSS and Preact components into line.
      
      One of the toolbar's classes was applied to a container element created
      by `ToolbarController`. This class has been moved to an element created
      by the `Toolbar` component for consistency. This means there is an
      apparently redundant (no styling, one child) container div when looking
      at the DOM structure for the toolbar + bucket bar. This will go away if
      the whole sidebar container is made into a single Preact component in
      future.
      243c06d3
    • Robert Knight's avatar
      Convert `AdderToolbar` CSS classes to current conventions · cdd0164f
      Robert Knight authored
      Rename all CSS classes used by the `AdderToolbar` component to follow
      the `Component__element--modifier` syntax that we use for other
      components. Also rename the `Adder.scss` file to match the Preact
      component name.
      cdd0164f
    • Robert Knight's avatar
      Suppress TS error about escape-string-regexp import · 59c8ead0
      Robert Knight authored
      This is not the correct solution, but as only one import is affected,
      this is a simple workaround with no effect on other code.
      59c8ead0