Skip to content

Commit

Permalink
Merge branch 'release/3.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
rlskoeser committed Sep 14, 2023
2 parents b065d69 + 9d36131 commit 5320988
Show file tree
Hide file tree
Showing 34 changed files with 2,107 additions and 414 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -39,7 +39,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -53,4 +53,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
CHANGELOG
=========

3.5
---

- As a content editor, I want to search for people by name when adding them to projects, events, or setting tem as blog post authors, so that I can easily lookup the correct person.
- As a content editor, I want an option to add formatted code to blog posts or other content pages, so I can share technical content clearly.
- update 404 and 500 error page images
- bugfix: project thumbnails not displaying on project card if project doesn't have a larger image associated

3.4.5
-----
- updated to django 4.2 and wagtail 5.0
- updated to python 3.8+ (tested against 3.8-3.11)
- updated node version 18
- removed editoria11y v1 integration
- removed Percy visual testing workflow

3.4.4
-----
Expand Down
2 changes: 1 addition & 1 deletion cdhweb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version_info__ = (3, 4, 5, None)
__version_info__ = (3, 5, 0, None)


# Dot-connect all but the last. Last is dash-connected if not None.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# Generated by Django 4.2.3 on 2023-08-03 22:02

import django.db.models.deletion
import wagtail.blocks
import wagtail.documents.blocks
import wagtail.embeds.blocks
import wagtail.fields
import wagtail.images.blocks
import wagtail.snippets.blocks
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("taggit", "0005_auto_20220424_2025"),
("blog", "0001_initial"),
]

operations = [
migrations.AlterField(
model_name="blogpost",
name="attachments",
field=wagtail.fields.StreamField(
[
("document", wagtail.documents.blocks.DocumentChooserBlock()),
(
"link",
wagtail.snippets.blocks.SnippetChooserBlock(
"cdhpages.ExternalAttachment"
),
),
],
blank=True,
use_json_field=True,
),
),
migrations.AlterField(
model_name="blogpost",
name="body",
field=wagtail.fields.StreamField(
[
(
"paragraph",
wagtail.blocks.RichTextBlock(
features=[
"h2",
"h3",
"h4",
"bold",
"italic",
"link",
"ol",
"ul",
"hr",
"blockquote",
"document",
"superscript",
"subscript",
"strikethrough",
"code",
]
),
),
(
"image",
wagtail.blocks.StructBlock(
[
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"alternative_text",
wagtail.blocks.TextBlock(
help_text="Alternative text for visually impaired users to\nbriefly communicate the intended message of the image in this context.",
required=True,
),
),
(
"caption",
wagtail.blocks.RichTextBlock(
features=[
"bold",
"italic",
"link",
"superscript",
],
required=False,
),
),
]
),
),
(
"svg_image",
wagtail.blocks.StructBlock(
[
(
"image",
wagtail.documents.blocks.DocumentChooserBlock(),
),
(
"alternative_text",
wagtail.blocks.TextBlock(
help_text="Alternative text for visually impaired users to\nbriefly communicate the intended message of the image in this context.",
required=True,
),
),
(
"caption",
wagtail.blocks.RichTextBlock(
features=[
"bold",
"italic",
"link",
"superscript",
],
required=False,
),
),
(
"extended_description",
wagtail.blocks.RichTextBlock(
features=["p"],
help_text="This text will only be read to non-sighted users and should describe the major insights or takeaways from the graphic. Multiple paragraphs are allowed.",
required=False,
),
),
]
),
),
(
"embed",
wagtail.embeds.blocks.EmbedBlock(
help_text='For e.g. videos on YouTube, use the value in the URL bar.\n For other content, look for an "oEmbed URL" option. For videos from\n Princeton\'s Media Central, "oEmbed URL" is in the "Share" menu.'
),
),
(
"migrated",
wagtail.blocks.RichTextBlock(
features=[
"h3",
"h4",
"bold",
"italic",
"link",
"ol",
"ul",
"hr",
"blockquote",
"document",
"superscript",
"subscript",
"strikethrough",
"code",
"image",
"embed",
],
icon="warning",
),
),
],
blank=True,
use_json_field=True,
),
),
migrations.AlterField(
model_name="blogposttag",
name="tag",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="%(app_label)s_%(class)s_items",
to="taggit.tag",
),
),
]
6 changes: 5 additions & 1 deletion cdhweb/blog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from wagtail.admin.panels import FieldPanel, FieldRowPanel, InlinePanel, MultiFieldPanel
from wagtail.models import Orderable, Page, PageManager, PageQuerySet
from wagtail.search import index
from wagtailautocomplete.edit_handlers import AutocompletePanel

from cdhweb.pages.models import BasePage, LinkPage, PagePreviewDescriptionMixin
from cdhweb.people.models import Person
Expand Down Expand Up @@ -79,7 +80,10 @@ class BlogPost(BasePage, ClusterableModel, PagePreviewDescriptionMixin):
content_panels = Page.content_panels + [
FieldRowPanel((FieldPanel("featured_image"), FieldPanel("featured"))),
FieldPanel("description"),
MultiFieldPanel((InlinePanel("authors", label="Author"),), heading="Authors"),
MultiFieldPanel(
[InlinePanel("authors", [AutocompletePanel("person")], label="Author")],
heading="Authors",
),
FieldPanel("body"),
FieldPanel("attachments"),
]
Expand Down
3 changes: 3 additions & 0 deletions cdhweb/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def template_settings(request):
# Include analytics based on settings.DEBUG or override in settings.py
# Defaults to opposite of settings.DEBUG
"INCLUDE_ANALYTICS": getattr(settings, "INCLUDE_ANALYTICS", not settings.DEBUG),
"GTAGS_ANALYTICS_ID": getattr(
settings, "GTAGS_ANALYTICS_ID", not settings.DEBUG
),
# pass any feature flags that are configured
"FEATURE_FLAGS": feature_flags,
"FAVICON": favicon_path(),
Expand Down
Loading

0 comments on commit 5320988

Please sign in to comment.