Wykres commitów

18337 Commity (99a9317eea1a7b13a7fd9222a1f7f29e9096a4c2)

Autor SHA1 Wiadomość Data
sag​e 99a9317eea
Avoid loading icons sprite and JS files in 404 page (#12745)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2025-01-13 11:29:17 +00:00
Joren Hammudoglu 4fc2c2abac
Improve deprecation warning for `WidgetWithScript` by raising it with `stacklevel=3` 2025-01-07 16:27:26 +00:00
Sage Abdullah 7a59c9cc20
Release note for #12735 2025-01-07 13:34:37 +00:00
Sage Abdullah 9b3acffaac
Fix crash when loading the dashboard with only the "bulk_delete" page permission 2025-01-07 12:23:26 +00:00
Unyime Emmanuel Udoh d8d75bddf0
Fix crash when loading the dashboard with only the "unlock" page permission 2025-01-07 12:03:11 +00:00
Matt Westcott 216b80111b
Upgrade consideration note for change of Page panel definitions 2025-01-07 11:05:11 +00:00
Matt Westcott 3f91fcb3a3
Define base Page panels as placeholders within wagtail.models
This ensures that code such as `content_panels = Page.content_panels + [...]` works as expected even if wagtail.admin has not been loaded.

Fixes #12747
2025-01-07 11:01:08 +00:00
Matt Westcott 09e26c3c2b
Add failing test for page model defined before wagtail.admin is loaded 2025-01-07 10:22:12 +00:00
Matt Westcott a2407c0027 Release note for #12697 2025-01-06 23:44:28 +00:00
Matt Westcott f9debd9084 Continuity fixes for tutorial 2025-01-06 23:11:53 +00:00
Matt Westcott 82c42d1ecc Nest code snippets for string panel definitions inside the note 2025-01-06 19:29:44 +00:00
USER 961aa07547 Addressed feedback: Updated FieldPanel documentation 2025-01-06 19:26:26 +00:00
USER da818b562f “Update-FieldPanel-documentation-to-encourage-use-of-strings-in-panel-definitions” 2025-01-06 19:26:26 +00:00
Matt Westcott 7cfae8c3b5 Update latest.txt for 6.3.2 2025-01-02 12:18:57 +00:00
Matt Westcott b97ac14cba Fill in release date for 6.3.2 2025-01-02 11:09:43 +00:00
Matt Westcott 50fb7b21bb Fetch new translations from Transifex 2025-01-02 11:09:17 +00:00
Daniel Kirkham 996484099b Insert missing space into 6.3 release notes 2025-01-02 09:16:49 +00:00
Artem Kamyshansky f90fae1aee typo fix 2025-01-02 09:16:07 +00:00
Matt Westcott 784f4bbbb9 Don't set aria-expanded=false on clear(), because clearing in itself doesn't close the menu 2024-12-19 14:10:30 +00:00
Ayaan 1cbb1e8fb2 Remove - extra addClass & aria-label in appendColumnButton and restore aria-expanded="false" in clear method 2024-12-19 13:23:24 +00:00
Ayaan df8a6f219c Added aria-expanded attribute to add new column button (#12680) 2024-12-18 18:03:24 +00:00
Matt Westcott 2e08d84332 Release note for #12702 in 6.4 2024-12-18 16:07:58 +00:00
Matt Westcott 5a17312e42 Release note for #12702 in 6.3.2 2024-12-18 16:07:25 +00:00
Matt Westcott 3cfbd028e9 Implement get_block_by_content_path on ImageBlock (#12702)
Fixes #12688. Without this, commenting on a field of an ImageBlock will cause subsequent loads of the edit view to fail at the point that the comments validate that they are attached to a valid block path.
2024-12-18 16:07:25 +00:00
Matt Westcott ac08838115 Update James Harrington's name in credits 2024-12-18 16:01:06 +00:00
ankit02327 7745aa628d Separate creation and activation steps in tutorial document (#12695) 2024-12-18 15:30:53 +00:00
Sage Abdullah 23b9f4aca9 Move images and documents get_usage().count() call to view code (#12691)
The get_usage() method returns a ReferenceGroups instance that defines a
__getitem__ method. Accessing get_usage().count() from the template
means that Django tries to access the count via ["count"], which fails,
then continues by using getattr(reference_groups, "count") before
finally calling the count method.

We have seen reports where the blocktranslate tag fails because the
usage_count_val is not a number. We haven't got a reproducible example,
but this would help surface any errors, as the exception would be raised
from the Python code rather than the template.
2024-12-18 14:58:28 +00:00
Jake Howard 57d141c701 Don't persist credentials in CI
There's no vulnerability here, especially since the token explicitly only has read access anyway, but it's worth improving regardless.
2024-12-18 14:37:54 +00:00
Sage Abdullah 6b33690cd3 Refactor pages revisions_revert view to be a subclass of EditView (#12690)
Currently, the code that handles the POST request for reverting a
revision lives in the EditView class, while the revisions_revert view is
a smaller view that tries to "mimic" the EditView for rendering the view
as part of a GET request. The view injects the revision ID into the
form, which has the action URL hardcoded to the EditView. Including the
revision ID in the form allows the EditView to tell whether it's in a
"reverting" mode or not, and adjust the POST logic accordingly.

However, this results in possible inconsistencies in both views.
Whenever we want to change EditView code or template, we need to make
sure to also update the revisions_revert view. The fact that the
revisions_revert view is a function-based view doesn't help.

Instead of copying the view code and reusing the template with the
addition of injecting the revision ID in the form, turn it into a proper
subclass of the EditView, and make use of Django's URL patterns to
retrieve the revision ID in the EditView.

This approach is similar to how reverting revisions is handled for
snippets.

Ideally, all the code for handling revisions revert should live in the
RevisionsRevertView, and the EditView shouldn't know about it at all.
This is how it's done for snippets: all the revisions revert-related
code is put in RevisionsRevertMixin.

However, this is currently not possible for pages without more
significant refactoring, so this commit does the minimal change needed
to achieve the goal of keeping the revisions_revert view in sync with
the EditView.
2024-12-18 14:36:39 +00:00
Matt Westcott 8bb2a18cd7 Release note for #12676 2024-12-18 12:55:43 +00:00
Sage Abdullah 130a9ebd93 Enable breadcrumbs by default 2024-12-18 12:52:31 +00:00
Sage Abdullah 58d9f9bc72 Make generic/confirm_unschedule.html template extend generic/base.html template 2024-12-18 12:52:31 +00:00
Sage Abdullah faa37c0068 Make generic/confirm_unpublish.html template extend generic/base.html template 2024-12-18 12:52:31 +00:00
Sage Abdullah e63b42b547
Add explicit path to Sphinx configuration in .readthedocs.yml 2024-12-18 11:34:31 +00:00
Sage Abdullah 286d7cbd6b Enable breadcrumbs in revisions compare view (#12675) 2024-12-18 00:45:43 +00:00
Matt Westcott 01e7291486 Handle old construct_wagtail_userbar signature in ChecksSidePanel 2024-12-18 00:41:31 +00:00
Claude Meyer 268174b781 Release notes for #12678 2024-12-17 22:10:23 +00:00
Claude Meyer aa08e86cba Fixes #3847 by adding page as a third argument to construct_wagtail_userbar hooks along with a deprecation warning. 2024-12-17 22:10:09 +00:00
Jake Howard 076af8bec8 Automatically set CSP when serving images and documents (#12672)
Addresses #12617
2024-12-17 21:06:39 +00:00
jhrr 5402010d16 Allow hook override of user profile avatar url in admin tags (#12689)
Fixes #12661
2024-12-17 20:42:36 +00:00
Matt Westcott 9889bddcb8 Release notes for #11633 2024-12-10 01:54:54 +00:00
LB Johnston ae89829661 Deprecate & rework imports for `window.buildExpandingFormset`
- window.buildExpandingFormset and using the base class `ExpandingFormset` can now be deprecated.
- Move the window global setting to core.js which avoids the need to add the import in editor_js, to align with other future deprecations in core.js
- Add upgrade considerations in release notes
- `ExpandingFormset` is still needed for other existing usage (InlinePanel/MultipleChooserPanel)
- Add additional JSDoc and updates to Eslint to advise developers that this feature is not to be used for new code
2024-12-10 01:42:32 +00:00
LB Johnston 6bc9b0ea40 Adopt Stimulus `w-formset` attributes in Group edit/create view
- Use the Wagtail admin formset mixin to adopt new data attributes on core form parts
- Update the edit/create templates to put the attributes on the remaining elements
- Add basic unit tests for smoke testing data attributes
- Remove CSP incompatible inline scripts approach
- Remove the now unused standalone static build/imports for the group edit view as this will not be needed
- Update Eslint accordingly
2024-12-10 01:42:32 +00:00
LB Johnston 585d3e3385 Adopt Stimulus `w-formset` attributes in Workflow pages basic formset
- Use the Wagtail admin formset mixin to adopt new data attributes on core form parts
- Update the edit/create templates to put the attributes on the remaining elements
- Add basic unit tests for smoke testing data attributes
- Remove CSP incompatible inline scripts approach
- Remove the now unused standalone static build/imports for the group edit view as this will not be needed
- Ensure that the edit workflow form does not render any JS or attributes when the pages are not actually editable (workflow disabled)
2024-12-10 01:42:32 +00:00
LB Johnston 3d6f1c366f Prepare Wagtail admin formset mixin
- Leverage the new Django 4.0 feature `deletion_widget` for formsets to attach data attributes and make the input a HiddenInput for existing and 'blank' forms.
- Add support for data attributes used by the new Stimulus FormsetController
2024-12-10 01:42:32 +00:00
LB Johnston 8d35cc57e6 Add initial Stimulus FormsetController `w-formset`
Replaces the core functionality in `client/src/components/ExpandingFormset/index.js` and the Delete callbacks in other usage of the `window.buildExpandingFormset` function.

Provides limitations on add/delete once the min/max have been reached but does not set up any disabling of these buttons as this is currently in the remit of `InlinePanel`.

Includes a full test suite for error handling, updating inputs and nested usage which leverages Stimulus' scope management.

Does not rely on any id attribute structure or wrangling.

Relates to #7915
2024-12-10 01:42:32 +00:00
LB 4020efc4d0 Add JSDoc to exported function in runInlineScripts 2024-12-10 01:42:32 +00:00
LB d42af56220 Create `transition` util to resolve a promise when an animation ends 2024-12-10 01:42:32 +00:00
Sage Abdullah 4760509d65
Release note for #12681 2024-12-09 11:06:26 +00:00
Sage Abdullah c7700feae2
Use built-in venv instead of pipenv in CircleCI 2024-12-09 10:38:44 +00:00