0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 13:10:14 +01:00
Commit Graph

16871 Commits

Author SHA1 Message Date
Sage Abdullah
a8bf1ab868 Run scripts inside teleported element in TeleportController 2024-01-24 09:32:28 +00:00
Sage Abdullah
981c1ac36a Fix drilldown component closing when interacting with datetime pickers 2024-01-24 09:32:28 +00:00
Sage Abdullah
0fb80e8aa0 Use get reference() instead of getReference() in DropdownController 2024-01-24 09:32:28 +00:00
Sage Abdullah
f1c4a495cc Do not reflect filter_fragment param in the browser
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
2024-01-24 09:32:28 +00:00
Sage Abdullah
bc381be264 Reset filters' w-drilldown state on close
This fixes the issue where the state is stuck at the last opened filter when the drilldown's contents are replaced
2024-01-24 09:32:28 +00:00
Sage Abdullah
238cbf3cd2 Dispatch w-dropdown:hidden event in DropdownController on tippy hide 2024-01-24 09:32:28 +00:00
Matt Westcott
e4e4ef96de include the filter fragment in generic/index_results.html too 2024-01-24 09:32:28 +00:00
Matt Westcott
58730e083d POC of updating filters dialog in response to removing active filters 2024-01-24 09:32:28 +00:00
Sage Abdullah
2b8d39ab0d Add 'reset' value to TeleportController to allow resetting the target element 2024-01-24 09:32:28 +00:00
Matt Westcott
08d5264088 Remove the explicit IndexResultsView in favour of IndexView with results_only=True 2024-01-24 09:32:28 +00:00
LB Johnston
bfd51fef7f Add changelog for #11503 2024-01-24 17:55:09 +10:00
Neeraj P Yetheendran
f341f6bee5 Fixed issues preventing build
- 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
2024-01-24 10:42:51 +10:00
Neeraj P Yetheendran
adfd8b32dc Flags added to convert doc build warnings to errors
- To ensure that the CI will fail if there are broken links or images.
- Fixes #9778
2024-01-24 10:42:51 +10:00
Rohit Sharma
996abeae8e Add initial redirects (contrib) API endpoint
Builds on previous PRs #6110 & #8842
2024-01-24 10:42:25 +10:00
Alex Morega
c4ef290859 Explicitly set triggerElement when invoking save (with publish) button on pages
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
2024-01-24 08:17:37 +10:00
elhussein almasri
d1b1fa638d Make TableBlock cells reachable using keyboard
Fixes #8893
2024-01-24 07:48:20 +10:00
Aman Pandey
690c382577 Use table caption instead of aria-describedby in page ordering
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
2024-01-24 06:54:40 +10:00
Aman Pandey
7f1216e225 Add table caption property in table class component
Add support for basic rendering of a screen reader (not visible) only caption element
Fixes #11493
2024-01-24 06:54:40 +10:00
Matt Westcott
e1693ee5db Release note for #10311 2024-01-23 16:53:14 +00:00
LB Johnston
b991ddf9c4 Deprecate WidgetWithScript - potentially unsafe and no longer used
- Avoid inline scripts in the test code, this approach is no longer recommended and causes CSP non-compliance
- Relates to #7053
2024-01-23 16:52:55 +00:00
LB Johnston
a17f7c3e1c Documentation - client-side Stimulus - add detailed integration example 2024-01-23 16:49:47 +00:00
Matt Westcott
aaffcc002e Update latest.txt for 5.2.3 release 2024-01-23 16:08:37 +00:00
Matt Westcott
e9e372272f Fill in release date for 5.2.3 2024-01-23 15:19:48 +00:00
Cynthia Kiser
e4c80fd2c3 Allow ordering from IndexView to work but still be overridden by ordering set in ModelViewSet (#11367)
Fixes #11165
2024-01-23 14:14:32 +00:00
Matt Westcott
8919ec6aeb Prevent test failures due to inconsistent queryset ordering on test_bulk_delete
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.
2024-01-23 14:01:48 +00:00
Matt Westcott
6b38cbfec9 Remove redundant override of ALLOWED_HOSTS 2024-01-23 10:42:16 +00:00
Sage Abdullah
eba827d4ae
Release note for #11477 2024-01-23 10:05:36 +00:00
Sage Abdullah
dbf3c7c586
Adjust margin-bottom of w-field__wrapper in drilldown component
Prevent the focus outline from being cut-off
2024-01-23 09:43:08 +00:00
Thibaud Colas
f1520bfcdd
Clean up unfinished aspects of DrilldownController 2024-01-23 09:22:30 +00:00
Sage Abdullah
7ba218a094
Use data-action to listen to w-swap:success in DrilldownController
and rename the method to updateParamsCount
2024-01-23 09:22:30 +00:00
Thibaud Colas
a1e3f755e5
Fix tests after filters-dialog removal 2024-01-23 09:22:30 +00:00
Thibaud Colas
68df8a0ba3
Add drilldown filters interface for universal listings 2024-01-23 09:22:30 +00:00
Sage Abdullah
59479a49cc
Restore changelog entry for #10104 2024-01-23 09:20:42 +00:00
Thibaud Colas
4790b44ba1
Move accessibility checker inside the editor (#11478). Fix #10136 2024-01-23 08:15:34 +00:00
Sage Abdullah
d518db125a Apply nice-padding to pagination in generic listing_results.html template
All views that extend the generic BaseListingView (including generic
IndexView) along with its template should already be adjusted to have
the full-width table styles, so the pagination needs to have its own
nice-padding so it's not too far to the left/right.
2024-01-23 06:50:07 +00:00
Sage Abdullah
71c7b24b62 Fix nice-padding of before_results block in images listing
Without this fix, the "other searches bar" will have the nice-padding
applied twice, making it appear too close to the centre.

Unfortunately, we have to use a new nice-padding wrapper instead of just
applying the class to the <ul>, because we apply the "unlist" mixin to
ul.listing which includes setting the left padding to 0 (and it beats
the specificity of a single .nice-padding class).
2024-01-23 06:50:07 +00:00
Sage Abdullah
1ab78fc5c1 Fix first column padding in page listings when custom ordering is active 2024-01-23 06:50:07 +00:00
Sage Abdullah
bbd22d8c43 Use bulk actions header's checkbox to detect bulk actions in listing styles
bulk-action-checkbox is the checkbox in the <td> elements. On page
listings, if you're searching and there are no results, the table will
still be displayed (to give you the option to search the whole site).
The table has no data rows, which means there are no elements with
bulk-action-checkbox class.

Change the selector to target the bulk-actions-filter-checkbox class
instead, which is the bulk action's <th> checkbox. This element (in the
header cell) is always available even when there are no results.
2024-01-23 06:50:07 +00:00
Rohit Sharma
50bdb724b5 Fix chooser buttons focus color is too dark in dark mode
Fixes #10875
2024-01-23 12:30:41 +10:00
elhussein almasri
175b7ac044 Fix exclude_fields_in_copy issues with default/unique values
- Ensure that revisions also exclude the field as an initial revision is created on page creation
- Fixes #11428
- Fixes #10922
- See also #11323 & #11323
2024-01-23 08:33:15 +10:00
Sage Abdullah
fa267c9b1a Fix workflow action buttons initialisation in footer actions
Regression in e801e6cec4 and 568256fb67

Dropdowns are now rendered using a <template> element from the server to
then be initialised by Tippy.js on the client. When the inline script in
_workflow_init.html runs (which is very early as it's inline), the
dropdown hasn't been rendered by Tippy, so the event listener can't be
attached.
2024-01-23 07:56:45 +10:00
Sage Abdullah
e664396135 Add data-edit-form to <form> element in generic/form.html template
Regression in dae20c2038 and 663f9603ca

This broke the preview panel and scheduled publishing dialog for snippets.
2024-01-23 07:56:45 +10:00
Salvo Polizzi
dd338de6f3 docs: documented get_children in Page model reference
Fixes #11499
2024-01-23 07:49:40 +10:00
Nick Smith
3d7bbeb908 Raise meaningful error when no site for SiteSetting (#11513) 2024-01-22 21:13:32 +00:00
Stefan Hammer
c51baf6d42 Update the fields in the database while the object is in draft state (#10104)
Fixes #9285
2024-01-22 20:09:32 +00:00
Sage Abdullah
acbadc1fad Use items_count directly in _page_title_column_header.html 2024-01-22 18:07:54 +00:00
Sage Abdullah
aff18d6788 Fix current pagination info when custom ordering is active in page listings 2024-01-22 18:07:54 +00:00
Matt Westcott
b5a1fd6cac Avoid error when ordering search results by latest_revision_created_at 2024-01-22 16:23:10 +00:00
Matt Westcott
8d32c8cb8d Use Django's built-in for ordering nulls first/last, instead of a custom annotation 2024-01-22 16:23:10 +00:00
Matt Westcott
97f80bfe20 Split out a get_valid_orderings method 2024-01-22 16:23:10 +00:00