Repository navigation
feat(comparison): name each column by publisher, pathway and year - #1020
Conversation
Once the pathway cards scroll away, the comparison header's condensed bar named each column by its short pathway name alone, so two editions of IEA NZE, or two publishers' "Reference", looked identical. * Each column reads "Publisher: Pathway" on the left and the publication year on the right. The year never truncates, so the name gives way first in narrow columns. * The per-column geography selects take the same name plus the year as their accessible name, which had the same ambiguity. Closes #1012 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Expected version change and release notes🚨 WARNING: This PR is not expected to trigger a new versionTo trigger a version bump, use at least one conventional commit message in this branch. See: https://www.conventionalcommits.org/en/v1.0.0/ |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-1020.westus2.2.azurestaticapps.net |
nze2025 spreads an already-typed pathway, so `as unknown as` changed nothing and ESLint's no-unnecessary-type-assertion failed the PR. A type annotation keeps the intent and checks the shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Expected version change and release notes🚨 WARNING: This PR is not expected to trigger a new versionTo trigger a version bump, use at least one conventional commit message in this branch. See: https://www.conventionalcommits.org/en/v1.0.0/ |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-1020.westus2.2.azurestaticapps.net |
There was a problem hiding this comment.
🟢 Approval recommended
The localized changes match the requested behavior and include regression coverage, with no blocking issues identified; browser rendering remains unverified.
No open issues 🎉
What changed in this PR
Updates the comparison page’s condensed header to distinguish pathways with identical short names, addressing issue #1012.
Changes:
- Displays “Publisher: Pathway” with a right-aligned publication year that remains visible when names truncate.
- Adds publisher and year to geography dropdowns’ accessible names.
- Updates regression tests and the UI kit example to cover the richer labels.
| File | Description |
|---|---|
src/pages/ComparisonPage.test.tsx |
Updates geography control assertions for the expanded accessible names. |
src/components/ComparisonScopeHeader.tsx |
Adds publisher and year to column labels and dropdown names. |
src/components/ComparisonScopeHeader.test.tsx |
Covers matching pathway names across publishers and publication years. |
docs/design/tpr-ui-kit.html |
Updates the condensed header example and truncation styles. |
Review effort: Balanced
Closes #1012
When you scroll down the comparison page, the pathway cards scroll away and a slim blue bar names each column. It used only the short pathway name, so two editions of IEA NZE, or two publishers' "Reference", looked identical.
What changes
If a publisher has no short name (TransitionZero, PH DOE), its full name is used.
Checks
npx vitest run: 1351 passing, including a new test with two IEA NZE editions and another publisher's "NZE".npm run lint,npm run format:check: clean.🤖 Generated with Claude Code