5.8 KiB
Wagtail 2.17 release notes - IN DEVELOPMENT
.. contents::
:local:
:depth: 1
What's new
Page editor redesign
Here are other changes related to the redesign:
- Switch the Wagtail branding font to a system font stack (Steven Steinwand)
Other features
- Upgrade ESLint and Stylelint configurations to latest shared Wagtail configs (Thibaud Colas)
- Major updates to frontend tooling; move Node tooling from Gulp to Webpack, upgrade to Node v16 and npm v8, eslint v8, stylelint v14 and others (Thibaud Colas)
- Change comment headers’ date formatting to use browser APIs instead of requiring a library (LB (Ben Johnston))
- Lint with flake8-comprehensions and flake8-assertive, including adding a pre-commit hook for these (Mads Jensen, Dan Braghis)
- Add black configuration and reformat code using it (Dan Braghis)
- Remove UI code for legacy browser support: polyfills, IE11 workarounds, Modernizr (Thibaud Colas)
- Remove redirect auto-creation recipe from documentation as this feature is now supported in Wagtail core (Andy Babic)
- Remove IE11 warnings (Gianluca De Cola)
- Replace
content_json
TextField
withcontent
JSONField
inPageRevision
(Sage Abdullah) - Remove
replace_text
management command (Sage Abdullah) - Replace
data_json
TextField
withdata
JSONField
inBaseLogEntry
(Sage Abdullah) - Remove the legacy Hallo rich text editor as it has moved to an external package (LB (Ben Johnston))
Bug fixes
- Update django-treebeard dependency to 4.5.1 or above (Serafeim Papastefanos)
- When using
simple_translations
ensure that the user is redirected to the page edit view when submitting for a single locale (Mitchel Cabuloy) - When previewing unsaved changes to
Form
pages, ensure that all added fields are correctly shown in the preview (Joshua Munn) - When Documents (e.g. PDFs) have been configured to be served inline via
WAGTAILDOCS_CONTENT_TYPES
&WAGTAILDOCS_INLINE_CONTENT_TYPES
ensure that the filename is correctly set in theContent-Disposition
header so that saving the files will use the correct filename (John-Scott Atlakson)
Upgrade considerations
Removed warning in Internet Explorer (IE11)
- IE11 support was officially dropped in Wagtail 2.15, as of this release there will no longer be a warning shown to users of this browser.
- Wagtail is fully compatible with Microsoft Edge, Microsoft’s replacement for Internet Explorer. You may consider using its
IE mode <https://docs.microsoft.com/en-us/deployedge/edge-ie-mode>
_ to keep access to IE11-only sites, while other sites and apps like Wagtail can leverage modern browser capabilities.
Replaced content_json
TextField
with content
JSONField
in PageRevision
- The
content_json
field in thePageRevision
model has been renamed tocontent
. - The field now internally uses
JSONField
instead ofTextField
. - If you have a large number of
PageRevision
objects, running the migrations might take a while.
Replaced data_json
TextField
with data
JSONField
in BaseLogEntry
- The
data_json
field in theBaseLogEntry
model has been renamed todata
. - The field now internally uses
JSONField
instead ofTextField
. - The default empty value for the field has been changed from
""
to{}
. - This change also affects
BaseLogEntry
subclasses, i.e.PageLogEntry
andModelLogEntry
. - If you have a large number of objects for these models, running the migrations might take a while.
Hallo legacy rich text editor has moved to an external package
- Hallo was deprecated in Wagtail v2.0 (February 2018) and has had only a minimal level of support since then.
- If you still require Hallo for your Wagtail installation, you will need to install the Wagtail Hallo editor legacy package.
- We encourage all users of the Hallo editor to take steps to migrate to the new Draftail editor as this external package is unlikely to have ongoing maintenance.
window.registerHalloPlugin
will no longer be created on the page editor load, unless the legacy package is installed.
Phasing-out of special-purpose field panel types
As of this release, the use of special-purpose field panel types such as StreamFieldPanel
and ImageChooserPanel
is being phased out, and developers will generally expect to be able to use a plain FieldPanel
instead. For this reason, developers of third-party packages implementing their own field panel types are recommended to follow suit and ensure that their code also works with FieldPanel
. The steps for doing this will depend on the package's functionality, but in general:
- If the panel sets a custom template, your code should instead define a
Widget
class that produces your desired HTML rendering. - If the panel provides a
widget_overrides
method, your code should instead callregister_form_field_override
so that the desired widget is always selected for the relevant model field type. - If the panel provides a
get_comparison_class
method, your code should instead callwagtail.admin.compare.register_comparison_class
to register the comparison class against the relevant model field type.
If you do continue to use a custom panel class, note that the template context for panels derived from BaseChooserPanel
has changed - the context variable is_chosen
, and the variable name given by the panel's object_type_name
property, are no longer available on the template. The only available variables are now field
and show_add_comment_button
. If your template depends on these additional variables, you will need to pass them explicitly by overriding the render_as_field
method.