Collaboration
Comments, tags, attachments, the activity feed and reactions on any record, with a helper that posts a comment and tags the record.
Puts the blocks that attach to any record in one block. The projects preset does not list it yet, because it has no reactions.
better-supabase add collaborationexport default defineConfig({ blocks: { collaboration: {} } });add lists collaboration in blocks, writes the modules of every part and wires the client in lib/blocks.ts. Import the manifest from better-supabase/blocks/collaboration when you build the set with createBlocks.
import { collaborationBlock } from "better-supabase/blocks/collaboration";Parts
Installing collaboration installs these blocks. Each stays an ordinary block in the config and keeps its own client.
Helpers
discuss({ subject, comment, tagIds }) posts the comment on the record, then attaches each tag to the record. It stops at the first failed attach and returns that error. The comment stays posted, so retry the tags with tags.attach, not discuss. It returns the comment and the number of tags attached.
const { comment } = await blocks.collaboration
.discuss({
subject: { type: "deal", id: dealId },
comment: { body: "Legal reviewed the terms." },
tagIds: [reviewedTagId],
})
.orThrow();Remove
better-supabase remove collaboration
better-supabase remove collaboration --with-partsThe first command replaces collaboration in blocks with its parts. The second removes the parts too, except any part another block still needs (remove).
Last updated on
Guests
Invite clients and contractors by email to read, comment on and upload to the records you grant them, and let a customer see the invoices and bookings of the party they act for. Guests are never members, and no authorization library is involved.
Work
Tasks, goals and the blocks that track work on a record.