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

16856 Commits

Author SHA1 Message Date
Neeraj P Yetheendran
f0a67975db Add ability to override a Page's copy form
- Documentation added for Customising Copy Form with an auto-incrementing slug example
- Add tests
- Resolves #10147
2024-01-11 08:35:53 +10:00
vaishnav dasari
3680e32ca8 Fix a few grammar issues in code inline docs/comments
Closes #11429
2024-01-11 07:47:29 +10:00
LB Johnston
235f217fee Add changelog for #11419 2024-01-11 07:43:16 +10:00
Thibaud Colas
445773a2a6 Reorder and rewrite CONTRIBUTING.md to be more actionable
Add link to issue tracking page
2024-01-11 07:43:16 +10:00
Thibaud Colas
2706a4c0ce Add a new "first-time contributor" section at the top of contribution guidelines 2024-01-11 07:43:16 +10:00
Thibaud Colas
75efe99ed2 Reword first contribution guide for readability 2024-01-11 07:43:16 +10:00
Thibaud Colas
1c063da0bc Update issue templates with a new "Who can work on this" section 2024-01-11 07:43:16 +10:00
Matt Westcott
a099cf7ac3 Release note for #11436 2024-01-10 16:18:14 +00:00
Matt Westcott
785f79a184 Remove redundant paginate_queryset method 2024-01-10 16:17:10 +00:00
Matt Westcott
0135b3c27f Replace calls to BaseListingView.get_ordering elsewhere with self.ordering 2024-01-10 16:16:05 +00:00
Matt Westcott
4d435c5ec9 Make self.ordering into a cached property so that we don't have to explicitly call get_ordering 2024-01-10 16:16:05 +00:00
Matt Westcott
1428307e3d Don't pass ordering as a parameter to order_queryset
We can now rely on self.ordering instead.
2024-01-10 16:16:05 +00:00
Matt Westcott
bc48d56ee0 Move remaining annotation/ordering logic from generic IndexView into order_queryset
This means we don't have to repeat the get_base_queryset / get_queryset split from BaseListingView.
2024-01-10 16:16:05 +00:00
Matt Westcott
5fa66980b3 Move get_base_queryset / order_queryset to generic BaseListingView.
Also handle the 'no ordering specified' case in the base order_queryset implementation, for consistency with filter_queryset and search_queryset.
2024-01-10 16:16:05 +00:00
Matt Westcott
6bf6e893fe Remove now fully generic get_queryset method from pages BaseIndexView 2024-01-10 16:16:05 +00:00
Matt Westcott
83b4de267b Ensure that BaseListingView and generic IndexView are consistently setting self.ordering from get_ordering() 2024-01-10 16:16:05 +00:00
Matt Westcott
1c8ec9a21f Move handling of construct_explorer_page_queryset hook into search_queryset
This makes get_queryset more-or-less generic. It's a bit of a hack to put it here, but it's reasonable to say that this should happen immediately before the search logic (so that the queryset passed to the hook is as close as possible to the final result, while still actually being a queryset and not a SearchResults object).
2024-01-10 16:16:05 +00:00
Matt Westcott
f270bba78c Move search logic into a search_queryset method 2024-01-10 16:16:05 +00:00
Matt Westcott
386be51f4e Refine logic for applying order to search results
Introduce an is_explicitly_ordered method to check whether an ordering URL parameter is present; if it is, search will use it, and if not, search will be ordered by relevance.
2024-01-10 16:16:05 +00:00
Matt Westcott
d31b7931f2 Move custom ordering logic into a dedicated order_queryset method 2024-01-10 16:16:05 +00:00
Matt Westcott
235de22424 Move various prefetches into get_base_queryset
These do not change based on parameters (filtering/search/ordering/pagination) so can logically go here.
2024-01-10 16:16:05 +00:00
Matt Westcott
92fdd5913d Simplify handling of search_queryset
Rather than making it the first step of get_context_data, make it the last step of get_queryset.
2024-01-10 16:16:05 +00:00
Matt Westcott
66731b14c2 Move initial page listing queryset construction into get_base_queryset 2024-01-10 16:16:05 +00:00
Sage Abdullah
29fd83493d
Release note for #11432 2024-01-10 09:30:11 +00:00
Sage Abdullah
fd6a415bc1
Check for WAGTAIL_I18N_ENABLED before adding locale filter
Change the override from get_filters to __init__. The get_filters method
is a classmethod and gets called at import time due to how django-filter
sets up its FilterSets. This prevents override_settings from taking
effect in tests. Moving the override to __init__ defers the locale
filter instantiation to runtime as part of the view's lifecycle.
2024-01-10 09:28:49 +00:00
Sage Abdullah
dc3d1baab3
Remove legacy locale selector fallback in generic IndexView
This means that for index views that don't use the breadcrumbs,
locale selection is now done using the filters on the right side.

Remove the locale filtering from get_queryset(), as it's been
handled by filter_queryset() using django-filter.

Also remove the get_translations() method as it was only used to
generate links for the legacy locale selector.
2024-01-10 09:28:49 +00:00
Sage Abdullah
5a79261b1c
Migrate forms index view to use slim header (breadcrumbs)
This is an example of how a view that uses the legacy header and locale
selector can be migrated to use the slim header (which means the locale
selector is now a filter).
2024-01-10 09:28:48 +00:00
Sage Abdullah
73e4c5e639
Do not show add button in generic IndexView if add url is undefined
Prevent the button from showing with href="None"
2024-01-10 09:28:48 +00:00
Sage Abdullah
3f60969b8e
Move locale selector in generic IndexView to a filter
Ensure the locale filter is always included by overriding
WagtailFilterSet.get_filters(), so if developers use a custom
filterset_class, the locale filter will automatically be added.

Adding an initial default value for a filter is not recommended as it
prevents users from skipping the filter:

https://django-filter.readthedocs.io/en/stable/guide/tips.html#using-initial-values-as-defaults

For this reason, add the option to filter by "All" locales instead,
which is applied when the locale filter is empty.

This means that the default state of the IndexView (before a locale is
specifically selected) is now to show objects from all locales instead
of only those of the default locale.

All this is only done if breadcrumbs are used, which means that the slim
header (along with its search+filter components) is used.

If breadcrumbs are not used i.e. the legacy header is still in use,
keep the old logic with the legacy locale selector for now.
2024-01-10 09:28:48 +00:00
dependabot[bot]
c0d958dc44 Bump follow-redirects from 1.14.9 to 1.15.4
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.9 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.9...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 17:10:43 +10:00
Thibaud Colas
633004e61b Release notes for #11365 / #8947 2024-01-09 15:42:08 +00:00
Thibaud Colas
bf9d062484 Prevent future issues with icon.html end-of-file newlines 2024-01-09 15:42:08 +00:00
Thibaud Colas
bc6ef43522 Replace visuallyhidden utility class with w-sr-only 2024-01-09 15:42:08 +00:00
Thibaud Colas
8e4285a04e Remove unused visuallyvisible styles 2024-01-09 15:42:08 +00:00
Thibaud Colas
df9f759cd4 Remove divider-after class use that does nothing 2024-01-09 15:42:08 +00:00
Thibaud Colas
b8e7a84a72 Remove invalid CSS styles / Sass selector concatenation 2024-01-09 15:42:08 +00:00
Thibaud Colas
7e213eadde Document correct class prefix in CSS comments 2024-01-09 15:42:08 +00:00
Thibaud Colas
bdb8ebdd82 Remove unused inline, inline-block, block classes 2024-01-09 15:42:08 +00:00
Thibaud Colas
43b858913f Remove unneeded classes from test suite 2024-01-09 15:42:08 +00:00
Thibaud Colas
294040dc82 Drop c- prefix for transition group 2024-01-09 15:42:08 +00:00
Thibaud Colas
02b4444369 Drop c- prefix for loading spinner component 2024-01-09 15:42:08 +00:00
Thibaud Colas
0865b9d716 Remove more unused class name prefixes 2024-01-09 15:42:08 +00:00
Thibaud Colas
77af0541be Remove usage of is- CSS class prefix 2024-01-09 15:42:08 +00:00
Thibaud Colas
9e65559d0e Replace u-hidden with Tailwind equivalent with and without !important 2024-01-09 15:42:08 +00:00
Thibaud Colas
27cc553dd8 Remove unused clearfix utility 2024-01-09 15:42:08 +00:00
Thibaud Colas
bfd23e4536 Remove unused divider-before utility 2024-01-09 15:42:08 +00:00
Thibaud Colas
d799f491c4 Replace reordering utility with generic tailwind 2024-01-09 15:42:08 +00:00
Thibaud Colas
5158dd688e Replace overflow utility with Tailwind 2024-01-09 15:42:08 +00:00
Thibaud Colas
38c0557434 Remove unused CSS layers 2024-01-09 15:42:08 +00:00
Thibaud Colas
484428b2d9 Combine o-pill and c-status styles, as they are always used together 2024-01-09 15:42:08 +00:00