10 KiB
Wagtail 4.2 release notes - IN DEVELOPMENT
Unreleased
---
local:
depth: 1
---
What's new
Other features
- Switch to using Willow instead of Pillow for images (Darrel O'Pry)
- Test assertion
WagtailPageTestCase.assertCanCreate
now supports the kwargpublish=True
to check publish redirection (Harry Percival, Akua Dokua Asiedu) - Ensure that the
rebuild_references_index
command can run without console output if called with--verbosity 0
(Omerzahid Ali, Aman Pandey) - Add full support for secondary buttons with icons in the Wagtail design system -
button bicolor button--icon button-secondary
including thebutton-small
variant (Seremba Patrick) - Add
purge_embeds
management command to delete all the cached embed objects in the database (Aman Pandey) - Make it possible to resize the page editor’s side panels (Sage Abdullah)
- Add ability to include
form_fields
as an APIField onFormPage
(Sævar Öfjörð Magnússon, Suyash Singh, LB (Ben) Johnston) - Ensure that images listings are more consistently aligned when there are fewer images uploaded (Theresa Okoro)
- Add more informative validation error messages for non-unique slugs within the admin interface and for programmatic page creation (Benjamin Bach)
- Always show the page editor title field’s border when the field is empty (Thibaud Colas)
- Snippet models extending
DraftStateMixin
now automatically define a "Publish" permission type (Sage Abdullah)
Bug fixes
- Make sure workflow timeline icons are visible in high-contrast mode (Loveth Omokaro)
- Ensure authentication forms (login, password reset) have a visible border in Windows high-contrast mode (Loveth Omokaro)
- Ensure visual consistency between buttons and links as buttons in Windows high-contrast mode (Albina Starykova)
- Ensure
ChooserBlock.extract_references
uses the model class, not the model string (Alex Tomkins) - Incorrectly formatted link in the documentation for Wagtail community support (Bolarinwa Comfort Ajayi)
- Ensure logo shows correctly on log in page in Windows high-contrast mode (Loveth Omokaro)
- Comments notice background overflows its container (Yekasumah)
- Ensure links within help blocks meet colour contrast guidelines for accessibility (Theresa Okoro)
- Ensure the skip link (used for keyboard control) meets colour contrast guidelines for accessibility (Dauda Yusuf)
- Ensure tag fields correctly show in both dark and light Windows high-contrast modes (Albina Starykova)
- Ensure new tooltips & tooltip menus have visible borders and tip triangle in Windows high-contrast mode (Juliet Adeboye)
- Ensure there is a visual difference of 'active/current link' vs normal links in Windows high-contrast mode (Mohammad Areeb)
- Avoid issues where trailing whitespace could be accidentally removed in translations for new page & snippet headers (Florian Vogt)
- Make sure minimap error indicators follow the minimap scrolling (Thibaud Colas)
- Remove the ability to view or add comments to
InlinePanel
inner fields to avoid lost or incorrectly linked comments (Jacob Topp-Mugglestone) - Use consistent heading styles on top-level fields in the page editor (Sage Abdullah)
- Allow button labels to wrap onto two lines in dropdown buttons (Coen van der Kamp)
- Allow both horizontal and vertical manual resizing of TextFields (Anisha Singh)
- Move DateField, DateTimeField, TimeField comment buttons to be right next to the fields (Theresa Okoro)
- Support text resizing in workflow steps cards (Ivy Jeptoo)
- Ignore images added via fixtures when using
WAGTAILIMAGES_FEATURE_DETECTION_ENABLED
to avoid errors for images that do not exist (Aman Pandey) - Restore ability to perform JSONField query operations against StreamField when running against the Django 4.2 development branch (Sage Abdullah)
- Ensure there is correct grammar and pluralisation for Tab error counts shown to screen readers (Aman Pandey)
- Pass through expected expected
cc
,bcc
andreply_to
to the Django mail helper fromwagtail.admin.mail.send_mail
(Ben Gosney) - Allow reviewing or reverting to a Page's initial revision (Andy Chosak)
- Allow both horizontal and vertical manual resizing of TextFields (Anisha Singh)
- Use the correct padding for autocomplete block picker (Umar Farouk Yunusa)
- Ensure that short content pages (such as editing snippets) do not show an inconsistent background (Sage Abdullah)
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 for Dash or Zeal offline docs applications (Damilola Oladele, Mary Ayobami, Elizabeth Bassey)
- Add documentation for how to get started with contributing translations for the Wagtail admin (Ogunbanjo Oluwadamilare)
- Officially recommend
fnm
overnvm
in development documentation (LB (Ben) Johnston) - Mention the importance of passing
request
andcurrent_site
toget_url
on the performance documentation page (Jake Howard) - Add documentation for
register_user_listing_buttons
hook (LB (Ben Johnston)) - Add development (contributing to Wagtail) documentation notes for development on Windows (Akua Dokua Asiedu)
- Mention Wagtail’s usage of Django’s default user model by default (Temidayo Azeez)
- Add links to treebeard documentation for relevant methods (Temidayo Azeez)
- Add clarification on where to register entity plugins (Mark McOsker)
- Fix logo in README not being visible in high-contrast mode (Benita Anawonah)
- 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)
- Document the hook
register_image_operations
and add an example of a custom Image filter (Coen van der Kamp)
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 classw-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) - Added unit tests & JSDoc to
initDissmisibles
(Yekasumah) - Standardise on
classname
for passing HTML class attributes (LB (Ben Johnston)) - Clean up expanding formset JavaScript initialisation code and adopt a class approach (Matt Westcott)
- Extracted revision and draft state logic from generic views into mixins (Sage Abdullah)
Upgrade considerations
Wagtail-specific image field (WagtailImageField
)
The AbstractImage
and AbstractRendition
models use a Wagtail-specific WagtailImageField
which extends Django's ImageField
to use Willow for image file handling. This will generate a new migration if you
are using a custom image model
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.
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="..." %} |