1. 21 Jun, 2023 2 commits
  2. 19 Jun, 2023 12 commits
  3. 16 Jun, 2023 4 commits
    • Robert Knight's avatar
      Add a note about a scenario where the thresholds will be inappropriate · 82b176d0
      Robert Knight authored
      This function is used to scroll to the "nearest" highlight when clicking the
      top/bottom buckets in the bucket bar. This can likely be reimplemented in a
      simpler way in future that doesn't rely on knowing where the buckets are
      relative to the viewport. If instead we assume that all the passed-in anchors
      are off-screen, we could just scroll to the top/bottom one.
      82b176d0
    • Robert Knight's avatar
      Rename `bucketBarContainer` config to `bucketContainerSelector` · 839d44bf
      Robert Knight authored
      We have settled on this for the moment for consistency with
      `externalContainerSelector`, although the "Selector" suffix is a bit verbose,
      and this could be a problem if we want to support specifying an HTML element
      directly via JS config, rather than a selector.
      839d44bf
    • Robert Knight's avatar
      Fix flex direction for bucket bar container · aab247bd
      Robert Knight authored
       - Correct `flex-column` => `flex-col`
       - Make the `<hypothesis-bucket-bar>` flex-grow to fill its container
         vertically
       - Add a note about why we set `width: 100%`
      aab247bd
    • Robert Knight's avatar
      Support rendering bucket bar inside a custom container · 3dae6e1a
      Robert Knight authored
      Revise how the bucket bar rendering and bucket position calculations work to
      remove the assumptions about where the bucket bar will be rendered relative to
      the viewport. Then use this new flexibility to support a `bucketBarContainer`
      config option which allows the host page to specify a selector for an existing
      DOM element where the bucket bar will be rendered. The initial use case is the
      video player where we want to render the bucket bar alongside the transcript
      rather than the sidebar. In future this can support other use cases where the
      document content is in some scrollable container that doesn't fill the viewport.
      
       - Render bucket bar into its own shadow root, so its styles work when the
         bucket bar is rendered into a custom container.
      
       - Add `container` argument to `computeBuckets` helper, and compute bucket
         positions relative to this container instead of the viewport.
      
       - Remove the hard-coded knowledge in `computeBuckets` about the vertical
         toolbar above the bucket bar, and instead change the positioning of the
         default bucket bar container so that it is below the vertical toolbar at the
         edge of the sidebar.
      
       - Move the gray background behind the bucket bar out of the `Buckets` component
         and into a separate element rendered by the toolbar. This is needed so that
         the background is still displayed even if the bucket bar is rendered into a
         custom container.
      
         In the process of adding this separate element, tweak the layout so
         that the right edge of the buckets aligns with the right edge of
         the toolbar icons.
      
       - Add a `bucketBarContainer` config option which specifies a selector for an
         element to render the bucket bar into.
      3dae6e1a
  4. 15 Jun, 2023 4 commits
  5. 14 Jun, 2023 6 commits
  6. 13 Jun, 2023 2 commits
  7. 12 Jun, 2023 10 commits