Skip to content

TWE-728: Quarterly maintenance: Wagtail 7.4 → 8.0 - #456

Open
nickmoreton wants to merge 15 commits into
mainfrom
support/TWE-728-wagtail-80-upgrade
Open

TWE-728: Quarterly maintenance: Wagtail 7.4 → 8.0#456
nickmoreton wants to merge 15 commits into
mainfrom
support/TWE-728-wagtail-80-upgrade

Conversation

@nickmoreton

@nickmoreton nickmoreton commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

TWE-728: Quarterly maintenance: Wagtail 7.4 → 8.0

Component Before After
Wagtail 7.4 8.0
Django 5.2.14 5.2.17
Python 3.13 3.13 (no change)
Node 24 24 (no change)
Debian trixie trixie (no change)

Wagtail 8.0 release notes

  • The construct_wagtail_userbar hook now receives a third argument page in addition to request and items; hook functions that only accept two arguments will now fail.
  • The JavaScript functions buildExpandingFormset and initPrefillTitleFromFilename are removed.
  • The settings TAG_LIMIT and TAG_SPACES_ALLOWED are replaced by WAGTAIL_TAG_LIMIT and WAGTAIL_TAG_SPACES_ALLOWED.
  • Custom listing views using the template wagtailadmin/generic/index.html must now provide a breadcrumbs_items context variable.
  • The template wagtailadmin/pages/_editor_js.html is removed.
  • The PageListingButton, SnippetListingButton and UserListingButton classes are removed in favour of ListingButton and Button.
  • The function wagtail.admin.signals.init_new_page is moved to wagtail.signals.init_new_page.
  • The module wagtail.telepath is moved to wagtail.admin.telepath.
  • The module wagtail.widget_adapters is moved to wagtail.admin.telepath.widgets.
  • The JavaScript include wagtailadmin/js/telepath/telepath.js is removed.
  • The INDEX option on WAGTAILSEARCH_BACKENDS is replaced by INDEX_PREFIX (for example, "INDEX": "mysite" now becomes "INDEX_PREFIX": "mysite_").
  • Userbar items now follow the template component API and do not provide a render method.
  • The resetValue property is removed from TeleportController.
  • Wagtail 6.4 release notes
  • Wagtail 7.0 release notes
  • Wagtail 7.1 release notes
  • Wagtail 7.2 release notes
  • Wagtail 7.3 release notes
  • AVIF and WebP images are no longer converted to PNG by default
  • Support for legacy versions of azure-mgmt-cdn, azure-mgmt-frontdoor, and azure-mgmt-resource packages will be dropped
  • Support for custom base page models in add-on packages
  • Custom permission policy in viewsets must be registered separately
  • SnippetChooserViewSet.widget_class is now a class
  • ViewSet.menu_order is now respected when used in a ViewSetGroup
  • Setting submissions_list_view_class on form page models no longer works
  • request argument to Page._get_site_root_paths is now cache_object

Changes made

Requires manual attention

  • wagtail-upgrade-audit 0.19.2 has no wagtail80 ruleset yet — its bundled definitions top out at wagtail74, so the Wagtail 8.0 audit could not run its automated checks against the new target. A genuine, demonstrated tool-coverage gap (confirmed by inspecting the tool install and attempting an upgrade), not a skipped step.
  • IE11 support was presumptively dropped as part of the Node bump (browserslist ie 11/not ie_mob 11, the closest/foreach polyfills, the svgo IE11 override, tsconfig target es5→es2016) — object if this project is actually on the paid legacy-browser tier.
  • Untested JS entry point after the Node bump: .eslintrc.js — no reachable live surface to ground; needs at least a happy-path check.
  • Pending toolchain migrations declined this cycle at the approval gate: Poetry → uv, npm → pnpm (ESLint → Biome is blocked on npm → pnpm). Available to stack on a future run.
  • ruff pre-commit hook held back at v0.15.15 (poetry-managed ruff is now ~0.16, locked at 0.16.5) — bumping the hook to match surfaced 459 new lint findings across the codebase (dominated by RUF012 firing on idiomatic Wagtail/Django patterns), traced to a ruff 0.16 default rule-selection change (a bare ruff check with no explicit select now enables nearly every rule category, vs. just E and F on 0.15.15). Needs its own dedicated piece of work — deliberately deferred, not fixed here.

Testing

All sub-MRs green. Platform: confirmed no-op via a green Docker build and full test run (141 tests, OK, 2 skipped). Python bump (#452): two-commit split for the Wagtail MAJOR, wagtail-upgrade-audit run (see attention item above), full test suite green twice (once per commit), CI green via gh pr checks (compile_static, lint, test_js, test_python all pass) — used as the certification substitute since tbx-support mr pipeline does not support GitHub. Node bump (#453): CI green via gh pr checks (all 4 jobs pass). Tailwind v4 migration cleanup (#454): build/lint/test green locally and in CI. Trivy scan (#455): 0 findings; its diff is docs-only so no CI workflow triggered (paths-ignore: ["docs/**"]) — confirmed structurally, not a red or stuck pipeline.

Visual QA attestation: the Node bump's gate reported an outstanding Tailwind v4 completing migration (tailwindcss was already ^4.3.0 on main; this cycle finished the remaining catalogue items and bumped the patch version to ^4.3.3), which triggers the same post-integration visual-QA gate as a full MAJOR crossing — so it was run against the fully assembled integration branch regardless. Nick Moreton (nick.moreton@torchbox.com) confirmed on 2026-09-01 against an ephemeral environment (compose project tbx-standup-2d9df799, http://localhost:32770/) — homepage, pattern library, and dark/light mode toggle all rendered correctly. The environment was torn down after confirmation.

nickmoreton and others added 14 commits September 1, 2026 09:56
Bumps the Wagtail pin from ~7.4 to ~8.0 (major) via `poetry add`,
refreshing the lockfile for Wagtail and its transitive dependencies.
Folds in the specifier-normalisation pass (Poetry `^` carets rewritten
to `~` tilde pins at each package's installed major.minor).

wagtail-upgrade-audit 0.19.2 has no `wagtail80` ruleset yet (its known
audits top out at `wagtail74`), so no automated findings were available
for this major version. `manage.py check` and the test suite were run
as validation instead and are green.

Django stays at ~5.2 (patch-only bump, handled in the next commit).

Co-authored-by: Support Skills <support@torchbox.com>
Advances every eligible specifier floor to the latest supply-chain-
cool-down-allowed minor and refreshes poetry.lock accordingly
(Django and Wagtail excluded — they move only through the audit gate,
handled in the previous commit).

Notable floor bumps: django-redis ~6.0 → ~7.0 (major),
django-debug-toolbar ~6.3 → ~7.1 (major), plus minor bumps to
gunicorn, django-pattern-library, django-permissions-policy,
django-phonenumber-field, wagtailmedia, sentry-sdk, beautifulsoup4,
django-upgrade, ruff, pymdown-extensions, faker, and wagtail-factories.

`manage.py check` and the full test suite (141 tests) pass with no new
warnings.

Co-authored-by: Support Skills <support@torchbox.com>
- Bump devDependencies/dependencies to latest via ncu, held to the ESLint ceiling (eslint, eslint-webpack-plugin) and the npm cool-down clamp (jest, jest-environment-jsdom, sass-loader, webpack).
- Hold typescript at ^6.0.3 (<7): ts-jest's latest release (29.4.12) still peer-depends on typescript <7, so a TS7 install fails ERESOLVE. Logged in docs/upgrading.md with the lift condition.
- Drop dead IE11 scaffolding (presumptive drop, confirmed green): browserslist ie11 entries, the foreach/closest polyfills, the svgo ie11 closing-tags override, and raise the TS target from es5 to es2016.
- Fix fallout from the bump: reformat .github/pull_request_template.md (prettier 3.9.6), drop an eslint-disable in dynamic-hero.js left over from an older swiper resolution issue (swiper 12 -> 14).

Co-authored-by: Support Skills <support@torchbox.com>
Co-authored-by: Support Skills <support@torchbox.com>
Co-authored-by: Support Skills <support@torchbox.com>
…e narrative

Co-authored-by: Support Skills <support@torchbox.com>
Co-authored-by: Support Skills <support@torchbox.com>
Co-authored-by: Support Skills <support@torchbox.com>
ruff 0.16 expanded its default rule set from just E/F to nearly every
category. ruff.toml used extend-select, so the 0.16 default drift
leaked in underneath the explicit list, surfacing 459 new findings
(dominated by RUF012 on idiomatic Wagtail/Django patterns) that were
never actually selected.

Switching extend-select to select closes the config over ruff's
defaults, so it no longer drifts with them. Confirmed 0 findings under
ruff 0.16.5 with the fix; pre-commit hook bumped to v0.16.5 to match
the poetry-managed version, lifting the hold from 96fd005.

Co-authored-by: Support Skills <support@torchbox.com>
…-wagtail-80-upgrade

Lifts the ruff 0.16 pre-commit hold from 96fd005.
@nickmoreton nickmoreton self-assigned this Sep 1, 2026
Move the colour, breakpoint and spacing theme, content sources and the
forced-colors variant into tbx/static_src/css/tailwind.css. Split the
webpack style rule so plain CSS skips sass-loader (Dart Sass cannot parse
Tailwind's --color-*: initial reset). Remove the JS config from the Docker
build and compose mount, and the ESLint ignore that only existed for it.

Rewrite the upgrading.md Node hold entries as state and remove the Tailwind
section, whose content now lives in the CSS file and existing checklists.

Compiled output verified equivalent by diffing the full webpack build
before and after.

Co-authored-by: Support Skills <support@torchbox.com>
@damwaingames
damwaingames self-requested a review September 8, 2026 14:06

@damwaingames damwaingames left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a commit cleaning up upgrading.md and also completing the tailwind 4 work properly. You may want to double check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants