add Report block, improve news page and update socials#86
Conversation
| set -e | ||
|
|
||
| pipenv install | ||
| python -m pipenv install |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
deals with a problem I was consistently running up against when building the devcontainer
| "sass": "^1.69.5" | ||
| } | ||
| }, | ||
| "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" |
There was a problem hiding this comment.
just pins yarn - was automatically added when I ran yarn
There was a problem hiding this comment.
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
ReportBlockand its template, and wires it into sharedCONTENT_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 fallbackelsebranch whenpage.display_modeis 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.
| && 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 |
There was a problem hiding this comment.
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).
| 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/* |
joaquimds
left a comment
There was a problem hiding this comment.
The comments left by copilot are fine to ignore
Addresses the following tickets:
Description
Relevant screenshots available in the linked Linear tickets
Types of changes
Checklist: