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:
Rendering annotations (like "show label for this point") can now be used as fields in tooltips. Previously, tooltips could only use data sent from the adapter.
{{#if}} blocks now support an {{#else}} branch. This makes it easier to write toggles like "show/hide".
0 values are no longer treated as truthy. This is because some adapters used 0 in the boolean sense and others in the numeric sense. The new is_numeric template function can be used for cases where meaning needs to be expressed more clearly.
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.
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:
{{#if}}
blocks now support an{{#else}}
branch. This makes it easier to write toggles like "show/hide".is_numeric
template function can be used for cases where meaning needs to be expressed more clearly.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.