A new approach to search and more in Wagtail 7.2
With fully revamped search, readability checks, and more, this is a collection of new features you don't want to miss
Our last release for the year gives you one more collection of assorted content management goodies to enjoy before various holidays and family obligations start taking up more space in your head. Even if you're the one covering important operations while everyone else has logged off for the holidays, you should plot to upgrade Wagtail while everyone else is away so they can enjoy all of these fantastic features in the new year.
Here are just a few of the things that you'll get to play around with in Wagtail 7.2.
Get more control over your search experience
The biggest change in Wagtail 7.2 is one that people with large content libraries are going to welcome. We've converted the entire Wagtail search backend into a separate package. The new package, called modelsearch, gives you more control over how your data is indexed and searched. Think about how there are different ways to organize books in a library, like the Dewey Decimal Classification or the Universal Decimal Classification system. What may work well for one library collection may work terribly for another. Your Wagtail content library is similar and customizing search based on the types and amount of content you have can make it easier for people to find things.
The new package is compatible with Elasticsearch and OpenSearch. You'll have to update the index of your content when you upgrade, but we've included a management command that should make that a straightforward update for you. The new package also isn't specific to Wagtail. If you're fond of these search features, you can include them in other Django projects too.
Check your content readability
Writers love fancy words. They have a tendency to get carried away when they have opportunities to show off their voluminous, sagacious, and (honestly) pompous vocabularies. Which means that outside of other writers and academics (who are also usually guilty of this sort of stunt writing), nobody has a clue what they're trying to say.
The new readability checks in Wagtail will help remind you that the best writing is often clear and brief. The checks are based on a slightly modified version of a readability formula called the LIX score. The secret to getting a good score is to keep things short and to use simpler words. Even writers who love their thesauruses like they love their children can appreciate that.
Sort content and find your media better in more places
In our last release, we introduced the option to toggle between a list view and a grid view in your image library. In this release, we've added the same option to all of our image choosers so that you can find the images you need in your archives just a bit faster.
We also continued our trend of making listing views in Wagtail easier to sort by giving you the option to sort content in the Wagtail admin and in documents by usage. If you're a reluctant collector of PDFs or other random documents that get uploaded to your site, this sort of option can help you quickly identify ways to pare that collection down.
Add drag-and-drop to your custom views
Custom ViewSets in the Wagtail admin help make it easier to organize and edit custom data and content types. With this new release, you can give editors even more control over how they organize their content in custom ViewSets for Django models and for Snippets by giving them the power to drag items around and drop them where they need to go. If your editors are the sort of people who organize their home libraries by color, then this feature will probably make them real happy.
Find errors faster
The Promote tab can honestly be real easy to forget sometimes. Because it does a great job of automatically converting titles into URL slugs and often contains meta fields for search engines that are the last things writers typically fill out, people tend not to think about that tab until something goes wrong. And then they get annoyed because they cannot figure out why Wagtail is flagging an error when they're trying to get a blog post out before their next meeting.
In Wagtail 7.2, validation errors have a button that automatically takes you to the first error whether it's on the main page or another tab. If you're a developer who loves creating tab views, this feature will help you convince editors that they can love tabs as much as you do. Because it will make finding errors feel less like going on a treasure hunt with no map.
Keep your hands on the keyboard with new shortcuts
Like keeping your fingers on the keyboard? Well, we got some new shortcuts for you to use in Wagtail. With the newest shortcuts, you can used ? to toggle the keyboard shortcut dialog box and you can use / to access the search input when you access the sidebar with the keyboard. We also gave you the option to enable and disable the keyboard shortcuts in your user profile.
What to watch for as you upgrade
If you have a search backend that uses Elasticsearch or OpenSearch, you're going to want to plan a bit extra time for navigating this upgrade. You'll need to run ./manage.py update_index after you upgrade Wagtail to make sure everything is indexed properly. Also, note that the ATOMIC_REBUILD option for both of these backends will be enabled by default. If that's not going to work for you, we included some suggestions on how you can preserve the old functionality in our release notes. The INDEX configuration is also now INDEX_PREFIX.
Most of the changes to watch out for in this release are related to search, but you can find out about the few other things you'll want to check too in our full release notes.
If you run into any issues, file them here. If you need help and you're local friendly AI is stumped, give our Slack a go or send us a question on StackOverflow. Happy upgrading!