github mansoorkhan96/filament-versionable v5.2

latest release: v4.1
5 hours ago

What's Changed

Added

  • Support for spatie/laravel-translatable models on the Revisions page (#31). Translatable attributes are now shown as one diff block per locale, with a locale badge and human-readable locale names, instead of a raw JSON blob containing every language. Models using either the SNAPSHOT or DIFF version strategy are supported, and models without translations render exactly as before.
  • Right-to-left support for locales such as Arabic, Hebrew, Persian and Urdu: text in those locales is laid out right-to-left inside its cells while the old/new columns keep the page's usual order, and HTML tags in the content stay readable.
  • New Mansoor\FilamentVersionable\Support\TranslatableDiff and Mansoor\FilamentVersionable\Support\DiffEntry classes, plus RevisionsPage::diffEntries(), RevisionsPage::diffStats() and RevisionsPage::versionStats() for customising the rendered diff.

Upgrading

  • Rebuild your Filament theme. resources/css/plugin.css has new rules for right-to-left locales, so run your theme build after updating the package.
  • Published views: if you published the revisions-page view, republish it (or apply the changes manually) to get the per-locale rendering. The RevisionsPage::diff() computed property is now keyed by field, or field (locale) for translatable attributes.
  • spatie/laravel-translatable is not a hard dependency. Translatable attributes are detected through the model's getTranslatableAttributes() method.

New Contributors

Full Changelog: v5.1...v5.2

Don't miss a new filament-versionable release

NewReleases is sending notifications on new releases.