statgen / locuszoom

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

Template enhancements: annotations and if/else blocks #238

Closed abought closed 3 years ago

abought commented 3 years ago

Ticket: #215

Purpose

Many tooltips provide interactive controls (make LD reference, show/hide label, etc).

We would like these controls to better reflect the current state of the system. This consists of three pieces:

Breaking changes

Numeric values (0) are no longer special-cased to be truthy; this subtly bent the rules of javascript in ways that were not always the best choice for all use cases.

Instead, numeric fields should use {{#if value|is_numeric}} as a truthiness test, when they want to show an optional field whose value might be 0.