Install
Works with Drupal: ^11.3 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
56.39 KB
MD5: 39338efaee942f1187f62dc557f235e7
SHA-1: c5b80e75429d87c9453615ff6a26079fe93f342e
SHA-256: 5d201c158cc1675c45dbe1d21d422ace9d61504ef4f797e3128f1f128e28f453
Download zip
88.13 KB
MD5: fa750780df9d753fbce7ab555ec2bf24
SHA-1: f699759cb5d0e1077d240cf9da822953fda8975b
SHA-256: 07a8bc7e001bba1cbfaf7a48b2b19ac656e1fc1b7b335359ebe68c7a023ad82b
Release notes
Added
- Bridges, the admin the pages belong to (guide):
collaborate.bridge,autoby default (easyadminwhen EasyAdminBundle is registered,noneotherwise),easyadminornone. A bridge loads its admin's services and sets the defaultcursors.regionsand the scripts' profile, which reads its markup. The resolved bridge is thecollaborate.bridgeparameter and the layer'sbridge. - A Drupal module,
janalis/collaborate_drupal(drupal/), for Drupal 11.3+ and 12 on Claro or Gin (guide): shared drafts of content entity forms (CKEditor 5 fields as rich text), the others in Navigation's top bar, refreshed listings, the bell, on the bundle's own services in Drupal's container. Configured from/admin/config/content/collaborateandsettings.php; Mercure or the WebSocket hub (drush collaborate:hub:serve); notifications through Drupal's queue. The items of multi-value fields are shared as a collection, keyed through Drupal's rebuilds ("Add another item", Remove, a reorder), and so are paragraphs (any type a peer adds) and the entities Inline Entity Form's simple widget edits. On MariaDB, MySQL, PostgreSQL or SQLite sites. - PostgreSQL and SQLite: the draft journal speaks each platform's SQL where they differ (
Draft\Dialect\: upserts, row locks, and named locks: PostgreSQL's advisory locks, a lock file on SQLite), and the entity mapping drops MySQL's binary collations andDATETIME(6)on the other platforms (Doctrine\PortableSchema). MariaDB and MySQL schemas are unchanged. - A bridge's script profile can add and remove a collection's entries itself (
collections.entry,create,remove) when its collections have no prototype, and name the child it numbers after a reorder (collections.position). - The Drupal module is published from
drupal/, released with the bundle under the same version: a split repository for Packagist (janalis/collaborate_drupal) and the drupal.org project (drupal/collaborate). Merge requests and issues opened on drupal.org are mirrored to GitHub, where the module is developed (contributing). @janalis/collaborate/collaborate.js, the entry point of any admin, andregisterBridge(), which describes an admin's markup to the scripts.data-collaborate-page="<entity>:<index|detail|edit|new>"on a page's body says what it shows: the saved-view refresh reloads a marked list or detail page of any admin.data-collaborate-submitteron a save button: the bar's Save stands for it.Security\CurrentUserInterface,Draft\RecordIdentifierInterfaceandDraft\FormDraft(a form's draft whatever builds the form), and thecollaborate_transfilter andcollaborate_csrf()function the bundle's templates now use, for hosts other than a Symfony kernel.
Changed
- Without a bridge, the defaults are no longer EasyAdmin's:
cursors.regionsdefaults tomodal,header,contentandbody(dialog[open], .modal.show,body > header, [role=banner],main, [role=main]), the scripts read the bundle's own markup (data-collaborate-row,data-collaborate-entry), and the saved-view refresh reloads the pages that say what they show. EasyAdmin's are unchanged. - The EasyAdmin services moved to
Janalis\Collaborate\Bridge\EasyAdmin\andUpdatesSubscribertoJanalis\Collaborate\Updates\;config/services/easyadmin.phpisbridge_easyadmin.php. - The controllers, the hub guard, the Twig extension, the form extension and the notification access read the user through
CurrentUserInterface(Symfony's security helper,SymfonyCurrentUser), andDraftSavethe record's id throughRecordIdentifierInterface. _cursors.scssloads EasyAdmin's header rules from_easyadmin.scss.
Deprecated
Janalis\Collaborate\EasyAdmin\{EasyAdminFormContext,SaveSubscriber,DraftRefreshSubscriber,UpdatesSubscriber}: aliases of their moved classes, removed in 0.6.CollaborateBundle::REGIONS:Bridge::EasyAdmin->regions().
Fixed
- The
reportdraft action, which a page sends when it stops following its draft, reached no route:collaborate_draftaccepts it.
Upgrading
- A host without EasyAdmin whose pages relied on EasyAdmin's default regions or markup sets
cursors.regions, orcollaborate.bridge: easyadmin; its pages import@janalis/collaborate/collaborate.js(easyadmin.jsreads EasyAdmin's markup). - A host that wants its own lists refreshed marks them
data-collaborate-page. - A host that constructs the services itself passes a
CurrentUserInterface(new SymfonyCurrentUser($security)) where it passed Symfony'sSecurity. - A host that overrides the bundle's templates replaces
|trans({}, 'collaborate')with|collaborate_transandcsrf_token()withcollaborate_csrf(), or keeps Symfony's.