Content-level email preview pickers with always-visible scenario groups and
status badges. picker/1 renders the full browse directory for the preview
index; menu/1 renders the compact document-selector control for individual
preview pages.
Branches on the second element of each
{mod, reflection} tuple from MailglassAdmin.Preview.Discovery.discover/1:
list when is_list(list)— healthy mailable; render a static group label with scenario links. Active scenario gets a Glass left border; inactive getsborder-transparent+ hover state.:no_previews— stub mailable; shows the literal copy "No previews defined" per UI-SPEC Copywriting Contract line 457.{:error, _}— preview_props/0 raised during discovery; shows a warning badge (viaMailglassAdmin.Components.badge/1).
Boundary classification: submodule auto-classifies into the
MailglassAdmin root boundary.
Summary
Functions
Renders a compact grouped menu for switching the current email preview.
Renders the email preview picker.
Absolute /<mount>/<Mailable>/<scenario> path (no query string).
Functions
Attributes
mod(:atom) (required)reflection(:any) (required)current_mailable(:atom) - Defaults tonil.current_scenario(:atom) - Defaults tonil.device_width(:integer) - Defaults to768.admin_chrome_theme(:atom) - Defaults tonil.mount_path(:string) - Defaults tonil.
Renders the email preview picker.
mailables is the list of {module, reflection} tuples produced by
MailglassAdmin.Preview.Discovery.discover/1. current_mailable and
current_scenario drive the active-item highlight.
Attributes
mailables(:list) (required)current_mailable(:atom) - Defaults tonil.current_scenario(:atom) - Defaults tonil.device_width(:integer) - Defaults to768.admin_chrome_theme(:atom) - Defaults tonil.mount_path(:string) - Defaults tonil.testid(:string) - Defaults to"preview-mailables-picker".
Absolute /<mount>/<Mailable>/<scenario> path (no query string).
Shared by the sidebar links and PreviewLive's start-page deep link so
both build identical, mount-aware URLs. mount_path is the absolute base
the admin surface is mounted at (/dev/mail, /admin/preview, …) as
recovered by MailglassAdmin.MountPath.base/1.