1. 15 Mar, 2021 12 commits
  2. 12 Mar, 2021 4 commits
    • Robert Knight's avatar
      Optimize annotation fetch order in notebook · cd65d211
      Robert Knight authored
      Reduce the perceived loading time in the notebook by fetching
      annotations in, roughly, the reverse chronological order in which they
      are displayed.
      
      By default `SearchClient` fetches annotations by ascending creation
      date. This makes sense in the sidebar as it typically correlates,
      roughly, with the order in which the sidebar presents annotations by
      default (document location order). For the notebook however this is
      suboptimal.
      
       - Add `sortBy` and `sortOrder` options to `SearchClient` and
         `loadAnnotations` to control fetch order, with the defaults remaining
         the same as before (`created`, `asc`).
       - In `NotebookView` set `sortBy` to `updated` and `sortOrder` to desc
         to fetch annotations in reverse chronological order.
      cd65d211
    • Eduardo Sanz García's avatar
      Added utility to manage collection of listeners · 2a814392
      Eduardo Sanz García authored
      Following on @robertknight
      [suggestion](https://github.com/hypothesis/client/pull/3035#pullrequestreview-599668554)
      I created a tiny utility to make easier to unregister event listeners.
      2a814392
    • Robert Knight's avatar
      Simplify "no selectable text" banner styling · 5fbb3e20
      Robert Knight authored
      Avoid the need to customize various inline styles of the
      `<hypothesis-banner>` element by positioning it at the top of the DOM as
      the first child of `document.body`. As a result it naturally pushes the
      PDF.js UI down. The only change we need to make to PDF.js's UI is to adjust
      the size of the `#outerContainer` element so that it does not overflow the
      bottom of the viewport.
      
      Aside from making styling simpler, making the banner's DOM position
      better match its visual position may help with reading order for screen readers.
      Related to this the banner is currently missing useful semantic
      information for a11y purposes.
      
      I also removed the banner resizing handling for the moment on the basis that it
      isn't that important.
      5fbb3e20
    • Robert Knight's avatar
      Move "no selectable text" warning banner into shadow DOM · 15eb9ec1
      Robert Knight authored
      For consistency with the rest of the UI elements rendered by the
      annotator code, move the warning banner at the top of the PDF into
      shadow DOM. This is also another step towards not needing to load any
      global CSS (eg. our CSS reset) into the host page.
      
       - Change the container element for the banner from `<div>` to
         `<hypothesis-banner>` to match other `<hypothesis-*>` UI container
         elements
       - Move the `WarningBanner` component into `components/WarningBanner.js`
         and rename the CSS classes to match
      15eb9ec1
  3. 10 Mar, 2021 2 commits
  4. 09 Mar, 2021 8 commits
  5. 08 Mar, 2021 14 commits