Wykres commitów

15650 Commity (678b32e4e79df829801447150085ae44b103e37a)

Autor SHA1 Wiadomość Data
Thibaud Colas 678b32e4e7 Move permissions consolidation and snippet enhancements to their own release notes sections 2023-08-01 14:16:08 +02:00
Sage Abdullah 10b8dab54e
Fix missing space typo in GroupPagePermission warning 2023-08-01 10:01:29 +01:00
Sage Abdullah 2ca6708db4
Fix incorrect GroupPagePermission import in 5.1 release notes 2023-08-01 09:51:09 +01:00
Sage Abdullah 73494fe3be
Fix initial size of 'Preview unavailable' content in preview panel 2023-08-01 09:31:44 +01:00
zerolab 9177326b35
Bump target python version to 3.8 in Makefile 2023-08-01 09:29:22 +01:00
Robert Rollins d75d6e6f5d Corrected a typo in {% page_header_buttons %} #10592
Fixes #10730
2023-08-01 07:44:27 +10:00
Andy Chosak f84cea6715
Don't update the reference index while deleting it
The rebuild_reference_index management command starts by
deleting the entire ReferenceIndex table.

In Wagtail versions 4.1 and 4.2, all models are tracked in the
reference index. Unfortunately this also includes the
ReferenceIndex model itself. This is changed in 5.0 to only track certain Wagtail-related models [0].

This means that when rebuild_reference_index runs in versions
4.1 or 4.2, and deletes the ReferenceIndex table, it runs the code that checks whether ReferenceIndex instances have any
references.

If the index contains a large number of references (as could
happen if an upgrade to 4.1 built an index for a non-Wagtail
model), this process becomes extremely slow. There's no need
for the rebuild_reference_index command to update the index
when deleting it, so this can be significantly optimized by
disabling auto update here.

[0] https://docs.wagtail.org/en/stable/releases/5.0.html#referenceindex-no-longer-tracks-models-used-outside-of-wagtail
2023-07-31 15:38:09 +01:00
Sage Abdullah 96a2d9093b
Add migration to replace JSON null values with empty objects in log entries' data 2023-07-31 15:14:21 +01:00
Sage Abdullah 06b0c2f413
Guard against TypeError in 0088_fix_log_entry_json_timestamps migration
Old logs may have the data set to JSON `null` instead of an empty JSON
object `{}`.

See https://github.com/wagtail/wagtail/pull/8021#issuecomment-1658082683
and https://github.com/wagtail/wagtail/pull/9590#discussion_r1279096075
for more details.
2023-07-31 14:19:34 +01:00
Sage Abdullah 05880bfcad
Fix search_promotions 0004_copy_queries migration for long-lived Wagtail instances
This migration would fail on Wagtail instances that have been around
since v0.5 (when we still used django-south), because the column order
of the wagtailsearch_querydailyhits table is different from the newly-created
wagtailsearchpromotions_querydailyhits.

If you hit this issue, you deserve a 🌟
2023-07-31 11:30:37 +01:00
Sage Abdullah 0a9f7d6726
Release notes for #10174 2023-07-31 09:53:50 +01:00
Sage Abdullah 8ce51d8ab6
Fix preview panel iframe not loading immediately when preview panel is opened in snippets 2023-07-31 09:53:50 +01:00
Sage Abdullah 50d6a808dd
Fix loading spinner being shown indefinitely in preview panel 2023-07-31 09:53:50 +01:00
Sage Abdullah 0c4156eba0
Add docs for migrating from modeladmin to snippets 2023-07-27 09:26:44 +01:00
Sage Abdullah 2d514a7f26
Fix incorrect versionchanged number for user_page_permissions deprecation 2023-07-25 13:28:33 +01:00
Sage Abdullah b451e593a7 Fix link in custom HTML attributes in Panels documentation (#10706) 2023-07-21 07:03:29 +10:00
LB Johnston 143e45d474 Update Sphinx Wagtail Theme to v6.1.1 (#10699) 2023-07-20 07:51:18 +10:00
Dan Hayden 3c16eaae7e Fix code block typo in streamfield_migrations.md (#10701) 2023-07-20 07:48:43 +10:00
LB Johnston febf2dc2ca Fix a few minor typos in the 5.1 release notes / changelog (#10700) 2023-07-20 07:47:20 +10:00
Sage Abdullah 15f652c9ef
Update What's new in Wagtail version menu item to 5.1 2023-07-18 16:05:53 +01:00
Sage Abdullah 32d90800f3
Version bump to 5.1rc1 2023-07-18 15:32:04 +01:00
Sage Abdullah 4abfcd6830
Generate new strings for translation 2023-07-18 15:26:48 +01:00
Sage Abdullah e39623ff24
Fetch new translations from Transifex 2023-07-18 15:24:24 +01:00
sgfost 61594a2616
Add docs for managing stored queries in searchpromotions
and update docs about the search -> searchpromotions migration.
2023-07-18 15:00:56 +01:00
LB Johnston f3c3d31e23
Ensure userbar dialog can sit above other website content
- Fixes #10471
2023-07-18 13:53:06 +01:00
LB Johnston ad6fd746b9 Documentation - Add recent third party tutorials 2023-07-18 21:48:59 +10:00
LB Johnston aa3863f17c DropdownController - fix test & refine events & methods
- Test that uses setTimeout never ran as Tippy relies on `transitionend` events, which JSDom will not dispatch. Rework tests to correctly test this custom event gets dispatched
- Use Stimulus dispatch method for custom event dispatching as the controller name (e.g. 'w-dropdown') will automatically be added, work around TypeScript bug in Stimulus which should be fixed in a future release https://github.com/hotwired/stimulus/issues/642
- Add show/hide methods, pull out options to own get method
- Add unit tests for show/hide, content being in dropdown
- Relates to #10557
2023-07-18 21:46:07 +10:00
Storm B. Heg fef8c4ac3c Ensure StreamField panels validation errors are visible (#10673)
...by rendering panels as expanded, regardless of the collapse
setting specified by the Wagtail implementor.

Fixes #8990 partially.
2023-07-18 12:43:17 +01:00
LB Johnston bebbcfb48d Fix a few grammar / spelling typos in the 5.1 release notes 2023-07-18 21:38:52 +10:00
Sage Abdullah 191ddf8a55
Deprecate wagtail.contrib.modeladmin 2023-07-18 12:33:42 +01:00
Sage Abdullah f8da5f1be1
Release notes for #10689 2023-07-18 10:42:14 +01:00
Thibaud Colas be2eb7fafc
Use inactive field border styles for read-only FieldPanel 2023-07-18 10:42:05 +01:00
Thibaud Colas 3ae40d87f0
Use a theme-agnostic color token for read-only panels support in dark mode 2023-07-18 10:40:07 +01:00
Matt Westcott 5fcb58f929 Deprecate Elasticsearch 5 and 6 search backends 2023-07-18 09:32:37 +01:00
LB Johnston 995809a318 Adopt data attribute usage of SwapController (w-swap) for all header searches
- Removes six inline scripts completely, no longer relying on window.headerSearch
- Update the fallback Stimulus Swap controller afterLoad to be a deprecated method
- Add upgrade considerations
- Fix regression from d554cbe310 where manually submitting page search results would load the partial, not full page response
- Closes #9950
2023-07-18 07:09:28 +10:00
LB Johnston b0dc6c1ea5 Revise the default SwapController target to the more common '#listing-results' 2023-07-18 07:09:28 +10:00
Storm B. Heg 09aee38ca9 Reinstate `field_as_li.html`
Other packages and projects may still rely on the existence of this
template. We cannot simply remove it without a proper deprecation.

Add a note to remove the template in the next release.
2023-07-18 07:05:34 +10:00
LB Johnston 94ebf435f5 Fix changelog for #10397
- Remove maintenance entry from release notes as already in the callout at the top of the notes
- Add to changelog
2023-07-18 06:41:49 +10:00
LB Johnston 48307ca587 Add changelog for #9961 2023-07-18 06:39:10 +10:00
LB Johnston 4afe01104b Adopt Stimulus SwapController for task-chooser-modal use case
- Builds on #9952
- Create a new method `submit` and `submitLazy` to serialise a form's inputs and submit (GET) async to replace content
- Create a lazy version of `replace` and add unit tests for it
- Partial progress on #9950
2023-07-18 06:24:49 +10:00
Tidiane Dia a6c9409e03
Avoid N+1 queries in users index view 2023-07-17 17:23:12 +01:00
Matt Westcott 71d19a7827 Release note for snippet inspect view (#10621) 2023-07-17 17:22:15 +01:00
Sage Abdullah 2bfb1043e9 Use field display registry to display field values in generic inspect view 2023-07-17 17:19:11 +01:00
Sage Abdullah 80f9bbf279 Create generic field display registry to render model fields in the admin 2023-07-17 17:19:11 +01:00
Sage Abdullah 0bebe532e8 Add docs and tests for snippets inspect view 2023-07-17 17:19:11 +01:00
Sage Abdullah 4b9f7df4fd Add option to enable inspect view for snippets 2023-07-17 17:19:11 +01:00
Sage Abdullah 46c855fb97 Add generic InspectView
This is mostly based on ModelAdmin's InspectView, but with
modeladmin-specific code removed and a simpler method signature for the
field display methods.
2023-07-17 17:19:11 +01:00
Matt Westcott 16140d7e53 Release notes for #10618 2023-07-17 16:50:54 +01:00
Sage Abdullah ad4aa33498 Use permission policy to limit the image and document counts on the dashboard
Fixes #7958
2023-07-17 16:45:22 +01:00
Sage Abdullah 8b43b232be Fix 'any' methods on collection permission policies when only 'choose' action is specified
When the 'choose' permission was introduced in
d18ffb0233, all the logic is put in an
`elif` block. It means that this is only ever checked if the
`foo_any_permission_bar` permission policy methods are called without
'change' nor 'delete' in the actions list.

If the user only has a 'choose' permission, and the method is used
with a list of actions that contains both 'change'/'delete' and
'choose', e.g. `instances_user_has_any_permission_for(user, {'change',
'delete', 'choose'}`, it won't return any results.

This is inconsistent with how the logic for these 'any' methods
should work.

Instead of `elif`, the original implementation should add 'choose' to
the list checked in the previous `if`.

This commit does it slightly differently by enforcing for the known
actions in the beginning of the methods, but it still yields the same
results.
2023-07-17 16:45:22 +01:00