Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6416-upgrade Wagtail to 6.3 #6641

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

cnlucas
Copy link
Member

@cnlucas cnlucas commented Jan 15, 2025

Summary (required)

Upgrades to Wagtail 6.3 (LTS)

Relevant changes in Wagtail 6.0
Changes for users

  • NEW Universal search is shown in the screenshots below

Adds support for Django 5.0 (still supports 4.2)

Wagtail 6.0 has removed the ModelAdmin app

  • We made this change when moving to 5.2
  • Follow-up work is happening after this PR here and here

Query model moved to wagtail.contrib.search_promotions

  • It doesn’t seem like we are using any of the deprecated models, double check searching in wagtail

Support for ES 5/6 dropped

  • NA for us

StreamField no longer requires use_json_field=True (https://docs.wagtail.org/en/stable/releases/6.0.html#streamfield-no-longer-requires-use-json-field-true)

  • Made the code changes—except for the migration files

The wagtail.tests.utils module has been removed and can now be found at wagtail.test.utils.

  • Already moved to test

SnippetViewSet & ModelViewSet copy view enabled by default

  • Seems best to me, confirm with FE

Helpful guide here: https://learnwagtail.com/blog/upgrading-to-wagtail-6-0/

Required reviewers

3-4 reviewers (FE and at least one content)

Impacted areas of the application

General components of the application that this PR will affect:

  • Wagtail

Screenshots

Screenshot 2025-01-15 at 1 44 24 PM

Universal search

Screenshot 2025-01-15 at 1 59 22 PM

Screenshot 2025-01-15 at 1 59 51 PM

How to test

-gh pr checkout 6641
-pyenv virtualenv 3.10.14 cms_new
-pyenv activate cms_new
-pip install -r requirements.txt
-pip install -r requirements-dev.txt
-npm i && npm run build
-dropdb cfdm_cms_test
-createdb cfdm_cms_test
restore latest cms db dump
(get dump from shared folder, 'pg_restore --dbname cfdm_cms_test --no-acl --no-owner PATH')
-cd fec
-python manage.py migrate
-python manage.py createsuperuser
-python manage.py runserver
-pytest
Please try making multiple types of pages, searching for a page, creating & deleting...

@kathycarothers
Copy link
Contributor

I like the two added features of setting a date for a page to be published and the content metrics for the pages. I have just started my review, but wanted to note these two new features.

@djgarr
Copy link
Contributor

djgarr commented Jan 16, 2025

The content metrics are interesting. But it seems like it might not be the most helpful, at least right now. Here's what it is returning with a page with 3 words added and no paragraphs

image

@djgarr
Copy link
Contributor

djgarr commented Jan 16, 2025

Interesting too we can now see a report about the number of page types being used

image

@djgarr
Copy link
Contributor

djgarr commented Jan 16, 2025

Looks like they moved the search function in a number of locations (all the locations?) to the top right corner of the page and condensed information to the top of the page too

image

Copy link
Contributor

@djgarr djgarr left a comment

Choose a reason for hiding this comment

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

Updates look good to me. Thanks!

@johnnyporkchops
Copy link
Contributor

johnnyporkchops commented Jan 18, 2025

@cnlucas One small change... The CSS for our custom RichText Editor features is not rendering because we need to change insert_editor_css to insert_global_admin_css in fec/wagtail_hooks.py. For example, the highlighting of glossary items inside the RTE.

Deprecated in 5.1 and removed in 6

@hooks.register('insert_editor_css')


Also, I agreed with checklist item above about the keeping copy view enabled for SnippetViewSet & ModelViewSet because it currently does not allow editor to choose parent when creating a new page from the News and Updates sidebar menu. By copying an existing page, editors can ensure the parent is /Updates. The followup ticket will re-enable the choose a parent prompt when creating a new page here. Thanks for flagging this!

Copy link
Contributor

@johnnyporkchops johnnyporkchops left a comment

Choose a reason for hiding this comment

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

Works great, left a small comment #6641 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Upgrade Wagtail to LTS v6.3
4 participants