Skip to content

Releases

v0.2.2

Choose a tag to compare

@lam0819 lam0819 released this 26 Nov 10:15
710ff33

Fixed: the package as Composer installs it now includes its browser side. Releases until 0.2.1 left resources/js and package.json out of the archive, so npm install ./vendor/solutionforest/laravel-collaboration found nothing to install after composer require. Please update: composer update solutionforest/laravel-collaboration.

v0.2.1

Choose a tag to compare

@lam0819 lam0819 released this 26 Nov 10:12
d2b4c0e

The merge engine can be imported on its own, as @solutionforest/laravel-collaboration/crdt/document.js and its siblings. filament-collaboration's browser script now uses it this way instead of keeping a copy.

v0.2.0

Choose a tag to compare

@lam0819 lam0819 released this 26 Nov 08:16
2bfee62

Everything filament-collaboration offers, now for Livewire, React and Vue too, plus developer conveniences.

New

  • Repeaters: ->items('lines', text: ['description']), with form.items() in React/Vue and wire:model="lines.0.title" in Livewire.
  • Saves that respect each other:
    • Fields you didn't touch take the values somebody else saved.
    • A field you both changed asks which version to keep (<Conflicts>, <x-collaboration::conflicts>).
  • Presence: create pages (Collaboration::creating(Post::class)), who is on each record of a list (Collaboration::presence($posts)), and following a colleague from field to field.
  • Optional features, off until you turn them on:
    Collaboration::features([Features::comments(), Features::history(), Features::uploads()]);
    These cover comments with @mentions, version history with restore, and images uploaded into rich text. Their UI has its own imports (/react/comments, /vue/history, …), and in Livewire its own script.
  • Livewire:
    • <x-collaboration::editor field="body" /> (rich text, no build step)
    • <x-collaboration::field-people field="title" />
    • Collaboration.items() for repeaters
  • Your own design: Collaboration::withoutStyles(), plus render functions and slots for the faces.
  • php artisan collaboration:install, and a VitePress docs site built from the README (website/).

Upgrading from 0.1

  • Comments: they're optional now. Call Collaboration::features([Features::comments()]) to keep them. The comments table already exists from 0.1 and its new migration skips it.
  • Comment and history imports: the components moved to /react/comments, /react/history, /vue/comments and /vue/history.

Quality

  • This package: 150 PHP tests and 40 JS tests pass.
  • Browsers: a three-browser run with Livewire, React and Vue on one article passes 17 of 17.
  • filament-collaboration: its full suite passes against this release (378 of 378).
  • PHPStan: level 10, covering the package and its test classes.

v0.1.0

Choose a tag to compare

@lam0819 lam0819 released this 26 Nov 07:28
42b59d4

The first internal release of solutionforest/laravel-collaboration: Google Docs-style collaboration for any Laravel app, with adapters for Livewire, Inertia + React and Inertia + Vue, and TipTap for rich text.

What's in it

  • Live fields:
    • Text merges by character; rich text (TipTap) keeps its formatting.
    • Selects, checkboxes, checkbox groups, radios and dates take the latest choice.
  • Presence: faces, who is in which field, other people's carets and selections, and sync status.
  • Each person's own undo, and locked fields (->lock()).
  • Saving everybody's edits: $post->collaboration()->update($validated), or saveCollaboratively() in Livewire.
  • Your policies decide who may join, and access is checked again on every sync.
  • Typo protection:
    • Wrong field kinds and names fail with "did you mean".
    • TypeScript declarations for every entry point.
    • PHPStan level 10.
  • Integrations: hooks used by filament-collaboration, which is being moved onto this package (solutionforest/filament-collaboration#14).

Install (private repository)

"repositories": [{ "type": "vcs", "url": "git@github.com:solutionforest/laravel-collaboration.git" }]
composer require solutionforest/laravel-collaboration:^0.1
php artisan migrate
npm install ./vendor/solutionforest/laravel-collaboration   # Inertia apps only

See the README for the quick start for each stack.