• 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
Name
Last commit
Last update
..
integration Loading commit data...
adder-test.js Loading commit data...
annotation-counts-test.js Loading commit data...
bucket-bar-client-test.js Loading commit data...
bucket-bar-test.js Loading commit data...
empty.html Loading commit data...
features-test.js Loading commit data...
frame-observer-test.js Loading commit data...
guest-test.js Loading commit data...
highlight-clusters-test.js Loading commit data...
highlighter-test.js Loading commit data...
notebook-test.js Loading commit data...
profile-test.js Loading commit data...
range-util-test.js Loading commit data...
selection-observer-test.js Loading commit data...
sidebar-test.js Loading commit data...
sidebar-trigger-test.js Loading commit data...
toolbar-test.js Loading commit data...