Wykres commitów

18062 Commity (98545cd1766f4df1a664d39efdd9075e61332adc)

Autor SHA1 Wiadomość Data
Sage Abdullah 50b99c7643 Update GitHub Actions workflow configuration 2024-09-06 11:55:46 +01:00
Sage Abdullah d6d0d4df5a Use ModelIterable as the base class for SpecificIterable
We don't really need its __iter__ implementation, but Django added a
check in
e4a2e22ddb
that requires ModelIterable to be used when using in_bulk() with
values() or values_list().
2024-09-06 11:55:46 +01:00
Thibaud Colas 74681487e0 Release notes for #12203 2024-09-06 11:46:43 +01:00
Matt Westcott b3e68b69fc Upgrade puppeteer to 22.x 2024-09-06 11:46:43 +01:00
Matt Westcott 3567c15e72 Upgrade puppeteer to 21.x 2024-09-06 11:46:43 +01:00
Matt Westcott 726d4c05e1 Upgrade puppeteer to 19.x 2024-09-06 11:46:43 +01:00
Matt Westcott 83562ab03c Upgrade puppeteer to 16.x 2024-09-06 11:46:43 +01:00
Matt Westcott 0c411651b8 Address test failures on empty table headings 2024-09-06 11:46:43 +01:00
Matt Westcott 41f768b2ab Bump patch versions in wagtail/client/tests/integration/package-lock.json 2024-09-06 11:46:43 +01:00
Matt Westcott 6593615a60 Run integration tests in debug mode so that static files are served 2024-09-06 11:46:43 +01:00
Matt Westcott d87d34b7d1 update caniuse-lite to prevent warning about outdated browser list 2024-09-06 11:46:43 +01:00
Matt Westcott 482f5a0ec7 Set timeouts of 30 seconds for axe tests 2024-09-06 11:46:43 +01:00
Sage Abdullah 5038418b1e
Release note for #12236 2024-09-06 11:41:00 +01:00
Sage Abdullah 9d8507bc37
Move no_results_message to a cached_property in BaseListingView 2024-09-05 18:31:44 +01:00
Sage Abdullah d8f2eb3d75
Use the same pages/listing.html template for both base page IndexView and the SearchView 2024-09-05 18:31:12 +01:00
Sage Abdullah 587ddbae54
Rename wagtailadmin/pages/index.html to wagtailadmin/pages/listing.html
This template is useful for other page listings where we may also want
to enable bulk actions, e.g. the search view – and later, the workflows
usage view, as well as the page type usage view.

This is a separate commit just so git knows we're just renaming. We'll
reinstate the pages/index.html as a no-op extension of this
pages/listing.html template.
2024-09-05 18:31:12 +01:00
Sage Abdullah 51b5075090
Remove unnecessary overrides in page listing IndexView 2024-09-05 18:31:12 +01:00
Sage Abdullah ff0cd42a6c
Include ordering in BaseListingView context 2024-09-05 18:31:11 +01:00
Sage Abdullah f155546f65
Ensure non-IndexView BaseListingView subclasses use the correct base templates
Now that the listing_results.html template supports rendering the "There
are x matches" message, we can enforce the consistency between the view
class and the template. Previously there were BaseListingView subclasses
(that are not IndexView subclasses) that used the index_results.html
template just to get that message when filtering.
2024-09-05 18:31:11 +01:00
Sage Abdullah e302c62ef2
Refactor page search view to be closer to universal listings implementation
- Use a single class with index_url_name, index_results_url_name,
  template_name, and results_template_name
- Extend generic/listing.html and generic/listing_results.html templates
- Set page_title and header_icon to show breadcrumbs properly
- Set is_searchable = True and keep using the custom search and
  filtering logic with the full get_queryset override to prevent scope
  creep for now
2024-09-05 18:31:11 +01:00
Sage Abdullah 000d417ec9
Move search implementation from IndexView to BaseListingView 2024-09-05 18:31:11 +01:00
Sage Abdullah c36b891e35
Replace IndexView.get_filterset_class with filterset_class cached property
This is now possible thanks to ViewSet.UNDEFINED. Previously, we would
be getting the unbound cached property instance from the view class,
only to pass it back to the view during as_view() – which results in a
broken state.
2024-09-05 18:31:10 +01:00
Sage Abdullah 9e36fa74b6
Move all interim support of non-breadcrumbs listing views to the index.html template
We want to remove all breadcrumbs_items check in the templates
eventually (as we want all listing views to use breadcrumbs). Instead of
having both BaseListingView's listing.html and IndexView's index.html
templates support the non-breadcrumbs case, do this only for the
index.html template.

The reasoning is because the BaseListingView was extracted more recently
as part of the Universal Listings work. When the filtering support was
moved from the IndexView to BaseListingView in 130c7ff, we still had to
support the non-breadcrumbs case due to the report views still using the
old filters implementation.

Now that we have migrated the report views to use the new AJAX-based
filtering, it's much less likely there's a BaseListingView subclass out
there that uses the non-breadcrumbs version. For such views, it's likely
they would work with IndexView too (as we haven't really documented
BaseListingView since its creation). So, put the interim support in the
IndexView template for now.

We could also completely drop the non-breadcrumbs case for both views,
but this would mean any custom listing view that uses filters now _must_
implement a results-only view _and_ enable breadcrumbs, or include the
filtering template themselves...
2024-09-05 18:31:10 +01:00
Sage Abdullah 3e758e65fd
Enforce breadcrumbs on all listing views
Add a base implementation of get_breadcrumbs_items() in BaseListingView
that uses the page_title and page_subtitle for the main breadcrumbs item
(the final, big one).

Then, remove the implementation in generic IndexView in favour of the base
one. Note that this changes the main breadcrumbs item label on IndexView
subclasses to prioritise the page_title attribute over the model's
verbose name plural.

This makes more sense – if you set page_title, you'd presumably want this
to be the one that shows up as the big title at the top too. This also
makes it consistent with how the <title> tag is generated. Previously,
they would go out of sync, as can be seen in Tasks and Users: the
breadcrumbs say 'Tasks' while the <title> tag says 'Workflow tasks', and
if a custom user model is used, the breadcrumbs say 'Custom user' while
the <title> tag only says Users.

---

Most of core views that extend from BaseListingView (including IndexView
subclasses) already use breadcrumbs at this point. Any custom listing
views, provided that they use the documented approaches, i.e.:

- ModelViewSet and SnippetViewSet index views
- Custom report views
- Custom form submission listing views
- Custom GroupViewSet and UserViewSet index views

also already use the breadcrumbs.

In core, the only BaseListingView subclass that doesn't yet use
breadcrumbs is the ContentTypeUseView (the "pages that use X type"
view). With this change, the view now nicely uses the breadcrumbs.

As for the generic/listing.html template, the only non-BaseListingView
view that uses it without breadcrumbs is the workflows usage view. It's
currently still a function-based view and the template overrides the
whole 'content' block, so it's unaffected.

Other than the above two, the only possible cases of a listing view that
doesn't use breadcrumbs in Wagtail core mean that they are:
- not a BaseListingView subclass, or
- not using a template that extends generic/listing.html

For code outside of Wagtail core, the only likely possibilities of a listing
view without breadcrumbs that would be affected by this change are:

- if a BaseListingView or IndexView subclass is registered directly (without
  being part of the above viewsets). In this case, they can set
  _show_breadcrumbs to False to undo the effect (but they really shouldn't).
- if the _show_breadcrumbs flag is already set to False on the view class
  or via the viewset. In this case, they won't be affected by the change.

For both cases, instead of setting _show_breadcrumbs to False
(essentially ignoring any problems), they should start looking into
fixing any issues they find with the breadcrumbs (if any – there likely
isn't).

We are planning to enforce breadcrumbs everywhere, so eventually we'll
drop the _show_breadcrumbs flag altogether. This commit starts from the
listing views, by setting it to True directly on the BaseListingView
instead of the subclasses.
2024-09-05 18:31:10 +01:00
Vince Salvino 9545193907 Add official hosting documentation
- Create a deploy section of the documentation
- Move fly.io deployment from tutorial to it's own page under deploy
- Clean up deployment docs and references throughout documentation
2024-09-03 07:59:20 +10:00
LB Johnston 4af8ab528b Documentation - formatting clean up 2024-08-29 18:32:20 +01:00
LB Johnston 7f2bcb677b Update 6.3 release notes (clean up + docs links) 2024-08-29 18:28:07 +01:00
LB Johnston 29d9b0d72e Add docs links for 6.2 release notes 2024-08-29 18:28:07 +01:00
LB Johnston 1790bdd158 Align recent docs & release notes to US spelling 2024-08-29 18:28:07 +01:00
LB Johnston 23d32faf36 Update NPM packages (minor only) 2024-08-29 18:25:19 +01:00
Matt Westcott 05d40271ae Test against psycopg 2 and 3 2024-08-29 18:04:06 +01:00
Matt Westcott 0d8b8386e2 Refactor StreamField get_prep_value for closer alignment with JSONField (#12269) 2024-08-29 18:04:06 +01:00
Matt Westcott 7051363f9f Change Twitter to X in security.md 2024-08-27 15:32:17 +01:00
Matt Westcott c574954a0a Release note for #12244 in 6.2.2 2024-08-27 15:06:15 +01:00
Matt Westcott ce5ba9efdf Add release note template for 6.2.2 2024-08-27 15:06:13 +01:00
Matt Westcott 50c4d32a54 Release note for #12251 2024-08-27 14:16:03 +01:00
Matt Westcott 2b96c3e364 Add clarifying comment to Column 2024-08-27 14:15:34 +01:00
Matt Westcott b670a3251b Remove now-unnecessary str wrapper 2024-08-27 14:15:34 +01:00
Matt Westcott 490acebcf5 Only patch number formatting functions if WAGTAIL_CHECK_TEMPLATE_NUMBER_FORMAT environment variable is set
The patch for filesizeformat in particular is quite heavyweight, and we don't want our CI to never test against the real version (for example, if it changes in a future Django release).
2024-08-27 14:15:34 +01:00
Matt Westcott ff7e016eb5 Patch number formatting functions during tests to flag up potential USE_THOUSAND_SEPARATOR issues 2024-08-27 14:15:34 +01:00
Matt Westcott 85c0047268 Audit all uses of localized/unlocalized numbers in templates
Address bugs caused by the `USE_THOUSAND_SEPARATOR=True` setting inserting commas where they are invalid, such as image width/height attributes. All numbers output on templates are now passed through one of `|unlocalize` (for numbers that must never have separators), `|intcomma` (for numbers displayed to users which should always include separators) or `|localize` (for when the choice is delegated to the project-wide setting).
2024-08-27 14:15:32 +01:00
Matt Westcott cbf06df4eb Prevent versioned_static failure when INSTALLED_APPS is a tuple
Fixes #12253
2024-08-27 08:55:05 +01:00
Matt Westcott 6857f6431a Release note for #12217 2024-08-23 16:18:18 +01:00
Jake Howard db331618b4 Ensure hashes are the correct length 2024-08-23 16:12:10 +01:00
Jake Howard 3fd329339e Use `INSTALLED_APPS` as a unique-ish id for masking version 2024-08-23 16:12:10 +01:00
Jake Howard f263f2a40f Use shorter digest for version hash
This helps protect the secret key by using a smaller digest, ensuring the previously-discarded data is included in the output hash. Using a salt and personalization also goes to further obscure the values.
2024-08-23 16:12:10 +01:00
Jake Howard 35c0d5d6e0 Remove secret key from icon sprite hash
This is just the hash of a file returned to the user - there's no need to salt it
2024-08-23 16:12:10 +01:00
Matt Westcott 5014d50490 Release note for #12226 2024-08-23 15:54:02 +01:00
Sage Abdullah a99df18f6c Optimise logic for showing 'Translate' button on the page listing
External translation packages e.g. wagtail-localize can make use of the annotation to get the same performance benefit
2024-08-23 15:53:16 +01:00
Sage Abdullah c5a90d3c7c Add missing globe icon in 'Translate' button in page listing dropdown 2024-08-23 15:53:16 +01:00