Module mentions
Expand description
Mentions as a workspace fact: who a record’s rich text names, read from the record itself, and the one notice each mentioned reader gets.
A mention is a run of rich text marked mention with the participant’s id, whichever app wrote
it: a paragraph of a note (an Automerge text mark, as tilo-doc keeps them) or a block of a
chat message (a stored mark span, as tilo_document::ClipBlock keeps them). in_record finds
every one without the app’s code, so whatever holds the record derives the same facts from what
it was sent; only the record’s readers are sent it, so only they learn of a mention. A notice’s
excerpt reads each reference as it reads for the person told (Look::read).
Where a mention is is the item of the record it was written in, as the app publishes it
(<kind>/<field>/<id>, tilo_resource::items); opening that resource is what opening the
mention means.
MentionInbox turns the facts into notices for one person: one per place, never for their
own mention, quietly taken for what they were looking at when it arrived, withdrawn when the
mention is edited away, and never again once told.
Structs§
- Look
- A record as an inbox looks at it.
- Mention
- One mention in a record: who is named, by whom, and where.
- Mention
Inbox - The notices of one person’s mentions, on one device: what was told is
kept (
Self::told_state) so nothing is told twice. - Notice
- One notice for the person: what the host shows, and where it opens.
- Place
- Where a mention opens: the app’s resource, in its record.
- Told
- What one look at a record changed: notices to show, and the tags of those whose mention is gone.
Constants§
- MARK
- The mark a mention’s run carries, valued with the participant’s id.
The same mark refers to any other resource (
names_resource): those are references, not people, and tell nobody. - SCHEME
- The activation scheme a mention’s notice carries.
Functions§
- chain_
of - The route of the chain whose part the record
routenames (RecordId::part): empty for a part of the app’s own record. - in_
record - Every mention in
doc, in document order, each excerpt read for someone whose holdings nobody here can tell (reading_nothing). - in_
record_ for - Every mention in
doc, in document order, each excerpt asreadreads the references in it. - names_
resource - Whether a
mentionmark’s value names a resource rather than a person, in any form it was written in (tilo_reference::embed). - reading_
nothing - What reads a reference for someone whose holdings nobody here can tell: a person as the text names them, every resource as not shared. A reference never grants a read.
Type Aliases§
- Reader
- How a reference in the text reads for the person told
([
tilo_reference::embed::Reading]): a resource they hold by what it is called now, one they cannot read as not shared.