Help popup — overlay showing all available keyboard shortcuts.
Renders the keyboard reference as a single ExRatatui.Widgets.Markdown
widget so the content is a plain markdown string (@help_markdown)
rather than 50+ hand-built Text.Line rows. Markdown handles section
headings, bullet lists, inline code (used for keybindings), and
scroll offsets natively.
Pure function — returns a Popup widget struct.
Summary
Functions
Returns the full markdown source rendered inside the popup. Exposed so callers (and tests) can introspect the help content without spinning up the widget tree.
Renders the help popup as a Popup widget with optional scroll offset.
Functions
@spec markdown() :: String.t()
Returns the full markdown source rendered inside the popup. Exposed so callers (and tests) can introspect the help content without spinning up the widget tree.
@spec render(non_neg_integer()) :: struct()
Renders the help popup as a Popup widget with optional scroll offset.
Examples
iex> %ExRatatui.Widgets.Popup{content: %ExRatatui.Widgets.Markdown{}} =
...> BB.TUI.Panels.Help.render(0)
iex> %ExRatatui.Widgets.Popup{content: %ExRatatui.Widgets.Markdown{content: md}} =
...> BB.TUI.Panels.Help.render(5)
iex> md =~ "## Global"
true