Something went wrong

Thank you for being patient! We're working hard on resolving the issue

Tasks - Lona Docs Log in

Tasks Templates

Tasks span two related templates:

  • task — a top-level alias users add to a sheet. Wraps a single task-list alias scoped to a connected provider account.
  • task-list — the heart of the tasks surface. Renders a multi-slot list with provider tasks data + one dynamic-tail child per task list the provider exposes.

task is the user-facing entry point; task-list is what the task plugins actually consume.

task: wire shape

{
  "type": "alias",
  "label": "Tasks",
  "attributes": {
    "template": "task",
    "props": { "authId": "auth_abc" }
  }
}
PropTypeRequiredMeaning
authIdstringyesThe connected provider auth id (Google, Apple, …)

task: expanded shape

alias                             template=task
│                                 props.authId=auth_abc
└─ alias                          template=task-list
   │                              props.authId=auth_abc
   └─ ... (see task-list below)

task is a thin pass-through; it only exists so the user-visible "Tasks" row label sits above the list machinery.

task-list: expanded shape

alias                             template=task-list
│                                 props.authId=auth_abc
└─ list                           label="Tasks"
   ├─ data-renderer               type=task, slot=column
   ├─ data-renderer               type=task, slot=timeline[row]
   ├─ data-renderer               type=task, slot=timeline[column]
   ├─ data-renderer               type=task, slot=grid
   ├─ data-source                 lookupKey=:~lona:tasks
   │                              label="Tasks"
   ├─ data-source                 lookupKey=:~google:auth_abc:tasks:list_1
   │                              label="My Tasks"        ← dynamic tail
   ├─ data-source                 lookupKey=:~google:auth_abc:tasks:list_2
   │                              label="Inbox"           ← dynamic tail
   └─ data-source                 lookupKey=:~google:auth_abc:tasks:list_3
                                  label="Errands"         ← dynamic tail

The first five children are static; the trailing data-source rows are appended by dynamicTail — one per task list reported by :~lona:tasks:lists (see below).

The four data-renderer slots let the same task plugin paint into different layouts (column, two timeline orientations, grid view) without re-declaring the row.

Dynamic tail

task-list is the canonical example of dynamicTail:

dynamicTail: {
  parentPreset: "tasks",
  source: ":~lona:tasks:lists",
  as: (item, props, index) => ({
    preset: `list-${item.id}`,
    type: "data-source",
    label: item.title,
    position: Rational.nth(5 + index),
    storage: "own",
    placement: "child",
    attributes: {
      dtype: "obj",
      cellCardinality: "multi",
      lookupKey: `:~google:${props.authId}:tasks:${item.id}`,
    },
  }),
  filter: (item, local) => local.visibleByKey.get(item.id) ?? true,
}
  • source: ":~lona:tasks:lists" is a cell stream — the rows-side resolves it to the user's task lists across providers.
  • as maps each cell into a data-source child spec. Lookup keys follow :~google:{authId}:tasks:{listId} (Google) or :~apple:{authId}:reminders:{listId} (Apple).
  • filter consults a per-template local visibleByKey map so the user can toggle individual lists on and off without removing them from the alias.

The tail rebuilds whenever :~lona:tasks:lists invalidates — adding a new task list on the provider auto-grows the row tree.

See also