Skip to content

Awards page redesign + backfill missing awards (import_awards)#1355

Merged
jonfroehlich merged 5 commits into
masterfrom
awards-update
Jun 19, 2026
Merged

Awards page redesign + backfill missing awards (import_awards)#1355
jonfroehlich merged 5 commits into
masterfrom
awards-update

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

What & why

The new /awards/ page was bland (flat text list, no imagery, year not shown) and missing a lot of content. This redesigns it and backfills the missing awards.

1. Redesign — per-category award cards

Each award renders as a card with a category-specific visual anchor + a prominent year badge:

  • Student Award / PhD Fellowship → recipient's circular photo
  • Project Award → project gallery thumbnail
  • Faculty Honor → gold medal icon (avoids repeating one person's headshot)
  • Any award with the new optional Award.badge image → that emblem (overrides the above)

Year badge + medal use a new golden-orange token (--color-award-gold, #e8910c), dark text for 6.5:1 AA. New "Display" fieldset in the Award admin for the badge.

2. import_awards management command

Idempotent backfill of ~27 people/project/faculty awards mined from the news archive + Jon's CV that were missing from the Award table (see docs/plans/awards-content-audit.md). Resolves recipients/projects by name (logs + skips misses), keyed on (title, date) so it's safe to re-run, and wired into docker-entrypoint.sh (step 4.9). Also corrects the mis-dated Facilitators' Choice / PrototypAR row (2020 → 2019 + project link). --dry-run supported.

Paper awards are intentionally excluded — they live on Publication.award and are already set; the one gap, "Playing on Hard Mode," is tracked in #1354.

3. Housekeeping

  • /awards/ added to the Pa11y scan set (was unscanned).
  • Version bump → 2.14.0.

Deploy notes

  • On deploy, the entrypoint's makemigrations website + migrate website add the nullable badge column (standard per-env migration), then import_awards creates the rows. Both are idempotent.
  • ⚠️ Because import_awards runs every deploy, the way to permanently drop an award is to remove its dict from ENTRIES — deleting it in the admin will recreate it on the next deploy (key is title+date). Co-recipients can be safely added in the admin.

Tests

Accessibility

Awards text colors are WCAG AA by construction: the year badge is dark text on gold (6.5:1), award-org/award-description use --color-text-secondary (7:1), and titles/recipient links are ≥5.5:1. The markup reuses the existing publication-snippet conventions.

Local Pa11y on /awards/ reports a flood of color-contrast errors, but these are false positives from the media-less review DB — broken <img> elements stop axe from resolving backgrounds, so it flags even known-good text. Proof: /publications/ (which passes Pa11y in CI) emits 5150 of the same errors in that same stack. /awards/ has been added to the Pa11y CI URL set, so CI (seeded data, images present) and the test server (real media) are the real gates.

Screenshots

  • Before: current production /awards/.
  • After: to add from the test server post-merge (the local review DB has no media, so portraits/thumbnails don't render locally).

🤖 Generated with Claude Code

jonfroehlich and others added 5 commits June 19, 2026 06:09
Replace the flat text list on /awards/ with a card layout that gives each
award a category-specific visual anchor and a prominent year:

- Student Award / PhD Fellowship -> recipient's circular photo
- Project Award                  -> project gallery thumbnail
- Faculty Honor (or fallback)    -> medal icon
- any award with a new optional Award.badge image -> that emblem (overrides)

Model: add Award.badge / badge_alt_text (admin 'Display' fieldset) and the
get_anchor_kind / get_portrait_person / get_thumbnail_project / get_badge_alt_text
helpers (logic kept in Python so it's unit-testable; respects #1300 project
visibility). Snippet rewritten as .award-card; awards.css gains the card system
(responsive, AA-compliant year badge using --color-award).

Adds 10 regression tests (website/tests/test_award.py) and a content audit
(docs/plans/awards-content-audit.md) of the news archive + CV for missing
awards. No award rows are created yet -- that's pending triage of the audit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Backfills ~24 people/project/faculty awards found in the news archive + CV
that were missing from the Award table (see docs/plans/awards-content-audit.md).
Paper awards are excluded (already on Publication.award; the lone gap, 'Playing
on Hard Mode', is a separate issue).

- ENTRIES is the authoritative spec; recipients/projects resolve by name and a
  miss is logged + skipped (never blocks the rest). Idempotent on (title, date),
  so safe to re-run; wired into docker-entrypoint.sh (step 4.9).
- Also fixes the stale 'Facilitators' Choice' row (2020 -> 2019 + PrototypAR).
- --dry-run reports without writing. 5 regression tests in test_import_awards.py.
- Google awards use canonical titles from the Grants table; #REVIEW flags mark
  lower-confidence entries to confirm/trim before merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Clear the #REVIEW flags Jon confirmed (3M, Inventors in our Midst, Precourt
Fellow, both dissertation awards). Correct the Google street-level award to
2013-02-01 (submitted Oct 2012, awarded Feb 2013). Note the 2020 Google award is
now in the Grants table, and that the AltGeoViz/Madrona co-recipients can be
expanded in the admin (idempotency keys only on title+date).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reviewed live: the red year badge read as error-y and the brand blue got lost
among the page's blue link text. Use a golden-orange accent (--color-award-gold
#e8910c) for the year pill and faculty medal disc. The year text is dark
(--color-text-primary) for 6.5:1 AA on the gold; white is reserved for the
decorative medal glyph. New token lives in design-tokens.css.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the redesigned /awards/ page to the Pa11y CI URL set (it was previously
unscanned) and bump ML_WEBSITE_VERSION 2.13.0 -> 2.14.0 with a release note.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jonfroehlich jonfroehlich merged commit 8618252 into master Jun 19, 2026
3 checks passed
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.

1 participant