Skip to content

add Report block, improve news page and update socials - #86

Merged
freemvmt merged 4 commits into
mainfrom
dg/minor-issues
Apr 2, 2026
Merged

add Report block, improve news page and update socials#86
freemvmt merged 4 commits into
mainfrom
dg/minor-issues

Conversation

@freemvmt

@freemvmtfreemvmt commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator

Addresses the following tickets:

Description

  • Minor fixes to make it possible for me to build the devcontainer
  • Remove images from article list
  • Remove social links from header and main nav menu, and puts them in the footer as icons (Instagram, Bluesky, TikTok, LinkedIn)
  • add new Report component for use in the Wagtail StreamField editor

Relevant screenshots available in the linked Linear tickets

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I've checked the spec (e.g. Figma file) and documented any divergences.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I've updated the documentation accordingly.
  • Replace unused checkboxes with bullet points.

Comment thread.bin/install.sh
set -e

pipenv install
python -m pipenv install

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

use the pipenv belonging to the python 3.8 install, rather than a detached version in py-utils

&& sed -i '1s;^deb;deb [signed-by=/usr/share/keyrings/yarn-keyring.gpg];' /etc/apt/sources.list.d/yarn.list

# ensure GDAL is available for Django
RUN apt update && apt install -y --no-install-recommends gdal-bin libgdal-dev

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

deals with a problem I was consistently running up against when building the devcontainer

Comment threadpackage.json
"sass": "^1.69.5"
}
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

just pins yarn - was automatically added when I ran yarn

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Stopwatch site’s content components and layout to support refreshed News/Opinion pages and social links, while also improving local/devcontainer setup.

Changes:

  • Adds a new Wagtail StreamField ReportBlock and its template, and wires it into shared CONTENT_MODULES (with corresponding migrations).
  • Updates global templates to remove social links from header/nav and add icon-based social links in the footer; bumps Bootstrap Icons CDN version.
  • Adjusts article list rendering to remove thumbnails in one list variant, plus minor devcontainer/install tooling updates (and lockfile changes).

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
stopwatch/models/components.pyIntroduces ReportBlock and adds it to CONTENT_MODULES.
stopwatch/templates/stopwatch/components/report.htmlNew template for rendering report/download CTAs.
stopwatch/templates/base.htmlMoves social links to footer as icons; updates Bootstrap Icons version.
stopwatch/templates/stopwatch/includes/article_list.htmlRemoves thumbnails from one ROWS article list branch.
stopwatch/migrations/0055_*.pyUpdates StreamField definitions to include the new block (and other related field alterations).
projects/migrations/0021_*.pyUpdates projects app StreamFields to reflect shared CONTENT_MODULES changes.
.devcontainer/DockerfileAdds GDAL system deps for Django.
.bin/install.shUses python -m pipenv for install/run commands.
.vscode/settings.jsonSets default Python env manager to pipenv.
package.jsonAdds packageManager pin for Yarn.
yarn.lockLockfile updates consistent with dependency/tooling changes.
Comments suppressed due to low confidence (1)

stopwatch/templates/stopwatch/includes/article_list.html:83

  • This change removes thumbnail images only for the ROWS variant when page.display_mode == 'articles', but the template still renders images in other branches (e.g. GRID view and the fallback else branch when page.display_mode is unset). If the intent is to remove images from the article list generally (per PR description), the remaining image-rendering branches should be updated too for consistent behavior.
 <section class="{{ class }}">
{% for page in pages %}
<div class="row g-0 link-reset iscroll_item article-listitem">
<div class="col py-3 me-md-3">
<a href="{{ page.url }}">
<h3 class="heading-medium mb-3 mb-md-4">{{ page.title }}</h3>
{% if page.intro_text %}<div class="mb-3 mb-md-4">{{ page.intro_text|plaintext }}</div>{% endif %}
</a>
<div>{% include "stopwatch/includes/article_metadata.html" %}</div>
</div>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadstopwatch/templates/base.html
&& sed -i '1s;^deb;deb [signed-by=/usr/share/keyrings/yarn-keyring.gpg];' /etc/apt/sources.list.d/yarn.list

# ensure GDAL is available for Django
RUN apt update && apt install -y --no-install-recommends gdal-bin libgdal-dev

CopilotAIApr 2, 2026

Copy link

Choose a reason for hiding this comment

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

In the devcontainer Dockerfile, apt update && apt install ... doesn’t clean up /var/lib/apt/lists/*, which increases image size and reduces layer cache efficiency. Consider combining update+install in a single RUN and removing apt lists afterward (and typically using apt-get in non-interactive Docker builds).

Suggested change
RUN apt update && apt install -y --no-install-recommends gdal-bin libgdal-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y --no-install-recommends gdal-bin libgdal-dev \
&& rm -rf /var/lib/apt/lists/*

Copilot uses AI. Check for mistakes.

@joaquimdsjoaquimds left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The comments left by copilot are fine to ignore

@freemvmt
freemvmt merged commit 27221dc into mainApr 2, 2026
4 checks passed
@freemvmt
freemvmt deleted the dg/minor-issues branch April 2, 2026 14:08
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@freemvmt@joaquimds