5.5 KiB
Wagtail 2.16 release notes - IN DEVELOPMENT
.. contents::
:local:
:depth: 1
What's new
Other features
- Added persistent IDs for ListBlock items, allowing commenting and improvements to revision comparisons (Matt Westcott, Tidjani Dia)
- Added Aging Pages report (Tidjani Dia)
- Add more SketchFab oEmbed patterns for models (Tom Usher)
- Add collapse option to
StreamField
,StreamBlock
, andListBlock
which will load all sub-blocks initially collapsed (Matt Westcott) - Private pages can now be fetched over the API (Nabil Khalil)
- Added
alias_of
field to the pages API (Dmitrii Faiazov) - Add support for Azure CDN and Front Door front-end cache invalidation (Tomasz Knapik)
- Fixed
default_app_config
deprecations for Django >= 3.2 (Tibor Leupold) - Removed WOFF fonts
- Improved styling of workflow timeline modal view (Tidjani Dia)
- Add secondary actions menu in edit page headers (Tidjani Dia)
- Add system check for missing core Page fields in
search_fields
(LB (Ben Johnston)) - Improve CircleCI frontend & backend build caches, add automated browser accessibility test suite in CircleCI (Thibaud Colas)
- Add a 'remember me' checkbox to the admin sign in form, if unticked (default) the auth session will expire if the browser is closed (Michael Karamuth, Jake Howard)
- When returning to image or document listing views after editing, filters (collection or tag) are now remembered (Tidjani Dia)
- Improve the visibility of field error messages, in Windows high-contrast mode and out (Jason Attwood)
- Improve implementations of visually-hidden text in explorer and main menu toggle (Martin Coote)
- Add locale labels to page listings (Dan Braghis)
- Change release check domain to releases.wagtail.org (Jake Howard)
- Add the user who submitted a page for moderation to the "Awaiting your review" homepage summary panel (Tidiane Dia)
- When moving pages, default to the current parent section (Tidjani Dia)
- Add borders to TypedTableBlock to help visualize rows and columns (Scott Cranfill)
- Set default submit button label on generic create views to 'Create' instead of 'Save' (Matt Westcott)
Bug fixes
- Accessibility fixes for Windows high contrast mode; Dashboard icons colour and contrast (Sakshi Uppoor)
- Rename additional 'spin' CSS animations to avoid clashes with other libraries (Kevin Gutiérrez)
- Pages are refreshed from database on create before passing to hooks. Page aliases get correct
first_published_date
andlast_published_date
(Dan Braghis) - Additional login form fields from
WAGTAILADMIN_USER_LOGIN_FORM
are now rendered correctly (Michael Karamuth) - Fix icon only button styling issue on small devices where height would not be set correctly (Vu Pham)
- Add padding to the Draftail editor to ensure
ol
items are not cut off (Khanh Hoang) - Prevent opening choosers multiple times for Image, Page, Document, Snippet (LB (Ben Johnston))
- Ensure subsequent changes to styles files are picked up wby Gulp watch (Jason Attwood)
Upgrade considerations
Removed support for Django 3.0 and 3.1
Django 3.0 and 3.1 are no longer supported as of this release; please upgrade to Django 3.2 or above before upgrading Wagtail.
Removed support for Python 3.6
Python 3.6 is no longer supported as of this release; please upgrade to Python 3.7 or above before upgrading Wagtail.
StreamField ListBlock now returns ListValue
rather than a list instance
The data type returned as the value of a ListBlock is now a custom class, ListValue
, rather than a Python list
object. This change allows it to provide a bound_blocks
property that exposes the list items as BoundBlock
objects rather than plain values. ListValue
objects are mutable sequences that behave similarly to lists, and so all code that iterates over them, accesses individual elements, or manipulates them should continue to work. However, code that specifically expects a list
object (e.g. using isinstance
or testing for equality against a list) may need to be updated. For example, a unit test that tests the value of a ListBlock
as follows:
self.assertEqual(page.body[0].value, ['hello', 'goodbye'])
should be rewritten as:
self.assertEqual(list(page.body[0].value), ['hello', 'goodbye'])
Change to set
method on tag fields
This release upgrades the django-taggit library to 2.x, which introduces one breaking change: the TaggableManager.set
method now accepts a list of tags as a single argument, rather than a variable number of arguments. Code such as page.tags.set('red', 'blue')
should be updated to page.tags.set(['red', 'blue'])
.
wagtail.admin.views.generic.DeleteView
follows Django 4.0 conventions
The internal (undocumented) class-based view wagtail.admin.views.generic.DeleteView
has been updated to align with Django 4.0's DeleteView
implementation, which uses FormMixin
to handle POST requests. Any custom deletion logic in delete()
handlers should be moved to form_valid()
.
Renamed admin/expanding-formset.js
admin/expanding_formset.js
has been renamed to admin/expanding-formset.js
as part of frontend code clean up work. Check for any customised admin views that are extending expanding formsets, or have overridden template and copied the previous file name used in an import as these may need updating.