0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
Commit Graph

15321 Commits

Author SHA1 Message Date
Sage Abdullah
93fc013222
Use precached GroupPagePermission instances to do PagePermissionPolicy queries 2023-06-16 09:41:09 +01:00
Sage Abdullah
193b53af19
Add get_all_permissions_for_user and get_cached_permissions_for_user to BasePermissionPolicy 2023-06-16 09:41:09 +01:00
Sage Abdullah
729363a5fc
Replace exists query with values list for users_with_permission query
This prevents crash on Django < 4.0
2023-06-16 09:41:09 +01:00
Sage Abdullah
f541dd9231
Add tests for PagePermissionPolicy 2023-06-16 09:41:09 +01:00
Sage Abdullah
ecfe607e44
Create PagePermissionPolicy with basic GroupPagePermission queries
This does not yet take into account more complex logic around advanced
nuances such as ownership and publish permissions.
2023-06-16 09:41:08 +01:00
Thibaud Colas
4848722731 Add new expanded indicator with bottom border for side panel buttons. Fix #9174 2023-06-15 15:53:53 +01:00
Thibaud Colas
abe30d289f Use the correct width for slim header buttons 2023-06-15 15:53:53 +01:00
Thibaud Colas
284a4ef78e Move all slim header button classes to be defined in slim_header.html 2023-06-15 15:53:53 +01:00
Thibaud Colas
9285e77734 Allow 2px borders in utility classes 2023-06-15 15:53:53 +01:00
Matt Westcott
840498fc1b Release note for #10563 in 5.0.2 2023-06-15 12:22:55 +01:00
Matt Westcott
a735265d11 Release note for #10563 in 5.1 2023-06-15 12:22:55 +01:00
LB Johnston
ba8a975273 SyncController - add better performance & enhance
- Add support for a default 100ms debounce on apply calls so that multiple events (e.g. keyup) do not impact performance
- Refine the delay for updating the field to not use setTimeout by default as this async behaviour is no longer needed for basic usage
- Add unit tests for debounce functionality and clean up unit testing to ensure each test can run in isolation
- Add explicit tests for non-inpu fields such as select (update code to ensure we use setter not setAttribute to support these)
- Add ability to support an action param for a fixed value being synced to another field
- Relates to #10517
2023-06-15 12:22:55 +01:00
LB Johnston
9c92e394af Revise default title sync to update on keyup
- Previous implementation used keyup to sync the slug with the title field
- Fixes #10517
2023-06-15 12:22:55 +01:00
LB Johnston
fd83bedd72 Docs - fix typo in Django forms reference 2023-06-15 07:52:52 +10:00
Matt Westcott
c16618bc5b Release note for #10541 in 5.1 2023-06-14 18:51:08 +01:00
Matt Westcott
5757af4f21 Release note for #10541 in 5.0.2 2023-06-14 18:50:43 +01:00
LB Johnston
015c4339d7 Slug Controller - enhance default compare function
- Allow compareAs behaviour to be overridden via the event detail OR a param
- Enhance types to be more strict, refine JSDoc to be clearer about the default behaviour
- Add unit tests for default compare function and make logic a bit easier to read in regards to how the slugify/urilify methods are conditionally called
- Relates to #10532
2023-06-14 18:50:43 +01:00
LB Johnston
ccec24b888 Fix subsequent slugify / title sync values for non-ascii characters
- Wagtail 5.0 regression where subsequent changes to slugify field from a sync source were not comparing against the originally set urlify'd value
- Fixes #10532
- Regression caused by migration of 'slugFollowsTitle' approach not consistently comparing to the urlify version of the util on when the user focuses on the title field, broke in #10189
2023-06-14 18:50:43 +01:00
Matt Westcott
741c272819 Release note for #10559 in 5.0.2 2023-06-14 17:40:42 +01:00
Andreas Nüßlein
92a3cc246e Update components.py
the contexts are mutable, therefore a MutableMapping makes more sense than a Mapping type
2023-06-14 19:03:34 +10:00
LB Johnston
f01aaccb57 Add changelog entry for #10561 2023-06-14 07:58:00 +10:00
Matt Westcott
bb3b0b6f37 Prevent crash when comparing page revisions that include MultipleChooserPanel
Fixes #10472
2023-06-14 07:56:08 +10:00
valnuro
5f880fd528 Add Youtube Shorts url to oembed all_providers
Youtube allows to use oembed for shorts video now, but the code can't accept Youtube shorts url.
2023-06-14 07:43:09 +10:00
Kevin Chung
173918c221
Revise main Getting started tutorial for clarity (#10425)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-06-13 16:52:35 +01:00
Matt Westcott
d53a77c201 Release note for #10506 in 5.0.2 2023-06-13 13:21:50 +01:00
Matt Westcott
7feaad5e3d Release note for #10506 in 5.1 2023-06-13 13:05:51 +01:00
LB Johnston
3ce2b5f007 Chooser modal - update spinner logic on error
- When errors occur on chooser modal content, find the local progress buttons that are in loading state and update the value
- Stimulus will automatically resolve all DOM changes based on the dynamic value update
- Add unit tests for functionality
- Fixes #10498
- Regression from #9910 & #10062
2023-06-13 12:59:45 +01:00
LB Johnston
35de8a98b7 Progress Controller - add backwards compatible cancelSpinner
- support legacy cancelSpinner global for any other code that may still rely on this
- see #10498
2023-06-13 12:59:45 +01:00
Matt Westcott
a86dddaddf Release note for #10540 2023-06-13 11:02:42 +01:00
Matt Westcott
902681ee1f Fix import order in wagtail/admin/views/generic/__init__.py
Also narrow the 'noqa' declarations to only ignore unused imports, not other errors
2023-06-13 11:02:40 +01:00
Matt Westcott
7b83142510 Don't set self.columns within get_columns
This is being done from the `setup` method.
2023-06-13 11:02:33 +01:00
Matt Westcott
81836fc56f Reinstate template for groups/index.html
As per https://github.com/wagtail/wagtail/pull/10540/files#r1226830421 - while we are using generic/index.html unmodified here, giving it a dedicated template file allows people to override it if desired.
2023-06-13 11:02:27 +01:00
Matt Westcott
60f371fae9 Change UsageView to inherit directly from BaseListingView rather than IndexView 2023-06-13 11:02:23 +01:00
Matt Westcott
a0036dd3cb Split out a BaseListingView and template from IndexView 2023-06-13 11:02:03 +01:00
Thiago C. S. Tioma
ce620bf57b feat: add marking for LTS releases (#10550)
Fixes #10508
2023-06-13 10:41:25 +01:00
Matt Westcott
de825161a2 Enable flake8-blind-except and flake8-comprehensions checks and fix/tag existing failures 2023-06-13 10:36:21 +01:00
Matt Westcott
c1333d8c46 Remove or narrow remaining noqa directives 2023-06-13 10:36:21 +01:00
Matt Westcott
862a57d2f7 Enable ruff checks for print statements 2023-06-13 10:36:21 +01:00
Matt Westcott
9fe13dfe9f Narrow down 'noqa' directives on imports to specify F401 / F403
This prevents them from masking unrelated linting errors such as isort order.
2023-06-13 10:36:21 +01:00
Matt Westcott
d74fdee3a5 Configure ruff to apply isort rules
Also fix existing failures
2023-06-13 10:36:21 +01:00
Matt Westcott
2a38248c6b Fix gettext calls in wagtail.admin.views.generic.models that should be gettext_lazy (#10539)
Fix some gettext calls that should be gettext_lazy, because they're evaluated at the module level rather than per-request - getting this wrong means that these strings will always be in whatever language was set at the server level at startup, ignoring user preferences.
2023-06-12 14:39:05 +01:00
Sage Abdullah
8bc31fc31c Unpin django-taggit when testing against Django main 2023-06-12 14:35:41 +01:00
Sage Abdullah
52877cad10 Fix check for lazily evaluated page_description
_delegated_text no longer exists in Django as of ee36e101e8

This is also how Django internally checks for lazily-translated strings (search for Promise in its codebase)
2023-06-12 14:35:41 +01:00
Sage Abdullah
1b71ab8f7c Fix incorrect import of total_ordering 2023-06-12 14:35:41 +01:00
LB Johnston
380e04a2fb Small typo in JSDoc - gettext
- The function created is pluralIdx (capital I), the underlying Django function is pluralidx
- Update our gettext JSDoc to align with our usage of pluralIdx (capital I)
2023-06-12 12:14:11 +01:00
Thibaud Colas
2163e02933 Release notes for #10449 2023-06-12 10:55:12 +01:00
Thibaud Colas
268b038ea8 Update documentation for color customisations 2023-06-12 10:55:12 +01:00
Thibaud Colas
40335ba9d1 Add tests to help with maintenance of theme color tokens 2023-06-12 10:55:12 +01:00
Thibaud Colas
fb793f2b4b Remove all unused color tokens 2023-06-12 10:55:12 +01:00
Thibaud Colas
e0f3f05ffd Remove usage of color tokens which are duplicates 2023-06-12 10:55:12 +01:00