What's Changed
Added
- Support for
spatie/laravel-translatablemodels 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 theSNAPSHOTorDIFFversion 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\TranslatableDiffandMansoor\FilamentVersionable\Support\DiffEntryclasses, plusRevisionsPage::diffEntries(),RevisionsPage::diffStats()andRevisionsPage::versionStats()for customising the rendered diff.
Upgrading
- Rebuild your Filament theme.
resources/css/plugin.csshas new rules for right-to-left locales, so run your theme build after updating the package. - Published views: if you published the
revisions-pageview, republish it (or apply the changes manually) to get the per-locale rendering. TheRevisionsPage::diff()computed property is now keyed byfield, orfield (locale)for translatable attributes. spatie/laravel-translatableis not a hard dependency. Translatable attributes are detected through the model'sgetTranslatableAttributes()method.
New Contributors
- @shayanalibuilds made their first contribution in #59
Full Changelog: v5.1...v5.2