Skip to content

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

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

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

Conversation

@freemvmt
Copy link
Copy Markdown
Collaborator

@freemvmt freemvmt commented Apr 2, 2026

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
Collaborator Author

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

Comment thread .devcontainer/Dockerfile
&& 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
Collaborator Author

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 thread package.json
"sass": "^1.69.5"
}
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
Copy link
Copy Markdown
Collaborator Author

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

Copy link
Copy Markdown

Copilot AI left a comment

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
File Description
stopwatch/models/components.py Introduces ReportBlock and adds it to CONTENT_MODULES.
stopwatch/templates/stopwatch/components/report.html New template for rendering report/download CTAs.
stopwatch/templates/base.html Moves social links to footer as icons; updates Bootstrap Icons version.
stopwatch/templates/stopwatch/includes/article_list.html Removes thumbnails from one ROWS article list branch.
stopwatch/migrations/0055_*.py Updates StreamField definitions to include the new block (and other related field alterations).
projects/migrations/0021_*.py Updates projects app StreamFields to reflect shared CONTENT_MODULES changes.
.devcontainer/Dockerfile Adds GDAL system deps for Django.
.bin/install.sh Uses python -m pipenv for install/run commands.
.vscode/settings.json Sets default Python env manager to pipenv.
package.json Adds packageManager pin for Yarn.
yarn.lock Lockfile 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 thread stopwatch/templates/base.html
Comment thread .devcontainer/Dockerfile
&& 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

Copilot AI Apr 2, 2026

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.
Copy link
Copy Markdown
Member

@joaquimds joaquimds left a comment

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 main Apr 2, 2026
4 checks passed
@freemvmt freemvmt deleted the dg/minor-issues branch April 2, 2026 14:08
Sign up for free to 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