1. 18 Jan, 2021 3 commits
    • Robert Knight's avatar
      Use router as source of truth for whether app is sidebar or not · b74c351d
      Robert Knight authored
      Previous commits updated the router service to enable it to correctly
      set the route from the initial path in the browser extension. However
      some parts of the client still behaved as if they were the sidebar in
      the notebook view because there was a second path => route mapping in
      `src/sidebar/index.js`.
      
      This commit replaces that with `store.route()` everywhere which is the
      route determined by the router service.
      
      This fixes an issue where launching the notebook app in the browser
      extension resulted in a "second Discovery server" error in the console.
      b74c351d
    • Robert Knight's avatar
      Load notebook view correctly in extension · 93011153
      Robert Knight authored
      When the app launches the `router` service sets the initial route based
      on the path. When the notebook view is loaded from the extension the
      path is `/client/notebook.html` rather than `/notebook`.
      
      Fixes https://github.com/hypothesis/client/issues/2866
      93011153
    • Robert Knight's avatar
      Use a custom HTML tag for the notebook's outermost element · 4fadfe13
      Robert Knight authored
      Using a generic `<div>` can result in the notebook being positioned
      incorrectly or otherwise receiving undesirable styling on pages with
      very generic selectors. For example https://example.com.
      
      Using a custom tag name reduces the risk and we already do this for
      various other UI elements in the annotator part of the app.
      
      We can protect the contents of the outermost element using Shadow DOM,
      but the outermost element itself will always be subject to the page's
      styles.
      4fadfe13
  2. 15 Jan, 2021 1 commit
  3. 14 Jan, 2021 1 commit
    • Lyza Danger Gardner's avatar
      Refine design and loading state for `NotebookResultCount` · d8f60754
      Lyza Danger Gardner authored
      Redesign the results count for the notebook to better handle its
      behavior when loading (sometimes large) sets of annotations.
      
      Previously, the annotation count used the `visibleCount` store method,
      which returns a count of annotations that are visible on-screen. While
      loading, use the service's reported `total` value to show the number of
      annotations that will be visible once loading is complete.
      
      Do not show thread count while loading, as this cannot be determined
      until all annotations are present and threaded.
      
      Fixes #2864
      d8f60754
  4. 13 Jan, 2021 3 commits
    • Lyza Danger Gardner's avatar
      Adjust UI for sharing annotations on non-shareable documents · 53b33217
      Lyza Danger Gardner authored
      In both the share-this-annotation and share-this-page's-annotations
      components, provide a UI path for when the annotation's URI or the
      page's URI (respectively) are not web-available. That is, to be
      "shareable in context", the URI in question needs to have an
      `http:` or `https:` protocol.
      
      For "share this page's annotations" when the page is not web-accessible,
      explain why the page's annotations can't be shared in context and don't
      provide a sharing link, as it won't work.
      
      For "share this annotation," when the annotation's URI (document) isn't
      web-accessible, provide some explanatory text about how it can't be
      shared in-context, but provide a link to the single-annotation view,
      when available.
      
      These changes are intended to avoid confusion when users try to share an
      annotation or a set of annotations that have been made on a local
      (e.g. PDF) document.
      
      Some SCSS patterns have also been adjusted to accommodate more flexible
      styling of the share-single-annotation panel. The width of the compact
      panel pattern has been increased slightly so that the new wording
      variant for not-shareable-in-context single annotations doesn't risk
      taking up too much vertical space.
      
      Fixes #2786
      53b33217
    • Lyza Danger Gardner's avatar
      3a7c1157
    • Lyza Danger Gardner's avatar
      Add typing utility module · 488664af
      Lyza Danger Gardner authored
      Add a typing utility module with a helper function to "cast" the input
      so that TS understands that it is not null/undefined. This is useful
      in situations where logic would prevent a reference from being empty
      but TS can't follow that logic.
      488664af
  5. 11 Jan, 2021 6 commits
  6. 08 Jan, 2021 2 commits
  7. 04 Jan, 2021 10 commits
  8. 28 Dec, 2020 1 commit
  9. 26 Dec, 2020 3 commits
  10. 21 Dec, 2020 4 commits
  11. 18 Dec, 2020 6 commits