Tags: higlass/higlass-python
Tags
Render HiGlass viewer inside Shadow DOM (#208) * Render HiGlass viewer inside Shadow DOM HiGlass v2.2.2 exports its CSS as `hglib.CSS`, which lets us encapsulate viewer styles using the Constructable Stylesheets API and a Shadow DOM. This prevents HiGlass styles from leaking into (or being affected by) the host notebook environment. The wheel event handler now also calls `preventDefault()` in addition to `stopPropagation()`. With the shadow DOM boundary, `stopPropagation()` alone wasn't sufficient to prevent page scrolling in marimo since composed events cross the shadow boundary. * Upgrade to higlass v2.2.3 for type export fix * Fix type checking and linting * ci: Upload smoke test failure screenshot as artifact * Fix smoke test to check shadow root children --------- Co-authored-by: Nezar Abdennur <nabdennur@gmail.com>
feat(widget): Batch tile requests within an animation frame (#181) * feat(widget): Batch tile requests within an animation frame HiGlass's built-in data fetching logic is designed to optimize API calls by consolidating requests based on time, ID, and server. Our custom Jupyter data fetcher doesn't include these optimizations. This PR introduces a `consolidator` helper, which performs a much simpler form of batching. Since we assume a single server, this function only batches tile requests that occur within the same animation frame and submits them together. This helps reduce the number of comms calls and deduplicates requests efficiently. Initial testing suggests it feels quite responsive! * Add `MAX_TILES_PER_REQUEST` const * Use `Promise.withResolvers` * Remove chunkIterable for now
PreviousNext