statgen / locuszoom

A Javascript/d3 embeddable plugin for interactively visualizing statistical genetic data from customizable sources.
https://statgen.github.io/locuszoom/
MIT License
156 stars 29 forks source link

Revamp height and sizing logic #225

Closed abought closed 3 years ago

abought commented 3 years ago

💣 This is a work in progress pull request. It removes or changes several height and sizing related properties. These properties are tightly coupled, and the revised schema should not be depended on until the final version is merged. This ticket exists to provide an easily visible diff for developer reference.

Ticket

216

Purpose

The logic that governs height and sizing of panels in LocusZoom is complex, containing artifacts of several features that were either buggy or not ever implemented. (eg proportional origin, width, height). This makes it confusing to add or resize panels, especially when customizing premade layouts or adding content dynamically after first render.

This PR is intended to clean up the height and sizing logic by providing a smaller number of better defined options, and removing dead or unused code.

We will continue supporting responsive horizontal resize, but remove much of the "magic" behavior around height logic.

Summary of changes

Remove unused properties:

Remove properties that were commonly used, but with minimal direct impact, in order to simplify the height API:

Possibly breaking change:

After an audit of projects that use LocusZoom.js, almost no direct usages of proportional_height were found. Consequently, no explicit compatibility shim has been provided.

There may be small display artifacts for sites that used plot.height directly, but due to the nature of these as bugs, a direct compatibility layer would be tricky. Instead we will notify via release notes.