Wykres commitów

17832 Commity (98bbded2a892ffefcf23ce6c74be1998b4567144)

Autor SHA1 Wiadomość Data
Sage Abdullah 98bbded2a8 Use BaseListingView with breadcrumbs and header buttons for workflow history view 2024-09-13 09:20:36 +01:00
dependabot[bot] 816ec2e6c5 Bump serve-static and express
Bumps [serve-static](https://github.com/expressjs/serve-static) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `serve-static` from 1.15.0 to 1.16.2
- [Release notes](https://github.com/expressjs/serve-static/releases)
- [Changelog](https://github.com/expressjs/serve-static/blob/v1.16.2/HISTORY.md)
- [Commits](https://github.com/expressjs/serve-static/compare/v1.15.0...v1.16.2)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: serve-static
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 19:21:35 +01:00
Matt Westcott 4e0236d5c2 Release note for in 6.3 2024-09-12 19:18:12 +01:00
Matt Westcott 31a3a47263 Release note for in 6.2.2 2024-09-12 19:17:49 +01:00
smark-1 acb1208abb Fix link to Users search in the "Other searches" bar
Regression in b6fdd8c408
2024-09-12 19:17:49 +01:00
Matt Westcott 4e4fac003b Release note for / document support for MariaDB 2024-09-12 19:11:22 +01:00
Sage Abdullah 2eb976a96b Do not disable timezone when testing against MySQL
MySQL cannot load timezone-aware fixtures when USE_TZ = False.
2024-09-12 19:05:24 +01:00
Sage Abdullah 38b624d301 Disable parallel mode when testing against MariaDB
Not supported yet due to https://code.djangoproject.com/ticket/33537
2024-09-12 19:05:24 +01:00
Sage Abdullah 9914349a43 Add MariaDB to test matrix
Use the 10.11 LTS (2028-02-16) and 11.4 LTS (2029-05-29).

Also use the email user model and disable timezone for the 11.4
strategy.
2024-09-12 19:05:24 +01:00
Sage Abdullah 170487e0c5 Update MySQL test matrix
MySQL 8.1 has been EOL since 2023-10-25. Use the next LTS 8.4
(2032-04-30). Add MYSQL_ROOT_PASSWORD to ensure the root password
is set.

Also use email user model and disable timezone on the 8.4 strategy to
ensure we test these configurations with MySQL as well.
2024-09-12 19:05:24 +01:00
Matt Westcott de2be5270e Roll back codecov CI task to v3
As per 
2024-09-12 14:32:07 +01:00
smark-1 14c2150f29
Add generated `test-media` to .gitignore 2024-09-12 14:18:34 +01:00
Matt Westcott 0183876669 Force refresh of CircleCI pipenv cache
Attempt to resolve semgrep not found errors
2024-09-11 20:32:47 +01:00
Matt Westcott 48b3a52c92 Release note for in 6.2.2 2024-09-11 19:48:35 +01:00
Matt Westcott 2b481e677c Release note for in 6.3 2024-09-11 19:47:02 +01:00
Sage Abdullah 50a1aba134 Clarify UserViewSet customization to avoid confusion with the custom user model's app config 2024-09-11 19:44:36 +01:00
Thibaud Colas 84b3bf7034
Add new Puppeteer cache location to fix CircleCI ui_tests () 2024-09-09 10:20:26 +01:00
Matt Westcott 7cad7c4f0e Reinstate support for generic IndexView without model attribute
000d417ec9 (in ) skips the check that `self.model` is non-null in `is_searchable`. This means that it is no longer possible to define IndexView subclasses without a model property, which was previously valid - for example this one from wagtail-review:

ce2f6d814b/wagtail_review/views/admin.py (L98-L104)
2024-09-09 09:42:52 +01:00
smark-1 467cced098 Fix typo advantage in docs/deploy/under_the_hood.md 2024-09-08 19:08:29 +01:00
Matt Westcott cf07674b92 Release note for 2024-09-06 12:13:29 +01:00
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 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 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