The optional callbacks of a surface (use Alternera.Resource.UI, :surface), for one offered as a Workbench item: the Workbench calls them
as it calls its own item types.
load/2runs when the tab opens and when a reload restores it, with theargthe tab was opened on; what it returns is the component'sstateassign until the tab closes. Without itstateis nil.title/1names the tab from that state; without it the tab takes the declaration's label.request_close/1: the tab asks before it closes;{:ask, question}keeps it open with the question shown (unsaved work).
Summary
Callbacks
@callback load(arg :: String.t() | nil, Alternera.Resource.UI.Context.t()) :: {:ok, term()} | {:error, String.t()}