Skip to content

feat(comparison): name each column by publisher, pathway and year - #1020

Merged
jacobvjk merged 2 commits into
epic/v2from
feat/condensed-header-publisher
Oct 26, 2026
Merged

jacobvjk merged 2 commits into
epic/v2from
feat/condensed-header-publisher

Conversation

@jacobvjk

Copy link
Copy Markdown
Collaborator

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

  • Each column in the bar reads "Publisher: Pathway" on the left and the publication year on the right, as the issue asks. The year never shortens, so in narrow columns the name gets cut off with "…" first.
  • Also changed: the per-column geography dropdowns are named for screen readers from the same label, and had the same problem (two dropdowns both "Geography for Reference"). They're now named e.g. "Geography for IEA: NZE (2025)". Nothing visible changes there.

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.
  • UI kit: the condensed comparison bar example now shows the new layout.
  • Not yet checked in a browser. On this PR's preview, compare three pathways (ideally two IEA NZE editions), then scroll until the blue bar appears. Each column should show "Publisher: Pathway" with its year on the right.

🤖 Generated with Claude Code

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>
@github-actions

Copy link
Copy Markdown

Expected version change and release notes

🚨 WARNING: This PR is not expected to trigger a new version

To trigger a version bump, use at least one conventional commit message in this branch. See: https://www.conventionalcommits.org/en/v1.0.0/

@github-actions

Copy link
Copy Markdown

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>
@github-actions

Copy link
Copy Markdown

Expected version change and release notes

🚨 WARNING: This PR is not expected to trigger a new version

To trigger a version bump, use at least one conventional commit message in this branch. See: https://www.conventionalcommits.org/en/v1.0.0/

@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-1020.westus2.2.azurestaticapps.net

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@jacobvjk
jacobvjk merged commit ee1d226 into epic/v2 Oct 26, 2026
30 of 32 checks passed
@jacobvjk
jacobvjk deleted the feat/condensed-header-publisher branch October 26, 2026 17:06
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.

3 participants