What a slot asks of its request (spec/05 §3): its order, whether the window reaches it,
and how its rows may be reduced. The host builds the request (macaw spec/06 §3.5): its
params from the binding, its window from window, its budget from budget/4 under the
ceiling; the Frame says only these. Copied from visualize's
Visualize.Board.Budget.reducer/2; its board-wide feed_reducers/2 and the board's
window resolution (Visualize.Board.window/2) are the host's here.
- Order (
order/3, §3.1): a slot whose layer's steps begin with asortfollowed by atakeasks for that order, its field as a role,[{{:role, field}, direction}], so a delivery capped at the budget holds the rows the layer shows. Atakeof the first rows (side: :start) asks the sort's direction, atakeof the last rows its reverse. Two layers on one slot asking different orders answer the first layer's in document order; any other slot answers[], the source's own order. - The window (
windowed?/1, §3.2) is state, never the Frame's: a slot whose source's schema has a:timewindow field carries the surface'swindowin its request, any other ignores it. The Frame reads the window only as its deliveries carry it (served.window). - The reducer (
reducer/4,reducer/5, §3.3), the most demanding layer deciding::nonewhen any layer reads the slot whole,{"m4", w}when any layer is continuous (wthe widest such layer's plot width in device pixel columns), elsenil, the host's default ("lttb").
Each answers every input: settings whose document does not compile, and a slot no layer
reads, answer [], false or nil.
Summary
Functions
The order a slot asks for (§3.1): [{{:role, field}, :asc | :desc}] for a layer whose
steps begin with a sort then a take, the first such layer in document order; []
otherwise. Read from the document alone, at no size.
How a slot's rows may be reduced at size, in CSS pixels (§3.3): :none, {"m4", w} or nil.
How a slot's rows may be reduced at size in context (§3.3, §2.5): as reducer/4,
w counted in device pixel columns by context.ratio. A number in place of the
context is the ratio.
The slots a layer of the settings' document reads (§3), each once: what a host asks
order/2, budget/4 and reducer/4 for.
Whether the surface's window reaches a slot bound to a source of schema (§3.2): its
window field is a :time field. A schema with a :number or :point window field, or
none, ignores window until the standard window is widened (spec/01 §9).
Functions
@spec order(term(), term(), map()) :: Macaw.Component.order()
The order a slot asks for (§3.1): [{{:role, field}, :asc | :desc}] for a layer whose
steps begin with a sort then a take, the first such layer in document order; []
otherwise. Read from the document alone, at no size.
@spec reducer(term(), term(), term(), map()) :: Macaw.Component.reducer()
How a slot's rows may be reduced at size, in CSS pixels (§3.3): :none, {"m4", w} or nil.
How a slot's rows may be reduced at size in context (§3.3, §2.5): as reducer/4,
w counted in device pixel columns by context.ratio. A number in place of the
context is the ratio.
The slots a layer of the settings' document reads (§3), each once: what a host asks
order/2, budget/4 and reducer/4 for.
Whether the surface's window reaches a slot bound to a source of schema (§3.2): its
window field is a :time field. A schema with a :number or :point window field, or
none, ignores window until the standard window is widened (spec/01 §9).
iex> schema = Macaw.Data.Schema.new!(%{t: %{type: :time, window: true}})
iex> {Macaw.Frame.Requests.windowed?(schema), Macaw.Frame.Requests.windowed?(nil)}
{true, false}