ScoriaWeb.DashboardNav (scoria v0.1.2)

Copy Markdown View Source

Information architecture for the Scoria dashboard: the task-oriented navigation model (GOV.UK style — grouped by operator job, not by schema) and the on_mount hook that marks the active nav item per LiveView.

Nav items point only at routes that exist. Paths are resolved relative to the dashboard mount prefix at render time (see app.html.heex), so the shell works under any mount path.

Summary

Functions

Active nav key for a LiveView module.

Active nav key for a LiveView module and route params.

Command palette sections derived from the dashboard navigation source of truth.

Nav groups for the sidebar.

on_mount hook: assigns :scoria_nav (active key) and :scoria_base (mount prefix) so the shell can render active state and absolute links regardless of mount path.

Lookup coming-soon nav key by slug.

Lookup coming-soon metadata by slug.

Allowlisted coming-soon screens from the nav source of truth.

Functions

active_key(view)

Active nav key for a LiveView module.

active_key(view, arg2)

Active nav key for a LiveView module and route params.

command_sections(base_path)

Command palette sections derived from the dashboard navigation source of truth.

groups()

Nav groups for the sidebar.

on_mount(atom, params, session, socket)

on_mount hook: assigns :scoria_nav (active key) and :scoria_base (mount prefix) so the shell can render active state and absolute links regardless of mount path.

stub_key_for_slug(slug)

Lookup coming-soon nav key by slug.

stub_screen(slug)

Lookup coming-soon metadata by slug.

stub_screens()

Allowlisted coming-soon screens from the nav source of truth.