Add upgrade considerations for data-tippy attribute deprecation

pull/11454/head
LB Johnston 2023-09-15 06:18:27 +10:00 zatwierdzone przez Thibaud Colas
rodzic edc5991f50
commit 0ee97d45de
2 zmienionych plików z 21 dodań i 0 usunięć

Wyświetl plik

@ -100,6 +100,7 @@ Changelog
* Maintenance: Upgrade sphinxcontrib-spelling to 7.x for Python 3.12 compatibility (Matt Westcott)
* Maintenance: Move logic for django-filters filtering into `BaseListingView` (Matt Westcott)
* Maintenance: Refactor listing views to share more queryset ordering logic (Matt Westcott)
* Maintenance: Remove `initTooltips` in favour of Stimulus controller (LB (Ben) Johnston)
5.2.3 (xx.xx.xxxx) - IN DEVELOPMENT

Wyświetl plik

@ -138,6 +138,7 @@ Thank you to Thibaud Colas and Badr Fourane for their work on this feature.
* Rewrite styles using legacy `c-`, `o-`, `u-`, `t-`, `is-` prefixes (Thibaud Colas)
* Remove invalid CSS styles / Sass selector concatenation (Thibaud Colas)
* Refactor listing views to share more queryset ordering logic (Matt Westcott)
* Remove `initTooltips` in favour of Stimulus controller (LB (Ben) Johnston)
## Upgrade considerations - removal of deprecated features from Wagtail 4.2 - 5.1
@ -239,3 +240,22 @@ class MyPage(Page):
### `filter_queryset` and `get_filtered_queryset` methods no longer return filters
The undocumented internal methods `filter_queryset(queryset)` on `wagtail.admin.views.generic.IndexView`, and `get_filtered_queryset()` on `wagtail.admin.views.reports.ReportView`, now return just the filtered queryset; previously they returned a tuple of `(filters, queryset)`. The filterset instance is always available as the cached property `self.filters`.
### `data-tippy-content` attribute support will be removed
The implementation of the JS tooltips have been fully migrated to the Stimulus `w-tooltip`/`TooltipController` implementation.
Dynamic support for any `data-tippy-content="..."` usage will be removed this release, for example, within chooser modals or dynamic html response data.
Some minimal backwards compatibility support for `data-tippy-content` will work until a future release, but only in the initial HTML response on a page.
#### Data attributes
These HTML data attributes were not documented, but if any custom code implemented custom tooltips, these will need to be changed.
| Old | New | Notes |
| -------------------------------------------- | ------------------------------------------------------ | ------------------------------------ |
| | `data-controller="w-tooltip"` | Required, new addition for any usage |
| `data-tippy-content="{% trans 'History' %}"` | `data-w-tooltip-content-value="{% trans 'History' %}"` | Required |
| `data-tippy-offset="[12, 24]"` | `data-w-tooltip-offset-value="[12, 24]"` | Optional, default is no offset |
| `data-tippy-placement="top"` | `data-w-tooltip-placement-value="top"` | Optional, default is 'bottom' |