This matches the hover animation exactly the same as in Wagtail but without the "playful" wagtail Easter egg (where the original hover animation came from)
* This commit only covers the migration of the icons in the menu and draftail editor. All
other admin menu icons remain implemented as before.
* Existing font based icon support still exists.
* Convert menu icons to SVG
* This could be considered a breaking change for any Wagtail sites or
packages that are leveraging Wagtail's Button and Icon React components.
* Remove references to unused `submenu-trigger` class
* Prefix icon `id`s with `icon-` to prevent `id` collisions
* Add hooks support (not yet documented) for adding custom icons
* Separated logic for extracting indexable content
* Docs edits
* Readability improvements
* Simplify/deduplicate indexing code
* Simplify search code
Pulled in some code that will be included in a future Django release
(query.py)
* Reword a limitation
* Fix typo in docstring
* Raise a warning when Boost() is used in PostgreSQL search backend
* Add note mentioning that RawSearchQuery can be replaced in Django 3.1
* Add comment mentioning that we can replace query.py if Django PR merged
* Jest 24 is out but upgrading to it would require us to also update our Webpack tooling to Babel 7, which is quite significant work.
* Rewrite Draftail initialisation tests to stop relying on jsdom script parsing
When a slice is specifically set to [0:0], which would yield an empty list,
instead wagtail will clear the slice, effectively downloading the entire search
index.
This scenario happens when a search term does not return any results.
So every time you enter a search term that has no results, the entire search
index is downloaded, you don't really feel it because wagtail only downloads
the pk values, and it is unlikely a site has millions of pages, but it is still
very inefficient and unwanted.
* bulk_delete exists to avoid allowing users to delete a whole lot of pages all at once by mistake, when they think they're just deleting one. However, the move/delete analogue breaks down when you're talking about moving an entire subtree, because you're *not* directly altering the children of the moved Page.
* This method was inspired by a Lacey Williams Henschel (@williln) presentation at Wagtail Space US 2018, called 'What the Wagtail docs don't tell you'. https://www.youtube.com/watch?v=PCkxBNXWM64&t=1220s
* Add docs section reference/contrib/redirects
* `reverse` was used but not imported in the wagtail_hooks.py examples, causing them to be invalid
* I switched the Django `url` calls to use `path` instead since that seems both cleaner and officially recommended, the url function is "likely to be deprecated in a future release" per Django docs and `path` is starting to replace it in urls.py files now
* Update ImageRendtion to use default_alt_text property of Image
* Update example in documentation
* Add a test for ImageRenditionField
* Resolves #5816
- use .add_css_file instead of .add_stylesheet in conf.py
- use .add_js_file instead of .add_javascript in conf.py
- fix duplicate clss references in pages model reference (for grouping of methods & attributes)
- rename wagtailspace.js to banner.js (may be used in the future for a generic banner)
Page.context_object_name can be used to define a more meaningful name
for the page variable in the template.
If defined, the default `page` and `self` are still available for use in
shared templates.
Resolves #5213
* Rewrite AbstractEmailForm render to use cleaned_data
* Add date time formatting to AbstractEmailForm's render method according to Django settings SHORT_DATE_FORMAT and
SHORT_DATETIME_FORMAT
* Previously it was iterating over `form` which left no place to remove
data from the submission without removing the field from the form (which
is inadvisable, as discussed on #4313)
* Preserve order of fields in form emails using cleaned data
* Add a test for consistent date rendering in email forms
* update form customisation examples and add note about date / time formatting in email form usage (docs)
* resolves #3733
* resolves #4313
* adds users view to group view (users filtered by that group)
* adds the ability to go to the users list for the group currently being edited (via header link)
* fix issue where the link to add a new user (when no users found) was broken
* resolves #5801
If validation rules prevent the multiple image upload view from
creating Image objects from just the image file, an UploadedImage object is
created instead, and turned into an image once the form is filled in.
* Fixes #847
* Add UploadedImage model and related views
* Update custom image model docs
According to the ARIA spec:
> A region that contains mostly site-oriented content, rather than page-specific content.
> Site-oriented content typically includes things such as the logo or identity of the site sponsor, and a site-specific search tool. A banner usually appears at the top of the page and typically spans the full width.
Where the `banner` role was applied was more page-specific than
site-specific. In addition, tags with `banner` roles should not live
under another landmark. To rectify, removed the misused banner roles.
Remove inappropriate contentinfo landmarks
According to ARIA spec 1.1
> A large perceivable region that contains information about the parent document.
> Examples of information included in this region of the page are copyrights and links to privacy statements.
They don't apply to the action buttons on where this was applied to.
Add main landmark to 404 page
- fixes #5099
- test_copy_page_with_excluded_parental_and_child_relations
- ensure the tests are wrapped in a try/finally so that the model is always reset back even if tests fail
- update page model tests
Fixes wagtail/wagtail#5937
This reverts Wagtail's behaviour to match Django's, where an error is
raised as a safety mechanism.
Projects relying on the non-safe behaviour should update e.g.
`MyModel.objects.delete()` to `MyModel.objects.all().delete()`.
Currently a select set of StreamField blocks like PageChooserBlock
expose a bulk_to_python method that is used to optimize their
retrieval from the database. As reported in issue 5926, ListBlock could
take advantage of this so that its child items are loaded at once,
instead of one at a time.
This change modifies how ListBlock.to_python works so that it calls its
child block's bulk_to_python, if defined. This allows for a single query
instead of one query per child item.
Note that this change doesn't add bulk_to_python to ListBlock itself,
meaning that individual ListBlocks in a StreamField or StructBlock are
still retrieved independently. But it does optimize the lookup for each
ListBlock.
Image operations sometimes calculate a target width or height of zero, which
make Willow raise a ValueError.
If an user uploads one such image it's possible to break the whole Wagtail
image manager/picker/uploader for all users.
The fix is to use a minimum of 1 pixel for either the target height or the
width. The image might lose some aspect ratio, but it's better than an
exception.
Building the docs currently generates a warning:
wagtail/docs/reference/contrib/modeladmin/indexview.rst:423: WARNING: Could not lex literal_block as "python". Highlighting skipped.
This is due to use of backticks instead of single quotes on this page:
https://docs.wagtail.io/en/v2.8/reference/contrib/modeladmin/indexview.html#modeladmin-get-queryset
In practice this doesn't seem to actually break highlighting, but it's still good to fix.