Awards page redesign + backfill missing awards (import_awards)#1355
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Award.badgeimage → 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_awardsmanagement commandIdempotent 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 intodocker-entrypoint.sh(step 4.9). Also corrects the mis-dated Facilitators' Choice / PrototypAR row (2020 → 2019 + project link).--dry-runsupported.Paper awards are intentionally excluded — they live on
Publication.awardand 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).Deploy notes
makemigrations website+migrate websiteadd the nullablebadgecolumn (standard per-env migration), thenimport_awardscreates the rows. Both are idempotent.import_awardsruns every deploy, the way to permanently drop an award is to remove its dict fromENTRIES— deleting it in the admin will recreate it on the next deploy (key istitle+date). Co-recipients can be safely added in the admin.Tests
website/tests/test_award.py(10) — anchor logic incl. Make projects "private" by default when first created #1300 private-project rule.website/tests/test_import_awards.py(5) — idempotency, name-miss handling, dry-run, the Integrate News Feed Into Front Page #18 fix.Accessibility
Awards text colors are WCAG AA by construction: the year badge is dark text on gold (6.5:1),
award-org/award-descriptionuse--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 ofcolor-contrasterrors, 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
/awards/.🤖 Generated with Claude Code