Visualize.Chart.Builder.Inspector (Visualize v0.8.1)

Copy Markdown View Source

The builder's inspector: Visualize.Chart.explain/1 rendered (spec/14 §18.9).

One row per leaf path of the stack, ordered by path, with the value, the layer that set it and the layers it overrode. It is a view of one function, so what it shows and what Visualize.Chart.stack/1 produces cannot drift (D-83). A row carries its path and the position of the layer that set it, so a click gets a person from a value they can see to the layer they must edit (D-87).

Its two limits are Visualize.Chart.explain/1's own: a value a higher layer discarded whole has no path in the result and so no row, and overrode names only the layers that wrote a value at the same path.

This module compiles only when Phoenix.Component is loaded (spec/10 §1.1, D-45, D-85).

Summary

Functions

Renders an element's look explained (spec/14 §18.9, §17.3, #686): one block per part of its resolved style — its value in brief, whether its kind draws it — and the part's chain of contributions, lowest first, each its layer of the precedence order, its container, its style and the names it was reached through, the field that chose it, the generators it was computed with, and the keys it set.

Renders the inspector (spec/10 §15.3).

Functions

look(assigns)

Renders an element's look explained (spec/14 §18.9, §17.3, #686): one block per part of its resolved style — its value in brief, whether its kind draws it — and the part's chain of contributions, lowest first, each its layer of the precedence order, its container, its style and the names it was reached through, the field that chose it, the generators it was computed with, and the keys it set.

Attributes

  • id (:string) (required) - the section's id.
  • look (:map) (required) - what Visualize.Chart.explain/2 answers for the element.
  • label (:string) - the node's label, as its heading. Defaults to nil.

panel(assigns)

Renders the inspector (spec/10 §15.3).

A <table class="vis-builder-inspector"> carrying BuilderHook, with one <tr class="vis-builder-entry"> per entry of Visualize.Chart.explain/1.

Attributes

  • id (:string) (required) - the hook element's id.
  • layers (:list) (required) - the layers, as Visualize.Chart.stack/1 takes them.
  • target (:any) - the phx-target of the panel's events. Defaults to nil.
  • class (:string) - appended to the panel's class. Defaults to nil.