API Reference MailglassAdmin v#0.3.2

Copy Markdown View Source

Modules

Mountable LiveView dashboard for mailglass. Dev preview at v0.1; prod admin at v0.5.

Brand-book-aligned shared UI atoms used throughout mailglass_admin.

Compile-time asset server for the mailglass_admin preview dashboard.

Gateway for the optional {:phoenix_live_reload, "~> 1.6"} dep (CONTEXT D-24, dev-only).

Type-inferred assigns form per 05-UI-SPEC §"Assigns form — type-inferred fields" (lines 354-368) + 05-RESEARCH.md lines 1470-1571.

Device-width segmented control: three buttons (375 / 768 / 1024) that drive the iframe's inline width style per 05-UI-SPEC lines 267-280.

Reflection for mailable modules — finds use Mailglass.Mailable modules, reads their preview_props/0 callback if present, and returns the pair ready for the preview dashboard sidebar.

on_mount hook the Router macro appends after any adopter-provided :on_mount hooks. Reads the whitelisted session "mailables" value populated by MailglassAdmin.Router.__session__/2 and runs discovery before MailglassAdmin.PreviewLive.mount/3 fires.

Sidebar function component: mailable list with collapsible scenario groups + status badges.

Tabs function component: HTML · Text · Raw · Headers tab strip plus the matching content pane per 05-UI-SPEC lines 220-228 + 294-352.

The single dev-preview LiveView surface (PREV-03..PREV-05).

Typed topic builder for mailglass_admin PubSub broadcasts. Every topic is prefixed mailglass: — Phase 6 LINT-06 PrefixedPubSubTopics (see the forthcoming check in the core mailglass package) enforces the prefix at lint time. The prefixed shape matches Mailglass.PubSub.Topics in the core library; the two modules intentionally share the convention so adopter telemetry handlers can pattern-match on a single namespace.

Dev-only preview dashboard mount.

Mix Tasks

Compiles mailglass_admin/assets/css/app.css to mailglass_admin/priv/static/app.css via the tailwind Hex package — zero Node toolchain required.

Runs Tailwind in --watch mode. Recompiles priv/static/app.css on every save to assets/css/app.css or any HEEx source under lib/mailglass_admin/.

Curls the latest daisyui.js + daisyui-theme.js from the daisyUI GitHub releases page and writes them to assets/vendor/. Prepends a pin-comment with today's date + the source URL for CHANGELOG traceability per CONTEXT D-22.