From 1d1008f36c0dc05b25e0cc1e4147d7c6c4e22e63 Mon Sep 17 00:00:00 2001 From: Jesper Pedersen Date: Wed, 29 Apr 2026 13:36:28 +0200 Subject: [PATCH 1/2] fix: show real per-project last-edited dates and add sort control The CI runner used a shallow clone, so the projectDates data loader fell back to the same commit timestamp for every project card on the deployed site. Fetch full history in both workflows and add a sort control on the home page (last edited / alphabetically, asc/desc). Co-authored-by: Claude --- .github/workflows/deploy.yml | 2 + .github/workflows/verify_build.yml | 2 + CHANGELOG.md | 6 ++ docs/.vitepress/theme/HomeFeatures.vue | 94 ++++++++++++++++++++++++-- 4 files changed, 99 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a6b0594..72b0ae4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,6 +19,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-node@v4 with: diff --git a/.github/workflows/verify_build.yml b/.github/workflows/verify_build.yml index 0a3fbc3..5853464 100644 --- a/.github/workflows/verify_build.yml +++ b/.github/workflows/verify_build.yml @@ -13,6 +13,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-node@v4 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b9cbf8..7673add 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +### Fixed — Project "Last edited" dates on the deployed site +- GitHub Actions workflows (`deploy.yml`, `verify_build.yml`) now check out the full git history (`fetch-depth: 0`) so the `projectDates` data loader can read the per-project last-commit timestamp. Previously the shallow clone caused every project card to show the same date. + +### Added — Sortable project cards on the home page +- `HomeFeatures.vue` now renders a sort control with four options: `Last edited ↓ / ↑` and `Alphabetically ↓ / ↑`. Default sort is newest-first by last edited; projects without a known timestamp sort last. + ### Added — Shared mock banner - New shared mock banner under `docs/public/design-system/v1/mock-banner.{css,js}` — auto-injects a "this is a mock" strip across the top of every prototype, with optional `data-banner-text` override - CI check `npm run lint:mocks` (wired into `.github/workflows/verify_build.yml`) fails the build if a prototype HTML file under `docs/public/projects/` doesn't reference the shared banner; allowlist supported for deliberate exceptions (currently `deltag-aarhus`) diff --git a/docs/.vitepress/theme/HomeFeatures.vue b/docs/.vitepress/theme/HomeFeatures.vue index 2d7b003..2643512 100644 --- a/docs/.vitepress/theme/HomeFeatures.vue +++ b/docs/.vitepress/theme/HomeFeatures.vue @@ -1,10 +1,19 @@