Upgrade consideration note for change of Page panel definitions

pull/12750/head
Matt Westcott 2025-01-03 17:21:07 +00:00 zatwierdzone przez Sage Abdullah
rodzic 3f91fcb3a3
commit 216b80111b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: EB1A33CC51CC0217
2 zmienionych plików z 7 dodań i 0 usunięć
docs/releases

Wyświetl plik

@ -41,6 +41,7 @@ Changelog
* Fix: Return never-cache HTTP headers when serving pages and documents with view restrictions (Krystian Magdziarz, Dawid Bugajewski)
* Fix: Implement `get_block_by_content_path` on `ImageBlock` to prevent errors on commenting (Matt Westcott)
* Fix: Add `aria-expanded` attribute to new column button on `TypedTableBlock` to reflect menu state (Ayaan Qadri, Scott Cranfill)
* Fix: Allow page models to extend base `Page` panel definitions without importing `wagtail.admin` (Matt Westcott)
* Docs: Move the model reference page from reference/pages to the references section as it covers all Wagtail core models (Srishti Jaiswal)
* Docs: Move the panels reference page from references/pages to the references section as panels are available for any model editing, merge panels API into this page (Srishti Jaiswal)
* Docs: Move the tags documentation to standalone advanced topic, instead of being inside the reference/pages section (Srishti Jaiswal)

Wyświetl plik

@ -53,6 +53,7 @@ depth: 1
* Return never-cache HTTP headers when serving pages and documents with view restrictions (Krystian Magdziarz, Dawid Bugajewski)
* Implement `get_block_by_content_path` on `ImageBlock` to prevent errors on commenting (Matt Westcott)
* Add `aria-expanded` attribute to new column button on `TypedTableBlock` to reflect menu state (Ayaan Qadri, Scott Cranfill)
* Allow page models to extend base `Page` panel definitions without importing `wagtail.admin` (Matt Westcott)
### Documentation
@ -170,6 +171,11 @@ The old style will now produce a deprecation warning.
## Upgrade considerations - changes to undocumented internals
### Changes to `content_panels`, `promote_panels` and `settings_panels` values on base `Page` model
Previously, the `content_panels`, `promote_panels` and `settings_panels` attributes on the base `Page` model were defined as lists of `Panel` instances. These lists now contain instances of `wagtail.models.PanelPlaceholder` instead, which are resolved to `Panel` instances at runtime. Panel definitions that simply extend these lists (such as `content_panels = Page.content_panels + [...]`) are unaffected; however, any logic that inspects these lists (for example, finding a panel in the list to insert a new one immediately after it) will need to be updated to handle the new object types.
### Removal of unused Rangy JS library
The unused JavaScript include `wagtailadmin/js/vendor/rangy-core.js` has been removed from the editor interface, and functions such as `window.rangy.getSelection()` are no longer available. Any code relying on this should now either supply its own copy of the [Rangy library](https://github.com/timdown/rangy), or be migrated to the official [`Document.createRange()`](https://developer.mozilla.org/en-US/docs/Web/API/Range) browser API.