Come Over to the Dark Side with Wagtail 5.0
Wagtail 5.0 provides even more options for your content creation experience
Fans of Star Wars know there are perks to coming over to the dark side. The new dark mode and other features in Wagtail 5.0 won't give you terrifying power over matter and space, but they will give you a lot more power over your Wagtail experience.
This release has features every member of the content team will love. Editors will enjoy the new always-on minimap and accessibility checker options, designers will love the SVG support, and developers will appreciate the new fine-tuned control they will have over validation. Let's walk through these new bits and pieces together, shall we?
Dark mode has arrived
People who find staring at white screens to be like staring into the sun will love the new dark mode option Wagtail 5.0 provides. You can now change the theme from light to dark in your account preferences or set up Wagtail to follow the system preferences of your operating system.
Vampires and migraine sufferers won't be the only ones thrilled with dark mode. People who use OLED monitors will also gain some more energy efficiency from using dark mode, which makes dark mode not only great for your eyes but great for the planet. 🌍
More image options with SVG support
You really can't design anything these days without coming across scalable vector graphics, or SVGs. Now the Wagtail image library can be configured to support uploading SVGs to the Wagtail image library.
Wagtail 5.0 also has a new fully customisable SVG icon set as well that gives developers and designers more control over the icons that are used in the Wagtail admin interface and for labelling StreamField blocks. There is also a new {% icon %} template tag that gives developers the option to reuse the icons in templates.
An enhanced accessibility checker
Wagtail 5.0 includes a few new updates to the accessibility checker, which was first added to the Wagtail project by Outreachy intern Albina Starykova. Five new rules have been added to the checker by default. Also, organisations that are eager to customise the rules in the checker can now use a custom version of the AccessibilityItem subclass to run specific Axe rules. You can also designate which parts of your pages should be included or excluded from accessibility checks. See the new documentation for an example of custom accessibility modifications.
Delete more safely
There are few things as painful as deleting an image or page only to discover that the image or page you just deleted were critical for another part of your website. Now when you delete an image, page, document, or snippet, the confirmation screen will include a clickable list of references so you can see all the parts of your website that are using that content. Then you can make any vital updates you need before you hit that delete button.
Even more choices for your snippets
In the new release, developers can more easily organise snippets the way they want to. In Wagtail 5.0, you can now customize the filters used on snippet views as well as the view URLs, the number of items per page, and the default ordering. Admin templates for snippets can also now be overridden on a per-model or per-app basis and registered in arbitrary menu items. If you have a lot of snippets in your projects, definitely have a look at how all these new bits will help you do even more with them.
More options to validate the way you want to
Providing a great user experience when something goes wrong is just as important as when something goes right. Wagtail 5.0 gives developers more options for adding custom validation logic to your Wagtail projects. Now you can attach errors to specific child blocks in StreamField, which will help you provide a better experience to users when they forget to add a critical piece of information to their content.
Cleaning out the cruft
As Matthew Westcott said in his blog on addressing technical debt, the Wagtail 5.0 release has some breaking changes in it because this release removes some of the old code paths that were maintained to give people more time to adapt their code to the new upgrades. You can find the full notes on the features that were removed in the upgrade considerations.
Visit the Wagtail documentation site for the full Wagtail 5.0 release notes if you want all the details now. If you're super stoked and eager to upgrade, here's our guide for upgrading Wagtail. If you run into any challenges during your upgrade, you can ask the community for help in our #Support channel on Slack or post a Wagtail question to Stack Overflow.