How a component joins Issho: the same issho option in every
component (Kotoba's editor, Hakushi's canvas, Masu's grid, yours), so an
app writes it once and it means the same everywhere.
<.kotoba issho={[instance: MyApp.Issho, document: "page:1/body"]} user={@user} />
<.canvas issho={[instance: MyApp.Issho, document: "page:2"]} user={@user} />
<.data_grid issho={[instance: MyApp.Issho, document: "page:3/rows"]} user={@user} />The keys:
:instance(required): your Issho instance,MyApp.Issho.:document(required): the document the component shows. Its room is the part before the first"/"("page:1/body"is in"page:1"), so the components of a page whose documents share a room share its people, and a pointer goes from one to the other.:can::write(the default) or:read, what the person may do here; your policy is asked as well.:people: whether the component shows the room's people itself (true);falseon a page that shows Issho's list (Issho.Components.people/1).:follow: whether the component takes part in following (true);false, and it follows no one and shows no one followed, though the room's other components do.:on_behalf_of: the person an actor acts for (an agent's person).:claims: what your policy needs to know of the actor, signed in its grant.
A component takes its own options besides these (Kotoba's :undo), and
says which with new!/2's extra; any other key is an error, so a
typo does not go unnoticed. The person is the component's user, as
Issho.Actor says them.
Summary
Functions
The options of Issho.Live.grant/4 and Issho.Live.join/4 for the
person: :can, :claims and :on_behalf_of.
The options of a component's issho, checked: a keyword list (or a
map), and extra, the keys of the component's own options. Raises
ArgumentError for a missing, unknown or invalid key.
Types
Functions
The options of Issho.Live.grant/4 and Issho.Live.join/4 for the
person: :can, :claims and :on_behalf_of.
The options of a component's issho, checked: a keyword list (or a
map), and extra, the keys of the component's own options. Raises
ArgumentError for a missing, unknown or invalid key.