# `MishkaCmsCoreWeb.UIAdapters.Review`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core_web/ui_adapters/review.ex#L5)

The UI adapter for the builder's Review panel — the editor's own look, over Gervaz's behaviour.

## The two axes, and which one this is

Gervaz separates them deliberately: a **template** decides WHERE things go, an **adapter** decides
HOW they look. `MishkaCmsCoreWeb.Templates.ReviewComments` and `…ReviewCommentForm` are the
templates; this is the paint. Splitting them is what lets the Review panel look like the editor
rather than like an admin table dropped into a sidebar, without either one reimplementing what
Gervaz already does.

## Fallback is the point

`use MishkaGervaz.Behaviours.UIAdapter, fallback: …` emits a `defdelegate` for every one of the
~90 components in the behaviour and then lets this module override any of them. Everything not
written here — every input type, every upload control, every pagination button, the empty state,
the spinner — is `MishkaGervaz.UIAdapters.Tailwind`'s, unchanged, and starts working the day the
Review panel starts using it.

So the list below is not "the components Review needs". It is "the components whose stock version
looked wrong in a 360px sidebar":

  * `badge/1` — the type and status chips. The stock badge is a table cell's; these are the
    editor's own chip idiom, and the type has to be legible at a glance because the counter
    counts one of them.
  * `textarea/1` and `select/1` — the composer's two fields, at the editor's control height and
    radius rather than a form page's.
  * `button/1` — the editor's buttons, and the reason `MishkaCmsCoreWeb.UIAdapters.Admin` has one
    too: the fallback renders any icon name that is not a heroicon as an empty span.
  * `empty_state/1` — the sheet is 360px wide; the stock empty state is built for a page.

Add to this list only when the stock version is genuinely wrong here. Every override is a piece of
Gervaz that stops improving on its own.

A chip's colour arrives as a whole class from `tone_classes/1` rather than a `style` attribute:
CSP has no nonce for an attribute, so the policy in
`MishkaCmsCore.Runtime.Plugs.SecurityHeaders` can only close `style-src-attr` by there being none.
Each tone is written out per clause because Tailwind reads source text — an interpolated class name
gets no rule at all, which is what `MishkaCmsWeb.InterpolatedClassTest` guards.

# `alert`

# `archive_toggle`

# `array_fields`

# `badge`

A type or status chip, in the editor's chip idiom rather than a table cell's.
## Attributes

* `label` (`:string`) - Defaults to `nil`.
* `variant` (`:atom`) - Defaults to `:tag`.
* `dot` (`:boolean`) - Defaults to `false`.
* `class` (`:string`) - Defaults to `nil`.
* Global attributes are accepted.

# `bulk_action_bar`

# `bulk_action_button`

# `button`

A Review button.

The same reason `MishkaCmsCoreWeb.UIAdapters.Admin` carries one: the fallback renders any icon
name that is not a heroicon as an empty span, and the label has to reach the DOM either way.

## Attributes

* `label` (`:string`) - Defaults to `nil`.
* `class` (`:string`) - Defaults to `nil`.
* `type` (`:string`) - Defaults to `"button"`.
* `icon` (`:string`) - Defaults to `nil`.
* `variant` (`:atom`) - Defaults to `:default`.
* Global attributes are accepted. Supports all globals plus: `["phx-click", "phx-target", "phx-value-id", "phx-value-event", "phx-value-values", "data-confirm", "disabled"]`.

# `cell_array`

# `cell_avatars`

# `cell_bars`

# `cell_code`

# `cell_date`

# `cell_datetime`

# `cell_empty`

# `cell_number`

# `cell_stacked`

# `cell_stats`

# `cell_tags`

# `cell_text`

# `checkbox`

# `combobox`

# `copy_button`

# `date_input`

# `date_range_container`

# `datetime_input`

# `dropdown`

# `empty_state`

Nothing here yet, at sidebar width — the stock one is built for a page.
## Attributes

* `message` (`:string`) - Defaults to `nil`.
* `icon` (`:string`) - Defaults to `nil`.
* `class` (`:string`) - Defaults to `nil`.
* Global attributes are accepted.

# `error_state`

# `field_error`

# `field_group`

# `field_wrapper`

# `filter_reset_button`

# `form_container`

# `form_footer`

# `form_header`

# `icon`

# `json_editor`

# `load_more_select`

# `loading_state`

# `multi_select`

# `nav_link`

# `nested_fields`

# `number_input`

# `pagination_container`

# `pagination_nav_button`

# `pagination_page_button`

# `password_input`

# `range_input`

# `search_select`

# `select`

What kind of note it is. Short list, so a plain select rather than a search.
## Attributes

* `field` (`:any`) - Defaults to `nil`.
* `name` (`:string`) - Defaults to `nil`.
* `value` (`:any`) - Defaults to `nil`.
* `options` (`:list`) - Defaults to `[]`.
* `label` (`:string`) - Defaults to `nil`.
* `prompt` (`:string`) - Defaults to `nil`.
* `required` (`:boolean`) - Defaults to `false`.
* `disabled` (`:boolean`) - Defaults to `false`.
* `class` (`:string`) - Defaults to `nil`.
* `errors` (`:list`) - Defaults to `[]`.
* Global attributes are accepted.

# `spinner`

# `step_indicator`

# `step_navigation`

# `string_list_input`

# `table`

# `table_header`

# `td`

# `template_switcher`

# `template_switcher_button`

# `text_input`

# `textarea`

The note itself. One field, at the editor's control height.
## Attributes

* `field` (`:any`) - Defaults to `nil`.
* `name` (`:string`) - Defaults to `nil`.
* `value` (`:any`) - Defaults to `nil`.
* `label` (`:string`) - Defaults to `nil`.
* `placeholder` (`:string`) - Defaults to `nil`.
* `rows` (`:any`) - Defaults to `3`.
* `required` (`:boolean`) - Defaults to `false`.
* `disabled` (`:boolean`) - Defaults to `false`.
* `readonly` (`:boolean`) - Defaults to `false`.
* `class` (`:string`) - Defaults to `nil`.
* `errors` (`:list`) - Defaults to `[]`.
* Global attributes are accepted.

# `th`

# `toggle_input`

# `tr`

# `upload_dropzone`

# `upload_existing_file`

# `upload_file_input`

# `upload_preview`

# `upload_progress`

---

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