1. 06 Mar, 2020 4 commits
    • Robert Knight's avatar
      Remove obsolete TODO and unnecessary effect · 73e4a33b
      Robert Knight authored
      The adder toolbar used to set the `display` style property on its
      buttons to resolve an issue with a site that would add `display:none` to
      them. The linked issue no longer occurs, possibly because the use of
      Shadow DOM hides the buttons from `document.querySelectorAll(...)`.
      
      A timeout that was used to add/remove the `is-active` class from the
      toolbar appears to be unnecessary. The "grow and fade in" transition
      when the toolbar is shown works without it.
      73e4a33b
    • Robert Knight's avatar
      Convert adder toolbar to a Preact component · 56be74d7
      Robert Knight authored
      To enable us to take advantage of the UI tooling that we built for the
      sidebar app in the "annotator" part of the client (eg. components,
      linting, testing infrastructure), we're going to convert UI components
      in the "annotator" code over to Preact as well. As a first step, this
      commit converts the "adder" toolbar that presents the "Annotate" and
      "Highlight" buttons.
      
       - Extract the logic for creating a shadow DOM root for the adder into
         a separate module (`annotator/util/shadow-root.js`) so we can re-use it for other UI
         elements in future and remove Shadow DOM v0 support since Shadow DOM v1 has
         been available for a long time now.
      
       - Replace the `adder.html` template file, manual element manipulation
         and manual event listener setup with an `AdderToolbar` Preact
         component (`annotator/components/adder-toolbar.js`), which uses the same
         tooling as components in the sidebar app
      
      In this commit the tests for all the pieces of the adder are covered by
      `adder-test.js`. Future commits will split out tests for the individual
      pieces.
      56be74d7
    • Robert Knight's avatar
      0d0762bb
    • Robert Knight's avatar
      Merge pull request #1873 from hypothesis/remove-uuid-dependency · 59aba9de
      Robert Knight authored
      Replace two dependencies that are only used once
      59aba9de
  2. 05 Mar, 2020 7 commits
  3. 04 Mar, 2020 8 commits
  4. 03 Mar, 2020 11 commits
  5. 02 Mar, 2020 10 commits