1. 16 Feb, 2021 16 commits
  2. 15 Feb, 2021 7 commits
  3. 12 Feb, 2021 5 commits
    • Robert Knight's avatar
      Switch to using `<link>` elements for stylesheets in shadow DOM · 1d2eaf68
      Robert Knight authored
      When Shadow DOM was first considered for use in the client `<link
      rel="stylesheet">` was not widely supported as a way to load external styles into
      shadow roots. This was resolved in the spec in https://github.com/whatwg/html/pull/1572
      and has now long been supported by all browsers.
      
      Using `<link>` simplifies the code and also avoids a possible problem with sites
      that have a strict CSP policy that disallows inline styles. In the
      browser extension context a `<link>` can still work in that scenario as long as the
      stylesheet is loaded from a `chrome-extension://` URL.
      1d2eaf68
    • Robert Knight's avatar
      Move notebook container into shadow DOM · ff5918d6
      Robert Knight authored
      Follow the example of the `<hypothesis-sidebar>` element by making the
      `<hypothesis-notebook>` element an unstyled shadow-host which serves as
      the root container for the notebook, isolating it from the page's
      styles. Inside this is a styled element which serves as the visual
      container.
      
      As well as isolating the notebook from the host page's styles, this will
      also make it possible to avoid loading annotator styles into the host
      page. See https://github.com/hypothesis/client/issues/2979.
      
      To reduce resource usage a little when the notebook is not used, only
      the notebook's shadow host is created initially. The styled inner
      container is created when the notebook is shown for the first time.
      ff5918d6
    • Lyza Danger Gardner's avatar
      66cf493a
    • Eduardo Sanz García's avatar
      Removed unused click event · 963f5961
      Eduardo Sanz García authored
      The BucketBar component has a CSS property that disables click events
      (`pointer-events: none`). Hence, it is pointless to register a click
      event listener to the BucketBar.
      
      `pointer-events: none` was added to the BucketBar more than 6 years ago.
      963f5961
    • Eduardo Sanz García's avatar
      Update sidebar left margin when browser window is resized · ee2eca81
      Eduardo Sanz García authored
      Currently, if the client's sidebar is opened it doesn't behave
      graciously when the browser window is resized. Sometimes the sidebar
      appears floating on the middle of the window.
      
      We discussed several alternative solutions: when the sidebar is opened
      and the window is resized, then...
      
      1. close the sidebar and the user opens it manually
      2. maintain the sidebar open, but scale it properly
      3. close the sidebar and open it after X milliseconds of the last resize
         event
      4. close the sidebar if the width of the window is reduced, but
         maintain it open if the window's width is increased
      
      We implemented solution #2, because it gives a more consistent behaviour
      for both sidebars, PDF and non-PDF.
      
      In addition, I added a mechanism to register and unregister events, to
      avoid resource leaks.
      ee2eca81
  4. 11 Feb, 2021 5 commits
  5. 10 Feb, 2021 1 commit
  6. 08 Feb, 2021 6 commits