Fixes#9118. Permission policies can now be initialised by passing a model string rather than a class; wagtail.admin.widgets.chooser.BaseChooser had this capability already. Between these, we can adjust wagtail.documents.views.chooser so that no models need to be imported at module load time. As a result, definitions that depend on this module (such as DocumentChooserBlock) can now be included in the same models file as a custom document model, without causing a circular import.
- relates to #9104
- Removed: .button-neutral, .button-strokeonhover and .hover-no.
- Replaced hardcoded font size, font weight values with theme variables.
- Removed overridden duplicate styles for .yes, .no and .bicolor.
- Merged a few styles under one class.
- Removed non-link button which was using span tag from styleguide, remove other unhelpful examples
This prevents errors when comments.js is loaded but a view does not use
the commenting functionality, which caused issues for StructBlocks containing
FieldBlocks on non page-models. In future we should only load comments.js
where it is actually needed as well.
- Since AbstractForm inherited from Page, any custom Page subclass couldn't use it.
- Changing it to a mixin allows subclasses of Page to gain Form Builder.
- defining FormMixin and EmailFormMixin and making the AbstractForm AbstractEmailForm using it
- adding a docstring to EmailFormMixin
- replaces #2900 (PR)
This exception has not existed since Willow 0.3. Type checking on the 'except' line only happens when an exception occurs, so most of the time this is harmless, but if an unrelated exception occurs here (such as that caused by a faulty filetype library: https://github.com/h2non/filetype.py/issues/130) the real exception gets masked by an AttributeError for the missing definition.
This improves page responsiveness on first load, especially on pages with many images (eg images list in Wagtail admin)
* Lazy load thumbnails on modeladmin lists
* Update oembed photos to use lazy loading
* Use lazy loading for `MediaBlock`, the avatar in the sidebar and comments
* Just decode chooser images async
- Allow users to override the default attributes given to an image
- Update tests to account for new tags
- Add documentation for custom image attributes
- Recommend that loading=lazy & decoding=async be considered for performance in front-end sites