0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
wagtail/docs/releases/5.0.2.md

60 lines
1.9 KiB
Markdown
Raw Normal View History

2023-06-13 14:20:50 +02:00
# Wagtail 5.0.2 release notes
_Unreleased_
```{contents}
---
local:
depth: 1
---
```
## What's new
### New features
* Added [](title_field_panel) to support title / slug field synchronisation (LB (Ben) Johnston)
2023-06-13 14:20:50 +02:00
### Bug fixes
2023-06-14 19:50:21 +02:00
* Prevent JS error when reverting the spinner on a submit button after a validation error (LB (Ben) Johnston)
* Prevent crash when comparing page revisions that include `MultipleChooserPanel` (Matt Westcott)
* Ensure that title and slug continue syncing after entering non-URL-safe characters (LB (Ben) Johnston)
2023-06-15 13:21:28 +02:00
* Ensure that title and slug are synced on keypress, not just on blur (LB (Ben) Johnston)
* Add a more visible active state for side panel toggle buttons (Thibaud Colas)
2023-06-20 14:26:28 +02:00
* Use custom dark theme colors for revision comparisons (Thibaud Colas)
## Upgrade considerations
### Use of `TitleFieldPanel` for the page title field
This release introduces a new [](title_field_panel) class, which is used by default for the page title field and provides the mechanism for synchronising the slug field with the title. Prior to Wagtail 5.0, this happened automatically on any field named 'title'.
If you have used `FieldPanel("title")` directly in a panel definition (rather than extending `Page.content_panels` as standard), and wish to restore the previous behaviour of auto-populating the slug, you will need to change this to `TitleFieldPanel("title")`. For example:
```python
from wagtail.admin.panels import FieldPanel, MultiFieldPanel
# ...
content_panels = [
MultiFieldPanel([
FieldPanel("title"),
FieldPanel("subtitle"),
]),
]
```
should become:
```python
from wagtail.admin.panels import FieldPanel, MultiFieldPanel, TitleFieldPanel
# ...
content_panels = [
MultiFieldPanel([
TitleFieldPanel("title"),
FieldPanel("subtitle"),
]),
]
```