# `MishkaCmsCoreWeb.Templates.StudioTokens`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core_web/templates/studio_tokens.ex#L5)

A MishkaGervaz custom table template: the Design tokens list inside the page builder's Studio.

It owns the whole of the list and nothing around it. The tab's heading, the export-format tabs and
the export block below stay in `MishkaCmsCoreWeb.Live.Admin.Builder.Panels` — they are not a table.

`features/0` is empty on purpose: the Studio is a 480px sheet, and Gervaz's own filter bar,
selection checkboxes and pagination footer would each be a control the design does not have. The
category chips ARE Gervaz filters, but drawn here in the sheet's own idiom and pushed as the
table's own `filter` event; the load-more button is drawn here too, for the same reason.

The rows come from `@state.loaded_records` rather than from the stream, because the design groups
them under category headings and a stream is one flat container that appends — it cannot express a
heading. That is what `keep_loaded_records true` on the resource is for: Gervaz keeps every loaded
page, so its own `load_more` event works for a grouped list exactly as it does for a flat one.

The category chips' counts arrive in `path_params` already computed, because they count the WHOLE
token set and the whole set is a 33 ms parse of the site's stylesheets — a cost worth paying once
per revision in the LiveView, not once per render here.

## The one `style` attribute left, and why

A category heading's dot is one of seven colours `Panels.grouped_tokens/2` hands over, so
`dot_class/1` spells each out and the attribute is gone — CSP has no nonce for an attribute, so
`style-src-attr` can only be closed by there being none.

The plain swatch beside a token cannot follow. Its colour is `@token.value`, a declaration read out
of whatever stylesheet the site's theme happens to be — any hex, `oklch(…)`, a gradient, a
`var(--x)` — so there is no finite set to write out and none to declare with `@source inline`
either. It stays an attribute until the swatch can be given a rule of its own in a nonced `<style>`,
which needs a nonce this template is not handed.

See `MishkaCmsCore.Runtime.PageBuilder.DesignToken`, which points its `presentation` here.

# `render_bulk_actions`

# `render_empty`

# `render_error`

# `render_filters`

# `render_header`

# `render_pagination`

# `render_template_switcher`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
