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

A MishkaGervaz custom table template: the list of drafts inside the page builder's Versions sheet.

It is the third block of `MishkaCmsCoreWeb.Live.Admin.Builder.Panels.drafts_sheet/1` — the rows,
their skeleton and their empty state. The "Save as" form and the name-collision banner above it are
not a table and stay in `Panels`.

The template owns the whole list and nothing else: no filter bar, no selection, no pagination
footer (`features/0` is empty), because the sheet is 420px wide and the read is capped at one
document's drafts. Its row buttons deliberately carry no `phx-target`, so `open_draft`,
`fork_draft` and `delete_draft` reach `MishkaCmsCoreWeb.Live.Admin.Builder.BuilderLive`, which owns
the editing session those events move.

Which row reads as "Editing" is not a property of the row — it is the editor's save target — so it
travels in `path_params[:editing_draft_id]`, the same channel the scoping `source_*_id` uses.

See `MishkaCmsCore.Runtime.PageDraft`, `MishkaCmsCore.Runtime.LayoutDraft` and
`MishkaCmsCore.Runtime.ErrorPageDraft`, which point their `presentation` here.

# `render`

The list: skeleton while the read is out, one row per draft, and the empty state when there are
none.

The stream container is `display: contents` so the rows stay flex children of the `gap-1.5`
column, and the empty state is a sibling of it rather than a child, because it is driven by
`@empty?` (loaded AND zero rows) — "no drafts" and "not yet known" are different answers and the
sheet gives neither one's markup to the other.

# `render_bulk_actions`

# `render_empty`

# `render_error`

# `render_filters`

# `render_header`

# `render_item`

One draft: open it, copy it, throw it away.

The row the editor is pointed at is marked four times over — border, tile, title weight and the
"Editing" pill — because a single background tint is not enough to answer "where does the next
save go" at a glance.

# `render_loading`

The skeleton drawn before the table has any state of its own.

It takes none of the table's assigns, because at this point there are none — `@static` and
`@state` do not exist until the first load.

# `render_pagination`

# `render_template_switcher`

---

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