wagtail/docs/releases/6.0.md

224 wiersze
14 KiB
Markdown
Czysty Zwykły widok Historia

2023-10-26 09:29:31 +00:00
# Wagtail 6.0 release notes - IN DEVELOPMENT
2023-10-20 13:27:19 +00:00
_Unreleased_
```{contents}
---
local:
depth: 1
---
```
## What's new
### Django 5.0 support
This release adds support for Django 5.0. The support has also been backported to Wagtail 5.2 LTS.
2023-10-20 13:27:19 +00:00
### New developer tutorial
A new [developer tutorial](../tutorial/index) series has been added to the documentation. This series builds upon the pre-existing [](/getting_started/tutorial), going through the creation and deployment of a portfolio website.
2024-01-02 09:00:29 +00:00
This tutorial series was created by Damilola Oladele as part of the Google Season of Docs program, with support from Meagen Voss, and Thibaud Colas. We also thank Storm Heg, Kalob Taulien, Kátia Nakamura, Mariusz Felisiak, and Rachel Smith for their support and feedback as part of the project.
### Right-to-left language support
The admin interface now supports right-to-left languages, such as Persian, Arabic, Hebrew. Though there are still some areas that need improvement, all admin views will now be displayed in the correct direction.
2023-10-20 13:27:19 +00:00
### Other features
* Added `search_index` option to StreamField blocks to control whether the block is indexed for searching (Vedant Pandey)
* Remember previous location on returning from page add/edit actions (Robert Rollins)
2023-11-07 14:28:50 +00:00
* Update settings file in project settings to address Django 4.2 deprecations (Sage Abdullah)
* Improve layout and accessibility of the image URL generator page, reduce reliance on JavaScript (Temidayo Azeez)
* Allow `UniqueConstraint` in place of `unique_together` for {class}`~wagtail.models.TranslatableMixin`'s system check (Temidayo Azeez, Sage Abdullah)
* Make use of `IndexView.get_add_url()` in snippets index view template (Christer Jensen, Sage Abdullah)
* Allow `Page.permissions_for_user()` to be overridden by specific page types (Sébastien Corbin)
* Improve visual alignment of explore icon in Page listings for longer content (Krzysztof Jeziorny)
* Add `extra_actions` blocks to Snippets and generic index templates (Bhuvnesh Sharma)
2023-09-01 13:42:48 +00:00
* Added page types usage report (Jhonatan Lopes)
2023-11-28 09:33:28 +00:00
* Add support for defining `panels` / `edit_handler` on `ModelViewSet` (Sage Abdullah)
* Use a single instance of `PagePermissionPolicy` in `wagtail.permissions` module (Sage Abdullah)
* Add max tag length validation for multiple uploads (documents/images) (Temidayo Azeez)
* Ensure expanded side panel does not overlap form content for most viewports (Chiemezuo Akujobi)
* Add ability to [modify the default ordering](page_model_ref) for the page explorer view (Shlomo Markowitz)
2023-12-12 21:13:17 +00:00
* Remove overly verbose image captions in image listings for screen readers (Sage Abdullah)
* Ensure screen readers and dictation tools can more easily navigate bulk actions in images, documents and page listings by streamlining labels and descriptions (Sage Abdullah)
2023-12-13 10:29:03 +00:00
* Remove support for Safari 14 (Thibaud Colas)
2023-12-15 04:07:21 +00:00
* Add ability to click to copy the URL in the image URL generator page (Sai Srikar Dumpeti)
2023-12-18 14:55:05 +00:00
* Add ability to filter by page type and date updated in the page listing view (Matt Westcott)
2023-12-19 16:59:06 +00:00
* Add ability to filter by owner and site in the page listing view (Matt Westcott)
2024-01-02 09:00:29 +00:00
* Show edit as a main action in generic history and usage views (Sage Abdullah)
* Make styles for header buttons consistent (Sage Abdullah)
* Improve styles of slim header's search and filters (Sage Abdullah)
* Change page listing's add button to icon-only (Sage Abdullah)
* Add sublabel to breadcrumbs, including history, usage, and inspect views (Sage Abdullah)
* Standardise search form placeholder to 'Search…' (Sage Abdullah)
* Use SlugInput on all SlugFields by default (LB (Ben) Johnston)
2024-01-02 09:00:29 +00:00
2023-10-20 13:27:19 +00:00
### Bug fixes
* Update system check for overwriting storage backends to recognise the `STORAGES` setting introduced in Django 4.2 (phijma-leukeleu)
* Prevent password change form from raising a validation error when browser autocomplete fills in the "Old password" field (Chiemezuo Akujobi)
* Ensure that the legacy dropdown options, when closed, do not get accidentally clicked by other interactions wide viewports (CheesyPhoenix, Christer Jensen)
* Add a fallback background for the editing preview iframe for sites without a background (Ian Price)
* Preserve whitespace in rendered comments (Elhussein Almasri)
* Remove search logging from project template so that new projects without the search promotions module will not error (Matt Westcott)
* Ensure text only email notifications for updated comments do not escape HTML characters (Rohit Sharma)
* Use the latest draft when copying an unpublished page for translation (Andrey Nehaychik)
* Make Workflow and Aging Pages reports only available to users with page-related permissions (Rohit Sharma)
2023-11-14 18:56:36 +00:00
* Make searching on specific fields work correctly on Elasticsearch when boost is in use (Matt Westcott)
* Use a visible border and background color to highlight active formatting in the rich text toolbar (Cassidy Pittman)
* Ensure image focal point box can be removed (Gunnar Scherf)
* Ensure that Snippets search results correctly use the `index_results.html` or `index_results_template_name` override on initial load (Stefan Hammer)
2023-11-27 01:24:19 +00:00
* Avoid error when attempting to moderate a page drafted by a now deleted user (Dan Braghis)
* Do not show multiple error messages when editing a Site to use existing hostname and port (Rohit Sharma)
* Avoid error when exporting Aging Pages report where a page has an empty `last_published_by_user` (Chiemezuo Akujobi)
* Ensure Page querysets support using `alias` and `specific` (Tomasz Knapik)
2023-12-05 22:06:48 +00:00
* Ensure workflow dashboard panels work when the page/snippet is missing (Sage Abdullah)
* Ensure `ActionController` explicitly checks for elements that allow select functionality (Nandini Arora)
2023-10-20 13:27:19 +00:00
### Documentation
* Document, for contributors, the use of translate string literals passed as arguments to tags and filters using `_()` within templates (Chiemezuo Akujobi)
* Document all features for the Documents app in one location, see [](../advanced_topics/documents/index) (Neeraj Yetheendran)
* Add section to [testing docs](../advanced_topics/testing) about creating pages and working with page content (Mariana Bedran Lesche)
* Add more nuance to the database recommendations in [](performance_overview) (Jadesola Kareem)
* Add clarity that [`MultipleChooserPanel`](multiple_chooser_panel) may require a chooser viewset and how the functionality is expected to work (Andy Chosak)
* Clarify where documentation build commands should be run (Nikhil S Kalburgi)
2023-10-20 13:27:19 +00:00
### Maintenance
2023-10-19 16:09:55 +00:00
* Update BeautifulSoup upper bound to 4.12.x (scott-8)
2023-10-24 21:14:34 +00:00
* Migrate initialization of classes (such as `body.ready`) from multiple JavaScript implementations to one Stimulus controller `w-init` (Chiemezuo Akujobi)
* Adopt the usage of of translate string literals using `arg=_('...')` in all `wagtailadmin` module templates (Chiemezuo Akujobi)
2023-11-06 14:41:02 +00:00
* Migrate the contrib styleguide index view to a class-based view (Chiemezuo Akujobi)
* Update djhtml to 3.0.6 (Matt Westcott)
2023-11-06 14:41:02 +00:00
* Migrate the contrib settings edit view to a class-based view (Chiemezuo Akujobi, Sage Abdullah)
* Remove django-pattern-library upper bound in testing dependencies (Sage Abdullah)
* Split up functions in Elasticsearch backend for easier extensibility (Marcel Kornblum, Cameron Lamb, Sam Dudley)
* Relax draftjs_exporter dependency to allow using version 5.x (Sylvain Fankhauser)
* Refine styling of listings, account settings panels and the block chooser (Meli Imelda)
2023-11-09 08:56:08 +00:00
* Remove icon font support (Matt Westcott)
* Remove deprecated SVG icons (Matt Westcott)
2023-11-17 20:44:42 +00:00
* Remove icon font styles (Thibaud Colas)
* Migrate account editing view to a class-based view (Kehinde Bobade)
2023-10-27 06:45:09 +00:00
* Upgrade frontend tooling to use Node 20 (LB (Ben) Johnston)
2023-11-17 15:26:33 +00:00
* Upgrade `ruff` and replace `black` with `ruff format` (John-Scott Atlakson)
* Update Willow upper bound to 2.x (Dan Braghis)
2023-12-11 09:11:47 +00:00
* Refactor page explorer index template to extend generic index template (Sage Abdullah)
* Replace template components implementation with standalone `laces` library (Tibor Leupold)
2023-12-12 13:08:01 +00:00
* Refactor snippets index view and template to make better use of generic IndexView (Sage Abdullah)
2023-12-12 15:55:26 +00:00
* Introduce an internal `{% formattedfield %}` tag to replace direct use of `wagtailadmin/shared/field.html` (Matt Westcott)
2023-12-12 20:40:43 +00:00
* Update Telepath dependency to 0.3.1 (Matt Westcott)
* Allow `ActionController` to have a `noop` method to more easily leverage standalone Stimulus action options (Nandini Arora)
2023-12-13 10:29:03 +00:00
* Upgrade to latest TypeScript and Storybook (Thibaud Colas, Sage Abdullah)
* Turn on `skipLibCheck` for TypeScript (LB (Ben) Johnston)
2023-12-14 09:13:42 +00:00
* Refactor documents listing view to use generic IndexView (Sage Abdullah)
2023-12-15 04:07:21 +00:00
* Support for the Stimulus `CloneController` to auto clear the added content after a set duration (LB (Ben) Johnston)
2023-12-15 21:58:37 +00:00
* Refactor images listing view to use generic IndexView (Sage Abdullah)
2023-12-18 12:46:31 +00:00
* Refactor form pages listing view to use generic IndexView (Sage Abdullah)
* Update Stylelint, our linting configuration, Sass, and related code changes (LB (Ben) Johnston)
* Simplify browserslist and browser support documentation for maintainers (Thibaud Colas)
* Relax django-taggit dependency to allow 5.0 (Sylvain Fankhauser)
2024-01-02 06:16:11 +00:00
* Fix various warnings when building docs (Cynthia Kiser)
* Upgrade sphinxcontrib-spelling to 7.x for Python 3.12 compatibility (Matt Westcott)
2023-10-20 13:27:19 +00:00
2023-11-16 17:43:44 +00:00
## Upgrade considerations - removal of deprecated features from Wagtail 4.2 - 5.1
2023-10-20 13:27:19 +00:00
2023-11-16 17:43:44 +00:00
Features previously deprecated in Wagtail 4.2, 5.0 and 5.1 have been fully removed. For additional details on these changes, see:
* [Wagtail 4.2 release notes](/releases/4.2)
* [Wagtail 5.0 release notes](/releases/5.0)
* [Wagtail 5.1 release notes](/releases/5.1)
The most significant changes are highlighted below.
### Removal of ModelAdmin app
The `wagtail.contrib.modeladmin` app has been removed. If you wish to continue using it, it is available as the external package [`wagtail-modeladmin`](https://github.com/wagtail-nest/wagtail-modeladmin).
2023-10-20 13:27:19 +00:00
2023-10-23 16:16:34 +00:00
### Support for Elasticsearch 5 and 6 dropped
The Elasticsearch 5 and 6 backends have been removed. If you are using one of these backends, you will need to upgrade to Elasticsearch 7 or 8 before upgrading to Wagtail 6.0.
2023-11-16 17:43:44 +00:00
### StreamField no longer requires `use_json_field=True`
The `use_json_field` argument to `StreamField` is no longer required, and can be removed. StreamField now consistently uses JSONField for its database representation, and Wagtail 5.0 required older TextField-based streams to be migrated. As such, `use_json_field` no longer has any effect.
### Other removals
* The `WAGTAILADMIN_GLOBAL_PAGE_EDIT_LOCK` setting is no longer recognised and should be replaced with `WAGTAILADMIN_GLOBAL_EDIT_LOCK`.
* The `Query` model is no longer part of the `wagtail.search` module; it can now be found in the optional `wagtail.contrib.search_promotions` app.
* The `wagtail.models.UserPagePermissionsProxy` class and `get_pages_with_direct_explore_permission`, `get_explorable_root_page` and `users_with_page_permission` functions have been removed; equivalent functionality exists in the `wagtail.permission_policies.pages.PagePermissionPolicy` class.
* The `permission_type` field of the `GroupPagePermission` model has been removed; the `permission` field (a foreign key to Django's `Permission` model) should be used instead.
* The legacy moderation system used prior to the introduction of workflows in Wagtail 2.10 has been removed. Any moderation requests still in the queue from before this time will be lost.
* The Wagtail icon font has been removed; any direct usage of this needs to be converted to SVG icons.
* Various unused icons deprecated in Wagtail 5.0 have been removed.
* The `partial_match` argument on `SearchField` and on `search` methods has been removed. `AutocompleteField` and the `autocomplete` method should be used instead.
* The `insert_editor_css` hook has been removed; the `insert_global_admin_css` hook should be used instead.
* The `wagtail.contrib.frontend_cache` module now supports `azure-mgmt-cdn` version 10 and `azure-mgmt-frontdoor` version 1 as its minimum supported versions.
* The `Task.page_locked_for_user` method has been removed; `Task.locked_for_user` should be used instead.
* The `{% icon %}` template tag no longer accepts `class_name` as an argument; `classname` should be used instead.
* The `wagtail.tests.utils` module has been removed and can now be found at `wagtail.test.utils`.
* The template `wagtailadmin/shared/field_as_li.html` has been removed, and should be replaced with `wagtailadmin/shared/field.html` enclosed in an `<li>` tag.
* The custom client-side events `wagtail:show` and `wagtail:hide` on showing and hiding dialogs have been removed; `w-dialog:show` and `w-dialog:hide` should be used instead.
* The global Javascript definitions `headerSearch`, `initTagField`, `cancelSpinner` and `unicodeSlugsEnabled` have been removed; these should be replaced with Stimulus controllers.
## Upgrade considerations - changes affecting all projects
2023-10-20 13:27:19 +00:00
## Upgrade considerations - deprecation of old functionality
### Removed support for Django < 4.2
Django versions prior to 4.2 are no longer supported as of this release; please upgrade to Django 4.2 or above before upgrading Wagtail.
2023-10-20 13:27:19 +00:00
## Upgrade considerations - changes affecting Wagtail customisations
### `SlugInput` widget is now the default for `SlugField` fields
In Wagtail 5.0 a new `SlugInput` admin widget was added to support slug behavior in Page and Page copy forms. This widget was included by default if the `promote_panels` fields layout was customised, causing confusion.
As of this release, any forms that inherit from `WagtailAdminModelForm` (includes page and snippet model editing) will now use the `SlugInput` by default on all models with `SlugField` fields.
Previously, the widget had to be explicitly added.
```python
from wagtail.admin.widgets.slug import SlugInput
# ... other imports
class MyPage(Page):
promote_panels = [
FieldPanel("slug", widget=SlugInput),
# ... other panels
]
```
Keeping the widget as above is fine, but will no longer be required. The JavaScript field behavior will be included by default.
```python
# ... imports
class MyPage(Page):
promote_panels = [
FieldPanel("slug"),
# ... other panels
]
```
If you do not want this for some reason, you will now need to declare a different widget.
```python
from django.forms.widgets import TextInput
# ... other imports
class MyPage(Page):
promote_panels = [
FieldPanel("slug", widget=TextInput), # use a plain text field
# ... other panels
]
```
2023-10-20 13:27:19 +00:00
## Upgrade considerations - changes to undocumented internals