2022-10-18 18:34:29 +02:00
# Wagtail 4.2 release notes - IN DEVELOPMENT
_Unreleased_
```{contents}
---
local:
depth: 1
---
```
## What's new
### Other features
2022-08-10 05:07:27 +02:00
* Switch to using [Willow ](https://github.com/wagtail/Willow/ ) instead of Pillow for images (Darrel O'Pry)
2022-10-24 00:59:09 +02:00
* Test assertion [`WagtailPageTestCase.assertCanCreate` ](testing_reference ) now supports the kwarg `publish=True` to check publish redirection (Harry Percival, Akua Dokua Asiedu)
2022-11-07 17:02:57 +01:00
* Ensure that the `rebuild_references_index` command can run without console output if called with `--verbosity 0` (Omerzahid Ali, Aman Pandey)
2022-10-13 13:12:45 +02:00
* Add full support for secondary buttons with icons in the Wagtail design system - `button bicolor button--icon button-secondary` including the `button-small` variant (Seremba Patrick)
2022-11-01 20:18:43 +01:00
* Add [`purge_embeds` ](purge_embeds ) management command to delete all the cached embed objects in the database (Aman Pandey)
2022-11-17 16:53:15 +01:00
* Make it possible to resize the page editor’ s side panels (Sage Abdullah)
2022-11-17 13:24:17 +01:00
* Add ability to include [`form_fields` as an APIField ](form_page_fields_api_field ) on `FormPage` (Sævar Öfjörð Magnússon, Suyash Singh, LB (Ben) Johnston)
2022-11-19 08:45:01 +01:00
* Ensure that images listings are more consistently aligned when there are fewer images uploaded (Theresa Okoro)
2021-11-24 01:10:07 +01:00
* Add more informative validation error messages for non-unique slugs within the admin interface and for programmatic page creation (Benjamin Bach)
2022-11-25 18:16:05 +01:00
* Always show the page editor title field’ s border when the field is empty (Thibaud Colas)
2022-11-23 18:20:40 +01:00
* Snippet models extending `DraftStateMixin` now automatically define a "Publish" permission type (Sage Abdullah)
2022-12-07 11:43:09 +01:00
* Users now remain on the edit page after saving a snippet as draft (Sage Abdullah)
2022-10-18 18:34:29 +02:00
### Bug fixes
2022-10-19 22:35:05 +02:00
* Make sure workflow timeline icons are visible in high-contrast mode (Loveth Omokaro)
2022-10-13 23:20:23 +02:00
* Ensure authentication forms (login, password reset) have a visible border in Windows high-contrast mode (Loveth Omokaro)
2022-10-14 07:09:02 +02:00
* Ensure visual consistency between buttons and links as buttons in Windows high-contrast mode (Albina Starykova)
2022-10-20 01:36:16 +02:00
* Ensure `ChooserBlock.extract_references` uses the model class, not the model string (Alex Tomkins)
2022-10-21 11:24:03 +02:00
* Incorrectly formatted link in the documentation for Wagtail community support (Bolarinwa Comfort Ajayi)
2022-10-22 16:45:16 +02:00
* Ensure logo shows correctly on log in page in Windows high-contrast mode (Loveth Omokaro)
2022-11-07 10:29:11 +01:00
* Comments notice background overflows its container (Yekasumah)
2022-11-04 10:34:37 +01:00
* Ensure links within help blocks meet colour contrast guidelines for accessibility (Theresa Okoro)
2022-11-01 09:39:44 +01:00
* Ensure the skip link (used for keyboard control) meets colour contrast guidelines for accessibility (Dauda Yusuf)
2022-10-28 09:38:58 +02:00
* Ensure tag fields correctly show in both dark and light Windows high-contrast modes (Albina Starykova)
2022-11-02 14:08:15 +01:00
* Ensure new tooltips & tooltip menus have visible borders and tip triangle in Windows high-contrast mode (Juliet Adeboye)
2022-11-02 17:16:06 +01:00
* Ensure there is a visual difference of 'active/current link' vs normal links in Windows high-contrast mode (Mohammad Areeb)
2022-11-04 15:14:21 +01:00
* Avoid issues where trailing whitespace could be accidentally removed in translations for new page & snippet headers (Florian Vogt)
2022-11-10 09:31:00 +01:00
* Make sure minimap error indicators follow the minimap scrolling (Thibaud Colas)
2022-11-11 18:13:16 +01:00
* Remove the ability to view or add comments to `InlinePanel` inner fields to avoid lost or incorrectly linked comments (Jacob Topp-Mugglestone)
2022-11-17 17:23:38 +01:00
* Use consistent heading styles on top-level fields in the page editor (Sage Abdullah)
2022-11-17 17:37:21 +01:00
* Allow button labels to wrap onto two lines in dropdown buttons (Coen van der Kamp)
2022-11-18 22:57:46 +01:00
* Allow both horizontal and vertical manual resizing of TextFields (Anisha Singh)
2022-11-19 00:07:24 +01:00
* Move DateField, DateTimeField, TimeField comment buttons to be right next to the fields (Theresa Okoro)
2022-11-19 00:23:39 +01:00
* Support text resizing in workflow steps cards (Ivy Jeptoo)
2022-10-28 10:26:25 +02:00
* Ignore images added via fixtures when using `WAGTAILIMAGES_FEATURE_DETECTION_ENABLED` to avoid errors for images that do not exist (Aman Pandey)
2022-11-17 16:06:15 +01:00
* Restore ability to perform JSONField query operations against StreamField when running against the Django 4.2 development branch (Sage Abdullah)
2022-11-19 18:52:14 +01:00
* Ensure there is correct grammar and pluralisation for Tab error counts shown to screen readers (Aman Pandey)
2022-11-06 16:42:02 +01:00
* Pass through expected expected `cc` , `bcc` and `reply_to` to the Django mail helper from `wagtail.admin.mail.send_mail` (Ben Gosney)
2022-08-04 15:47:32 +02:00
* Allow reviewing or reverting to a Page's initial revision (Andy Chosak)
2022-11-23 23:05:40 +01:00
* Allow both horizontal and vertical manual resizing of TextFields (Anisha Singh)
2022-11-28 12:44:22 +01:00
* Use the correct padding for autocomplete block picker (Umar Farouk Yunusa)
2022-11-14 17:33:00 +01:00
* Ensure that short content pages (such as editing snippets) do not show an inconsistent background (Sage Abdullah)
2022-10-18 18:34:29 +02:00
2022-11-12 01:30:47 +01:00
### Documentation
* Add custom permissions section to permissions documentation page (Dan Hayden)
* Wagtail's documentation (v2.9 to v4.0) has been updated on [Dash user contributions ](https://github.com/Kapeli/Dash-User-Contributions ) for [Dash ](https://kapeli.com/dash ) or [Zeal ](https://zealdocs.org/ ) offline docs applications (Damilola Oladele, Mary Ayobami, Elizabeth Bassey)
* Add documentation for how to get started with [contributing translations ](contributing_translations ) for the Wagtail admin (Ogunbanjo Oluwadamilare)
* Officially recommend `fnm` over `nvm` in development documentation (LB (Ben) Johnston)
* Mention the importance of passing `request` and `current_site` to `get_url` on the [performance ](performance ) documentation page (Jake Howard)
* Add documentation for [`register_user_listing_buttons` ](register_user_listing_buttons ) hook (LB (Ben Johnston))
* Add development (contributing to Wagtail) documentation notes for [development on Windows ](development_on_windows ) (Akua Dokua Asiedu)
2022-11-18 12:24:08 +01:00
* Mention Wagtail’ s usage of Django’ s default user model by default (Temidayo Azeez)
* Add links to treebeard documentation for relevant methods (Temidayo Azeez)
2022-11-18 23:17:59 +01:00
* Add clarification on where to register entity plugins (Mark McOsker)
2022-10-16 02:11:05 +02:00
* Fix logo in README not being visible in high-contrast mode (Benita Anawonah)
2022-11-18 16:19:15 +01:00
* Improve 'first wagtail site' tutorial (Akua Dokua Asiedu)
* Grammatical adjustments of `page models` usage guide (Damilola Oladele)
* Add class inheritance information to StreamField block sreference (Temidayo Azeez)
2022-11-19 22:50:47 +01:00
* Document the hook [`register_image_operations` ](register_image_operations ) and add an example of a [custom Image filter ](custom_image_filters ) (Coen van der Kamp)
2022-11-12 01:30:47 +01:00
### Maintenance
* Upgrade to Node 18 for frontend build tooling (LB (Ben) Johnston)
* Run Python tests with coverage and upload coverage data to codecov (Sage Abdullah)
* Clean up duplicate JavaScript for the `escapeHtml` function (Jordan Rob)
* Ensure that translation file generation ignores JavaScript unit tests and clean up unit tests for Django gettext utils (LB (Ben Johnston))
* Migrated `initButtonSelects` from core.js to own TypesScript file and add unit tests (Loveth Omokaro)
* Migrated `initSkipLink` util to TypeScript and add JSDoc & unit tests (Juliet Adeboye)
* Clean up some unused utility classes and migrate `unlist` to Tailwind utility class `w-list-none` (Loveth Omokaro)
* Clean up linting on legacy code and add shared util `hasOwn` in TypeScript (Loveth Omokaro)
* Remove unnecessary box-sizing: border-box declarations in SCSS (Albina Starykova)
* Migrated `initTooltips` to TypeScript add JSDoc and unit tests (Fatuma Abdullahi)
* Migrated `initTagField` from core.js to own TypeScript file and add unit tests (Chisom Okeoma)
2022-11-03 22:07:17 +01:00
* Added unit tests & JSDoc to `initDissmisibles` (Yekasumah)
2022-11-23 21:04:56 +01:00
* Standardise on `classname` for passing HTML class attributes (LB (Ben Johnston))
2022-12-03 03:45:09 +01:00
* Clean up expanding formset JavaScript initialisation code and adopt a class approach (Matt Westcott)
2022-12-06 19:08:35 +01:00
* Extracted revision and draft state logic from generic views into mixins (Sage Abdullah)
2022-11-12 01:30:47 +01:00
2022-10-18 18:34:29 +02:00
## Upgrade considerations
2022-08-10 05:07:27 +02:00
### Wagtail-specific image field (`WagtailImageField`)
2022-11-20 13:27:27 +01:00
The `AbstractImage` and `AbstractRendition` models use a Wagtail-specific `WagtailImageField` which extends Django's `ImageField`
to use [Willow ](https://github.com/wagtail/Willow/ ) for image file handling. This will generate a new migration if you
2022-08-10 05:07:27 +02:00
are using a [custom image model ](custom_image_model )
2022-11-11 18:13:16 +01:00
### Comments within `InlinePanel` not supported
When the commenting system was introduced, support for `InlinePanel` fields was incorrectly added. This has lead to issues
where comments can be lost on save or in most cases will be added to the incorrect item within the `InlinePanel` . The ability
to add comments here has now been removed and as such any existing comments that were added will no longer show.
See https://github.com/wagtail/wagtail/issues/9685 for tracking of adding this back officially in the future.
2022-11-20 13:23:08 +01:00
### Adoption of `classname` convention for some template tags & includes
Some undocumented Wagtail admin template tags and includes have been refactored to adopt a more consistent naming of `classname` .
If these are used within packages or customisations they will need to be updated to the new variable naming convention.
| Name | New (`classname`) | Old (various) |
| ------------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- |
| `dialog_toggle` | `{% dialog_toggle classname='...' %}` | `{% dialog_toggle class_name='...' %}` |
| `paginate` | `{% paginate pages classname="..." %}` | `{% paginate pages classnames="..." %}` |
| `tab_nav_link` | `{% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with classname="..." %}` | `{% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with classes="..." %}` |
| `side_panel_button` | `{% include 'wagtailadmin/shared/side_panels/includes/side_panel_button.html' with classname="..." %}` | `{% include 'wagtailadmin/shared/side_panels/includes/side_panel_button.html' with classes="..." %}` |
2022-12-05 15:08:03 +01:00
### `InlinePanel` JavaScript function is now a class
The (internal, undocumented) `InlinePanel` JavaScript function, used to initialise client-side behaviour for inline panels, has been converted to a class. Any user code that calls this function should now replace `InlinePanel(...)` calls with `new InlinePanel(...)` . Additionally, child form controls are now initialised automatically, and so it is no longer necessary to call `initChildControls` , `updateChildCount` , `updateMoveButtonDisabledStates` or `updateAddButtonState` .
Python code that uses the `InlinePanel` panel type is not affected by this change.