Skip to content

@ifox ifox released this Aug 21, 2019 · 2 commits to 1.2 since this release

Twill just surpassed 10k installs and today, version 1.2.2 is available with a significant amount of improvements and bug fixes thanks to the efforts of 21 contributors: Amr Noman, Antoine Doury, Antonin Caudron, Antonio Carlos Ribeiro, Bram Mittendorff, Daniel Ramos, Dmitrii Larionov, Fernando Petrelli, Franca Winter, Gilbert Moufflet, Jarred Bishop, Lorren Gordon, Nikhil Trivedi, Pablo Barrios, Quentin Renard, Rafael Milewski, Ray Tri, Riaan Laubscher, Stevan Pavlović, Yanhao Li, Žiga Pavlin.

Glide support for local image rendering

Glide is an open source image rendering service that integrates well with Twill and Laravel. It is a self-hosted option for local development and/or production websites and apps that have limited needs for image resizing and cropping. For image-heavy production websites and apps, we still recommend Imgix or a similar third party service, or at least setting up a CDN on top of your images.

The media and file libraries local endpoint type has also been completely reworked to work with Laravel default public storage location. Remember to run php artisan storage:link locally and as part of your deployment process if you are using local uploads rather than S3.

To try out Glide on a fresh Twill app, it is as simple as updating 2 environment variables:

MEDIA_LIBRARY_ENDPOINT_TYPE=local
MEDIA_LIBRARY_IMAGE_SERVICE=A17\Twill\Services\MediaLibrary\Glide

Of course, more configuration variables are available through the new glide key of Twill's configuration. See the default configuration here.

Making repeaters happy again

Repeaters had a couple of issues that are now fixed in this release:

  • repeaters in forms are now updating the initially created database record instead of needlessly creating a new record each time their parent model gets updated
  • repeaters in blocks are now restored correctly when restoring a past revision
  • medias and files fields support has been improved

Different images per language support

You can now globally enable the ability for your content editors to provide different images per language in the media form field using the media_library.translated_form_fields configuration key (defaults to false). The user experience is exactly the same as our other translatable field. When rendering in a template or API, you can fallback to the default language if no image has been selected for the current language.

Cleaning up internals

Lead by community member Stevan Pavlović, an effort to clean Twill internals begins with this release. Laravel helpers and facades are getting replaced by dependency injection or at least, for now, to avoid consequent breaking changes, by fully qualified imports.

And a lot more in the changelog below!

HOW TO UPDATE

To update, you will need to run composer update in your project and then run the new Twill provided artisan command: twill:update. This will generates new database migrations and invite you to migrate your database. Those new migrations are safe to run as they check for the existence (or inexistence) of tables and columns in your database before doing anything. If you are upgrading from an earlier version than 1.2, you will need to update your composer.json file first: "area17/twill": "1.2.*".

NOTE ABOUT UPCOMING LARAVEL 6 AND SEMANTIC VERSIONING

Laravel 6 upcoming release was announced a few weeks ago at Laracon US! Twill will of course support it soon after the official release, which should happen at the end of August at Laracon EU 🤞.

Taylor Otwell also explained why v6 instead of v5.9 since the next release is not a paradigm shift for the framework: Laravel is adopting semantic versioning (major.minor.patch) and for simplicity, we will make that shift as well.

Right now, Laravel and Twill are following romantic versioning (paradigm.major.minor). This is why Twill 1.2.2 is not just about patches but new features and improvements too.

Moving forward, once Laravel 6 is released, a release with breaking changes will be considered major, which would mean Twill 2.0.0 right now. A release with new features would be 1.3.0, and patches would be 1.2.3.

You can start using Composer's caret version range (^1.2.2) now if you'd like to benefit from new features without fearing breaking changes on your next composer update! If you'd rather stick to a stricter way of requiring Twill versions (fair enough, we do that in Twill's npm dependencies for your own safety), you will have to update your composer.json file to get new features rather than patches only.

Changelog

Added

Fixed

  • Fix media and file local libraries: local disk is now defined automatically by Twill, and configured to work seamlessly with Glide (10b9cc7, 52cabe3, ff1add8, 10aa2c5, 876c93a)
  • Fix repeaters issues with restoration, update, medias and files fields support (7ec4256, 6425a3f, c2703b2, 60a239b, 7e348f4)
  • Fix #32: markdown based mail notifications breaking in host Laravel apps (c0239ad)
  • Fix authorization gates conflicts (d2036f2, b08b121)
  • Fix default Quill.js WYSIWYG theme rendering (e593ac6)
  • Fix browser when a selected item is deleted (5e08513)
  • Fix global search input misbehavior (31fef7c)
  • Fix publish button label copy when publishing is not available (82ec2c8)
  • Fix Twill dev script console errors by disabling host check in hot script (0707f5b)
  • Fix Twill provided blocks validation rule (cc277f5)
  • Fix support for custom app namespace (#280) (eb780a5)
  • Fix canvas rendered cropped image no-cache hack (#261) (ebe4450)
  • Fix S3 uploader signature function calls (#259) (41828cd)
  • Fix missing header method exception in ValidateBackHistory middleware (#234) (2ee1080)
  • Fix media metadata helper issues (1b07f49)
  • Fix some documentation typos (df870b5, a6dda85)
  • Fix some styling bugs (faa4f89, 77e4d2d)
  • Fix dashboard settings: activity option was not used (f67ca2e)

Improved

Chore

  • Update composer dependencies (e1dfc11)
  • Update npm dependencies (06184c0)
  • Update docs to VuePress 1.0 (7221720)
Assets 2
You can’t perform that action at this time.