The comments list: one full-width row per comment, stacked.
Declared only by MishkaBlog.Comment, and it reads that record directly rather than by column
position. It is MishkaBlogWeb.Templates.PostCard for a different record — same row shape, same
chrome, same breakpoints — because a comment queue and a post queue are read the same way: who,
where, what they said, and what you can do about it.
Which post a comment is on
Only one of :post and :master_post is ever loaded — the resource preloads the tenant
relationship for a tenant admin and the tenancy-bypassing one for a master. The other comes back
as %Ash.NotLoaded{}, which is truthy, so post/1 picks whichever is actually a record rather
than testing for nil.
Features
:filter- the labelled filter row: search, site, status, post, with Pinned as a switch:select- per-row selection for bulk operations:bulk_actions- bulk actions on the selected rows:paginate- the page-size picker and Load more under the list
The furniture is MishkaCmsCoreWeb.Templates.CardChrome and the controls are
MishkaCmsCoreWeb.UIAdapters.Admin, both shared with every other admin card page.
Summary
Functions
Who wrote the comment, for the reader whose read loaded it.
The switcher draws the grid-of-squares glyph, identical to every other blog card page.
The two letters the avatar tile shows for an author.
The title of the post a comment sits under.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_bulk_actions/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_empty/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_error/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_filters/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_header/1.
One comment row.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_pagination/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_template_switcher/1.
How a comment's moderation status reads and what colour it wears.
The avatar tint, picked from the record's id so it never flickers between renders.
Functions
Who wrote the comment, for the reader whose read loaded it.
The author's email when the reader may see it. For a master, the name of its blogger profile on
the comment's site, else "Master". "Guest" for a comment written signed out, "Unknown" for an
author the reader's read did not return. Load :author, :author_profile and :author_master?.
The switcher draws the grid-of-squares glyph, identical to every other blog card page.
The two letters the avatar tile shows for an author.
The title of the post a comment sits under.
Only one of :post and :master_post is loaded, so this finds whichever came back as a record —
an unloaded relationship is a %Ash.NotLoaded{} struct, which is truthy and would otherwise win.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_bulk_actions/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_empty/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_error/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_filters/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_header/1.
One comment row.
The comment's text is the row's subject, so it gets two lines rather than the one a post excerpt gets — a moderator decides from the words, not from the metadata around them.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_pagination/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_template_switcher/1.
@spec status_badge(map()) :: %{ label: String.t(), chip: String.t(), mark: String.t(), mark_tone: String.t() }
How a comment's moderation status reads and what colour it wears.
One entry per value of the status attribute, falling back to :pending — the attribute's own
default, and the state an unrecognised comment should be treated as.
The avatar tint, picked from the record's id so it never flickers between renders.