* Change all British spelling to American, in the page model section of the docs
* Change all British spelling to American spelling in the Customizing admin templates section of the docs
---------
Co-authored-by: Storm B. Heg <storm@stormbase.digital>
Tippy unmounts its popper element from the DOM on hide, which means that
the filter fields get detached from the form. As a result, when
performing a search (which means the filters popup is closed), any
filters that have been applied will be lost. The issue does not occur
the other way around (filtering after search) because the filter fields
will still be in the DOM (as the popup is open while you're applying the
filters).
Unfortunately, Tippy does not offer a built-in option to keep the popper
mounted in the DOM when it's hidden.
As a workaround, use Tippy's hooks to re-append the popper to the DOM.
- onCreate: ensure the popper element is mounted even when the tippy was
just created (normally it's only mounted when shown). This is useful
to keep the filters when searching after a full-page refresh (e.g.
after navigating to the next page in pagination).
- onHidden: ensure the popper is still mounted, to solve the main issue
- onShow: remove the hidden attribute and let tippy move the popper
element as necessary (though usually this isn't necessary, because we
remount it in the same position (the controller's element).
The 'hidden' attribute shouldn't cause any issues here as Tippy doesn't
use it. Without it, the solution still works because Tippy uses CSS to
make the element invisible. However, the complete CSS doesn't get
applied until the tippy is shown at least once. This means on initial
load with the onCreate hook, the tippy will take up the space while
being invisible. Using the attribute fixes it (and display:none probably
would too).
This behaviour can be enabled using the newly-added DropdownController
value 'keepMounted'.
- Fix various typos and grammar issues
- Use consistent approach to version updates & class-based (not class based) view naming
- Fix a malformed link for upgrade considerations
Also move the insertion of the param to get_url_without_foo methods to avoid the param getting applied multiple times and to avoid having to parse the URL again.
Rename the filter_fragment to _w_filter_fragment to avoid clashes
- html+django snippets are not parsing correctly due to script usage, replace with simple text snippets
- Fix up incorrect link added in extending_client_side
Fixes #11420
Two issues existed;
1. Safari will not set `document.activeElement` as expected in all other browsers, instead, when a button is clicked it will keep the activeElement as `body`. This meant that the reset of the disabled button (before the confirm triggers a click) was not working.
2. Visually the button still had the loading spinner due to w-progress controller having triggered the loading visuals, this did not block the behaviour but looked broken.
See Safari behaviour docs:
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
- https://bugs.webkit.org/show_bug.cgi?id=22261
When the page listing is in re-ordering mode, use the Table caption to provide a screen reader description.
This is more suitable instead of aria-describedby & builds on changes made in #11250
Following c51baf6d42 we have started seeing intermittent test failures on `wagtail.snippets.tests.test_bulk_actions.test_bulk_delete.TestSnippetDeleteView.test_after_bulk_action_hook` under Postgres: https://github.com/wagtail/wagtail/actions/runs/7624525647/job/20766838203
These failures seem to be because we were using `assertQuerysetEqual` to check the result of a database query that does not guarantee ordering. This result is in fact passed as a list rather than a queryset, so assertQuerysetEqual is not valid here. Instead, we compare the two lists as sets.
Additionally, this method is now named `assertQuerySetEqual` as of Django 4.2 (see https://docs.djangoproject.com/en/5.0/topics/testing/tools/#django.test.TransactionTestCase.assertQuerySetEqual) - update the valid uses of this elsewhere in the file.