Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
223 commits
Select commit Hold shift + click to select a range
be62e02
Add PLAN
Aug 13, 2026
0d1313a
feat(schema): add pathwayMetadata.v2 with scoped keyFeatures
Aug 13, 2026
3bde9e6
update generated files
Aug 13, 2026
f71d7f5
feat(data): migrate ACE and IEA pathways to metadata v2
Aug 13, 2026
f82abe6
feat(search): read v2 scoped keyFeatures in search and rendering
Aug 13, 2026
4c8f8a6
docs(data): document v2 authoring format; test v2 required fields
Aug 14, 2026
5c022a5
chore: generated files
Aug 19, 2026
9d0841f
Merge remote-tracking branch 'origin/main' into feat/metadata-v2-schema
Aug 19, 2026
387a101
RM PLAN
Aug 19, 2026
b8b5ad1
regenerate files
Aug 19, 2026
ffff388
update tests after merge from main
Aug 19, 2026
68a0f74
drop `pathwayOverview`
Aug 24, 2026
88a1e82
remove unused `transitionAssessment` field
Aug 24, 2026
1536977
update test fixtures
Aug 24, 2026
afa48ad
Ignore the None bucket when resolving keyFeature scopes
Aug 24, 2026
2e61cec
Merge branch 'main' into feat/metadata-v2-schema
AlexAxthelm Aug 24, 2026
34e975a
fix(search): match keyFeature geography scopes by overlap, not contai…
Aug 25, 2026
552addb
Reject duplicate keyFeature scopes
Aug 25, 2026
144dbd1
fix(data): only warn about un-migrated files on the dev server
Aug 25, 2026
147f84d
Correct two description defects and the CI annotation path
Aug 25, 2026
31def48
Scope technologies to their sector (#461)
Aug 26, 2026
7dbb439
Add authored per-metric dataAvailability (#870)
Aug 27, 2026
c3e1f8c
chore(scripts): add pathway metadata import from Excel workbook
Aug 28, 2026
c50b019
simplify script
Aug 28, 2026
d93c047
refactor(data): Update datafiles to V2 schema
Aug 28, 2026
58acc87
feat(pathway-detail): reorganize detail page into deep-linkable tabs
Aug 28, 2026
f6e39d2
feat(pathway-detail): add Data Availability table to Scope & Granular…
Aug 28, 2026
3c40ba3
feat(pathway-detail): add Dependencies table to Overview tab
Aug 28, 2026
b590f30
feat(pathway-detail): add Assumptions & Trends Overview to Overview tab
Aug 28, 2026
ec46b2f
Merge branch 'feat-ui-tabs' into epic/v2
Aug 28, 2026
5c8d469
test(pathway-detail): add integration coverage for tabbed layout wiring
Aug 28, 2026
7f9e1c2
Merge branch 'main' into feat/metadata-v2-schema
Aug 29, 2026
66ee8d5
Merge branch 'feat/metadata-v2-schema' into feat-ui-tabs
Aug 29, 2026
5917043
Merge branch 'feat/metadata-v2-schema' into feat-import
Aug 29, 2026
4dca320
Merge branch 'feat/metadata-v2-schema' into epic/v2
Aug 29, 2026
2e9b55a
Merge branch 'feat-import' into epic/v2
Aug 29, 2026
7fa9c37
Merge branch 'feat-ui-tabs' into epic/v2
Aug 29, 2026
a50d880
refactor(comparison-plots): extract PlotPanel into its own module
jacobvjk Sep 11, 2026
1b1d10c
feat(geography): add resolveGeography fallback util
jacobvjk Sep 11, 2026
3921799
feat(pathway-detail): render benchmark plots as small multiples
jacobvjk Sep 11, 2026
765f2e1
refactor(core-drivers): extract a per-driver renderer
jacobvjk Sep 11, 2026
e5dc889
refactor(key-features): give groups stable ids and allow rendering a …
jacobvjk Sep 11, 2026
e8dd90f
feat(key-features): regroup into six themed groups and fold in core d…
jacobvjk Sep 11, 2026
db862cb
feat(pathway-detail): rehome content across the four tabs
jacobvjk Sep 11, 2026
34a8721
refactor(core-drivers): drop the superseded AssumptionsTrends card grid
jacobvjk Sep 11, 2026
a2cbd65
feat(pathway-detail): add geography to the context ribbon and condens…
jacobvjk Sep 11, 2026
05da386
style: run prettier on the tables added earlier in this PR
jacobvjk Sep 11, 2026
8823036
feat(key-features): render each group as its own card
jacobvjk Sep 11, 2026
6f1657e
feat(pathway-detail): render benchmark plots as cards in a titled panel
jacobvjk Sep 11, 2026
239541d
fix(pathway-detail): let the Pathway Description span the tab width
jacobvjk Sep 11, 2026
afd2ab8
fix(pathway-detail): finish two items missed from the plan
jacobvjk Sep 11, 2026
9b36d97
feat(ui): give sector segment indicators their own badge
jacobvjk Sep 11, 2026
ca2fb79
feat(ui): wire tooltips onto the sector segment badges
jacobvjk Sep 11, 2026
a916379
feat(schema): rename the Storage segment and add fuel extraction
jacobvjk Sep 11, 2026
d3e0a93
chore: ignore the .venv virtualenv
jacobvjk Sep 11, 2026
bd75a8b
feat(ui): source segment tooltips from the timeseries taxonomy
jacobvjk Sep 11, 2026
d172d13
refactor(scope): overlap scope tokens read in the pathway's own vocab…
jacobvjk Sep 11, 2026
f2a01b3
feat(scope): seed a single-select scope from the search selection
jacobvjk Sep 11, 2026
ac090e5
fix(badge-array): stop the props type intersecting with what it redec…
jacobvjk Sep 11, 2026
5820519
feat(tooltip): allow the trigger to render as a button
jacobvjk Sep 11, 2026
5e56338
feat(badge-array): optional single-select toggle behaviour
jacobvjk Sep 11, 2026
f61242b
feat(pathway-detail): make the context ribbon a scope selector
jacobvjk Sep 11, 2026
07f8895
feat(pathway-detail): scope the data availability table
jacobvjk Sep 11, 2026
dd82cad
fix(pathway-detail): key availability rows by their full scope tuple …
jacobvjk Sep 11, 2026
1e7c972
feat(pathway-detail): scope the dependencies table to the selected se…
jacobvjk Sep 11, 2026
c28bb46
test: use real schema enum values in the new scope fixtures
jacobvjk Sep 11, 2026
acce2d7
fix(pathway-detail): report the geography fallback once, and refuse t…
jacobvjk Sep 11, 2026
28d4d7d
feat(pathway-detail): wire the ribbon selection into the page
jacobvjk Sep 11, 2026
4a63b22
feat(pathway-detail): open the detail view on a definite scope
jacobvjk Sep 11, 2026
af69878
chore: untrack local metadata prep scripts
jacobvjk Sep 11, 2026
d5f23c3
feat(url-state): extract a generic URL-param state hook
jacobvjk Sep 21, 2026
3e1d7f4
fix(geography): resolve a region across spelling variants
jacobvjk Sep 22, 2026
b621d76
feat(comparison): model the shared scope across compared pathways
jacobvjk Sep 22, 2026
fb8c386
feat(search): block comparing pathways with no sector in common
jacobvjk Sep 22, 2026
67a08f0
feat(comparison): block comparing pathways with no sector in common
jacobvjk Sep 22, 2026
9dcc77b
feat(comparison): seed the comparison URL from the search scope
jacobvjk Sep 22, 2026
1144896
feat(comparison): a shared scope header with a geography warning
jacobvjk Sep 22, 2026
4759040
feat(comparison-plots): resolve the shared geography per column
jacobvjk Sep 22, 2026
160fb15
fix(comparison-plots): size the charts to their column (#842)
jacobvjk Sep 22, 2026
927a40f
test(comparison): stabilise the page tests under parallelism (#896)
jacobvjk Sep 22, 2026
0766e58
fix(comparison): drop a restored selection that cannot be compared
jacobvjk Sep 22, 2026
80d5bfa
fix(badge): restore the outlined geography badge colours
jacobvjk Sep 22, 2026
4cdf733
fix(availability): match a geography across spelling variants
jacobvjk Sep 22, 2026
d84624f
refactor(comparison): one source for a pathway's geography options
jacobvjk Sep 22, 2026
d470f3c
feat(comparison): a geography dropdown for one column
jacobvjk Sep 22, 2026
44fe600
feat(comparison): model per-column geography
jacobvjk Sep 22, 2026
e209132
feat(comparison): give each column its own geography
jacobvjk Sep 22, 2026
98ea789
update .gitignore!
jacobvjk Sep 22, 2026
63c1cac
feat(comparison-plots): caption each column with its sector segment
jacobvjk Sep 22, 2026
e19eebf
feat(comparison): list region members on the geography badges
jacobvjk Sep 22, 2026
1a810ee
feat(comparison): show core drivers alongside the key features
jacobvjk Sep 22, 2026
4c45f23
Merge remote-tracking branch 'origin/main' into epic/v2
Sep 23, 2026
9736794
Merge remote-tracking branch 'origin/feat/comparison-scope' into epic/v2
Sep 23, 2026
b01b0b7
feat(schema): align dataAvailability with the cookbook vocabulary
jacobvjk Sep 25, 2026
8e82fc5
Merge branch 'feat/metadata-v2-schema' into feat-ui-tabs
jacobvjk Sep 25, 2026
7b59c2c
Merge branch 'feat-ui-tabs' into feat/detail-scope-filters
jacobvjk Sep 25, 2026
6a1fcb0
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
jacobvjk Sep 25, 2026
767c678
refactor(schema): rename the Storage sector segment to Energy storage
jacobvjk Sep 25, 2026
b1339f2
Merge branch 'feat/metadata-v2-schema' into feat-ui-tabs
jacobvjk Sep 25, 2026
90220e0
Merge branch 'feat-ui-tabs' into feat/detail-scope-filters
jacobvjk Sep 25, 2026
9c09b18
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
jacobvjk Sep 25, 2026
5e7ab5b
refactor(schema): spell the scope sentinels as the cookbook does
jacobvjk Oct 2, 2026
c5131ba
feat(schema): add the key-feature values the cookbook requires
jacobvjk Oct 2, 2026
57d93c6
feat(schema): complete the sector-conditional vocabularies
jacobvjk Oct 2, 2026
b6d5c82
feat(schema): add sector segments at pathway level
jacobvjk Oct 2, 2026
b7a7c4c
docs(data): document the v2 schema changes for authors
jacobvjk Oct 2, 2026
8410463
Merge branch 'feat/metadata-v2-schema' into feat-ui-tabs
jacobvjk Oct 2, 2026
21f02d0
fix(availability): render the segment list, not the array
jacobvjk Oct 2, 2026
0d38209
Merge branch 'feat-ui-tabs' into feat/detail-scope-filters
jacobvjk Oct 2, 2026
e1e6d22
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
jacobvjk Oct 2, 2026
ba6b77a
fix(import): emit the schema's scope sentinel, and stop hiding author…
jacobvjk Oct 2, 2026
e73a40c
chore(import): type the anyOf branch membersOf reads
jacobvjk Oct 2, 2026
2fa3d4c
fix(taxonomy): give Power the two technologies the cookbook added
jacobvjk Oct 2, 2026
19671b1
Merge branch 'feat/metadata-v2-schema' into feat-ui-tabs
jacobvjk Oct 2, 2026
1279b69
Merge branch 'feat-ui-tabs' into feat/detail-scope-filters
jacobvjk Oct 2, 2026
70bae45
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
jacobvjk Oct 2, 2026
67637da
Merge branch 'feat/metadata-v2-schema' into feat-import
jacobvjk Oct 2, 2026
aca5f55
data: JETP-CIPP-2023 regains Geothermal and Energy storage
jacobvjk Oct 2, 2026
172945f
update .gitignore!
jacobvjk Sep 22, 2026
94550e3
fix(validate): check every sector's segments, and keep No information…
jacobvjk Oct 2, 2026
9436cc7
fix(availability): tolerate a sector with no timeseries metrics
jacobvjk Oct 2, 2026
e274196
fix(scope): a stale geography token matches nothing, Global included
jacobvjk Oct 2, 2026
ac5cf8e
Merge branch 'feat/metadata-v2-schema' into feat-ui-tabs
jacobvjk Oct 2, 2026
9571d9a
Merge branch 'feat-ui-tabs' into feat/detail-scope-filters
jacobvjk Oct 2, 2026
7f8d2fb
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
jacobvjk Oct 2, 2026
d950d20
Merge branch 'feat/metadata-v2-schema' into feat-import
jacobvjk Oct 2, 2026
085a9db
chore(codemod): read coreDriversProse from the local it was destructu…
jacobvjk Oct 2, 2026
80581b9
Merge branch 'feat/metadata-v2-schema' into feat-ui-tabs
jacobvjk Oct 2, 2026
803ef69
Merge branch 'feat-ui-tabs' into feat/detail-scope-filters
jacobvjk Oct 2, 2026
8be410e
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
jacobvjk Oct 2, 2026
192970e
Merge branch 'feat/metadata-v2-schema' into feat-import
jacobvjk Oct 2, 2026
028622d
fix(schema): allow three-letter region labels as scope tokens
jacobvjk Oct 2, 2026
a1ccf73
Merge branch 'feat/metadata-v2-schema' into feat-ui-tabs
jacobvjk Oct 2, 2026
1369866
Merge branch 'feat-ui-tabs' into feat/detail-scope-filters
jacobvjk Oct 2, 2026
64657cd
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
jacobvjk Oct 2, 2026
1537cde
Merge branch 'feat/metadata-v2-schema' into feat-import
jacobvjk Oct 2, 2026
1a610a3
feat(import): import data availability, and stop the import losing data
jacobvjk Oct 2, 2026
956a0cc
data: import data availability, restore 13 descriptions, add Singapore
jacobvjk Oct 2, 2026
23d8e0d
fix(tooltip): keep Escape-to-dismiss when a caller passes onKeyDown
jacobvjk Oct 2, 2026
6360f4d
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
jacobvjk Oct 2, 2026
536e62d
fix(comparison): count only pathways that still exist in the ribbon
jacobvjk Oct 2, 2026
4296982
chore: stop tracking two local data-prep scripts
jacobvjk Oct 2, 2026
d3cea33
Merge branch 'feat/comparison-scope' into epic/v2
jacobvjk Oct 2, 2026
71e7a8f
Merge branch 'feat-import' into epic/v2
jacobvjk Oct 2, 2026
5b27520
fix(availability): keep Not covered rows under any geography selection
jacobvjk Oct 2, 2026
bfe0987
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
jacobvjk Oct 2, 2026
7e1a340
Merge branch 'feat/comparison-scope' into epic/v2
jacobvjk Oct 2, 2026
a154faa
Merge origin/main into epic/v2
jacobvjk Oct 2, 2026
315f6c6
fix(import): block on bad availability rows; keep v1 key features
jacobvjk Oct 2, 2026
0706478
fix(ribbon): re-clicking the selected geography no longer clears it
jacobvjk Oct 2, 2026
8ff7b37
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
jacobvjk Oct 2, 2026
7f8f257
fix(comparison): link encoding, stale-id count, sectorless candidates
jacobvjk Oct 2, 2026
2191778
Merge branch 'feat-import' into epic/v2
jacobvjk Oct 2, 2026
72468ea
Merge branch 'feat/comparison-scope' into epic/v2
jacobvjk Oct 2, 2026
b0690f9
data: import the 45 data-availability rows fixed in the workbook
jacobvjk Oct 2, 2026
b11a975
Merge branch 'feat-import' into epic/v2
jacobvjk Oct 2, 2026
6092bea
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
jacobvjk Oct 2, 2026
aff55ab
Merge branch 'feat/comparison-scope' into epic/v2
jacobvjk Oct 2, 2026
ff0da46
feat(availability): show segments and geographies as badges
jacobvjk Oct 2, 2026
d9d9455
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
jacobvjk Oct 2, 2026
f155cc1
Merge branch 'feat/comparison-scope' into epic/v2
jacobvjk Oct 2, 2026
0445467
fix(availability): keep each table badge on one line
jacobvjk Oct 2, 2026
5993ccf
fix(comparison): drop stale ids when restoring the tray
jacobvjk Oct 2, 2026
2c54a8e
fix(geography): find a region's members across spelling variants
jacobvjk Oct 2, 2026
7619a5b
Merge branch 'feat/comparison-scope' into epic/v2
jacobvjk Oct 2, 2026
c3c0751
Trigger CI
jacobvjk Oct 5, 2026
7ae8754
Trigger CI
jacobvjk Oct 5, 2026
116488a
Merge branch 'main' into epic/v2
AlexAxthelm Oct 5, 2026
4eef365
chore: update generated type files
Oct 5, 2026
fefce33
Merge branch 'main' into feat/metadata-v2-schema
Oct 5, 2026
d9a12be
chore: generate types
Oct 5, 2026
8888b51
more types
Oct 5, 2026
39c7967
Merge remote-tracking branch 'origin/feat/metadata-v2-schema' into ep…
Oct 5, 2026
38a2c6e
uupdate types
Oct 5, 2026
414b2a6
Merge branch 'feat/detail-scope-filters' into feat/comparison-scope
AlexAxthelm Oct 5, 2026
fb43194
Merge pull request #946 from RMI/feat/detail-scope-filters
AlexAxthelm Oct 5, 2026
47e90db
Merge branch 'epic/v2' into feat/comparison-scope
AlexAxthelm Oct 5, 2026
b0849d6
Merge pull request #954 from RMI/feat/comparison-scope
AlexAxthelm Oct 5, 2026
f319df1
feat(schema): pathwayTimeseries v2 with published geography and secto…
jacobvjk Oct 6, 2026
a88bd33
data: migrate the 16 timeseries files to v2
jacobvjk Oct 6, 2026
4156b77
docs(data): describe the v2 timeseries format
jacobvjk Oct 6, 2026
52b1003
feat(import): import v2 timeseries prepared by the benchmark prep repo
jacobvjk Oct 6, 2026
a63f4b8
feat(download): sector_segment columns from the rows, not the metric
jacobvjk Oct 6, 2026
d2e21ee
feat(plots): segment badges from the plotted rows
jacobvjk Oct 6, 2026
3934f19
fix(schema): Power timeseries technologies match the taxonomy
jacobvjk Oct 6, 2026
6c8171c
refactor(geography): drop the spelling folds #945 needed
jacobvjk Oct 6, 2026
a00f08f
fix(schema): pathwayId needs at least one id, each listed once
jacobvjk Oct 6, 2026
602c050
Merge branch 'feat/timeseries-v2-schema' into feat/timeseries-import
jacobvjk Oct 6, 2026
6304693
fix(import): list every problem per file; guard ids used as file names
jacobvjk Oct 6, 2026
11e5915
Merge branch 'feat/timeseries-import' into feat/timeseries-segment-ui
jacobvjk Oct 6, 2026
fdce31b
fix(plots): no segment badge under a series PlotPanel does not draw
jacobvjk Oct 6, 2026
604de4b
Merge branch 'feat/timeseries-v2-schema' into fix/geography-spelling-…
jacobvjk Oct 6, 2026
153934e
Merge branch 'feat/timeseries-v2-schema' into fix/timeseries-power-te…
jacobvjk Oct 6, 2026
8a97d19
fix(codemod): refuse a pathwayId list that v2 rejects
jacobvjk Oct 6, 2026
e8ea393
Merge branch 'feat/timeseries-v2-schema' into feat/timeseries-import
jacobvjk Oct 6, 2026
59d6858
fix(import): never write a new file onto an occupied path; all-or-not…
jacobvjk Oct 6, 2026
c537935
Merge branch 'feat/timeseries-import' into feat/timeseries-segment-ui
jacobvjk Oct 6, 2026
62012fc
Merge branch 'feat/timeseries-v2-schema' into fix/timeseries-power-te…
jacobvjk Oct 6, 2026
5fe4da3
Merge branch 'feat/timeseries-v2-schema' into fix/geography-spelling-…
jacobvjk Oct 6, 2026
5ece641
fix(import): roll back the failed write's target; back up or abort
jacobvjk Oct 6, 2026
9870786
Merge branch 'feat/timeseries-import' into feat/timeseries-segment-ui
jacobvjk Oct 6, 2026
5680ded
fix(import): compare destinations ignoring case; check them in the sa…
jacobvjk Oct 6, 2026
3bf35ce
Merge branch 'feat/timeseries-import' into feat/timeseries-segment-ui
jacobvjk Oct 6, 2026
61f5eb1
Merge pull request #974 from RMI/feat/timeseries-v2-schema
jacobvjk Oct 6, 2026
87bcf2f
Merge pull request #975 from RMI/feat/timeseries-import
jacobvjk Oct 6, 2026
7fc1c5f
Merge pull request #976 from RMI/feat/timeseries-segment-ui
jacobvjk Oct 6, 2026
183cbb2
Merge pull request #980 from RMI/fix/geography-spelling-fold
jacobvjk Oct 7, 2026
4e02916
Merge pull request #979 from RMI/fix/timeseries-power-technologies
jacobvjk Oct 7, 2026
b0357ae
docs(readme): how to add or update pathways and benchmark data
jacobvjk Oct 7, 2026
88f1f6c
docs(readme): match the importers' actual behaviour (#986 review)
jacobvjk Oct 8, 2026
539efa0
fix(download): fall back to the full publisher name in the CSV
jacobvjk Oct 9, 2026
192bc47
docs(design): add UI kit and design tokens, generate colour tokens fr…
jacobvjk Oct 9, 2026
23fee44
fix(design): address review — tokens, card preview, JSON sample
jacobvjk Oct 9, 2026
ef675f5
fix(design): re-check every UI kit preview against its component
jacobvjk Oct 9, 2026
69de66f
Merge pull request #986 from RMI/docs/readme-adding-pathways
jacobvjk Oct 12, 2026
823c378
Merge pull request #987 from RMI/fix/csv-publisher-fallback
jacobvjk Oct 12, 2026
6f8776c
Merge branch 'main' into epic/v2
AlexAxthelm Oct 12, 2026
ba28d3f
feat(data): import v2 timeseries from the benchmark prep repo
jacobvjk Oct 12, 2026
3993768
fix(plots): show geothermal as a low-carbon technology in the mix chart
jacobvjk Oct 12, 2026
69a7833
refactor(schema): drop Renewables as a Power technology
jacobvjk Oct 12, 2026
3b5a9d2
fix floating point issue in other
jacobvjk Oct 13, 2026
281861e
Merge pull request #989 from RMI/feat/import-benchmar-data-v2
jacobvjk Oct 15, 2026
901926c
Merge pull request #988 from RMI/docs/design-kit-v2
jacobvjk Oct 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/node-build-committed-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,34 @@ jobs:
echo "No changes found after generating."
exit 0
fi

design-tokens:
name: "Check design tokens match src/index.css"
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: "npm"
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm ci

- name: Regenerate design tokens
run: npm run tokens:build

- name: Compare Results
run: |
if git diff --quiet HEAD -- docs/design/tpr-design-tokens.json; then
echo "Design tokens match src/index.css."
else
echo "::error::docs/design/tpr-design-tokens.json is out of date with src/index.css. Run 'npm run tokens:build' and commit the result."
git --no-pager diff HEAD -- docs/design/tpr-design-tokens.json
exit 1
fi
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
# Frontend: Node modules
node_modules/

# Python virtualenv used by the schema-doc tooling. Never commit it: a plain
# `git add -A` otherwise sweeps in ~2,700 files of binaries and .pyc.
.venv/

# Frontend: Build output
build/
dist/
Expand All @@ -26,3 +30,6 @@ pnpm-debug.log*

# Generated/copied files
public/data/**/*

.tsbuildcache/node.tsbuildinfo
tsconfig.app.tsbuildinfo
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,73 @@ The application is deployed using Azure Static Web Apps:

Pull requests automatically deploy to preview environments with URLs provided in the PR comments.

## Adding or updating pathways

Each pathway on the site has two parts:

1. **A description** (the "metadata"): who published it, which sectors and regions it covers, its key features, drivers, dependencies and what data it offers. Every pathway needs one.
2. **Benchmark data** (the "timeseries"): the numbers behind the charts and the download, for example installed solar capacity in Southeast Asia, year by year. This part is optional.

**The description always comes first.** Benchmark data may only use the region names its pathway's description lists, so a new pathway, or a new region, has to be in the description before its data can be added.

Neither part is edited by hand. Data people fill in a shared workbook or run a preparation script, and a developer brings the result into this repository with an import script that checks the data and prints a report of every problem it finds. Every change then goes through a pull request, which builds a preview of the site (the link appears in the pull request) so the new pathway can be checked before it goes live.

### Adding or updating a pathway description

**Who:** someone who knows the publication fills in the workbook; a developer does the import.

1. **Fill in the workbook.** Descriptions are written in the shared workbook `pathway_data_prepared.xlsx` (on RMI's SharePoint; ask the TPR data team for access). Each pathway gets a row in the metadata sheet and rows in the sheets for key features, core drivers, dependencies and data availability. The classification cookbook says which values are allowed and how to choose them.
2. **Tell the developer what's new.** The importer only handles pathways on its own list (`TARGETS` in `scripts/import-pathway-data.ts`); a workbook row it doesn't know is reported as "unmatched" and skipped.
- **Updating a pathway on that list** needs nothing extra. Some older pathways on the site are not on it yet.
- **A new pathway** needs a line on the list, naming the file to create and an existing pathway file to use as a template. The importer takes the publication's title and year from the workbook but copies the rest of the publication details (publisher, licence, links) from the template, so pick one from the same publisher and check those details afterwards.
- **A new publisher** has no such template. The developer adds it to the allowed publishers (`src/schema/common/publication.v1.json`), teaches the importer to recognise its name (`publisherGroup` in the same script), and writes the new file's publication details by hand after the import.
3. **Import (developer).** Run a dry run first. It writes nothing and prints a report of everything it could not take over cleanly, such as a value that isn't allowed or a missing field. Some problems stop the import (for example a data-availability row that is only partly "Not covered"); others are skipped and listed in the report, so read it all:

```bash
npx ts-node --esm scripts/import-pathway-data.ts --xlsx <path/to/pathway_data_prepared.xlsx> --dry-run
```

Fix problems in the workbook (not in the files here) and repeat until the report shows nothing you want to fix. Then run the same command without `--dry-run`, followed by:

```bash
npx prettier --write "src/data/**/*.json"
npm run schema:check
```

4. **Review and publish.** Open a pull request. Check the pathway on the preview site, then merge.

### Adding or updating benchmark data

**Who:** the benchmark data is prepared in a separate repository, [RMI/tpr_benchmark_data_preparation](https://github.com/RMI/tpr_benchmark_data_preparation) (RMI internal), by someone with access to the raw publication files; a developer does the import.

1. **Prepare the data.** Run the preparation pipeline as its README describes. It produces two things:
- `benchmark_data_prepared.xlsx`, a workbook for checking the numbers by eye. Review it before going on.
- a `tpr_timeseries` folder with one file per dataset, ready to import. A dataset usually belongs to one pathway but can be shared by several.
2. **Import (developer).** Again, a dry run first. This import is stricter: if anything is wrong it writes nothing at all, and it lists every problem in one go:

```bash
npx ts-node --esm scripts/import-benchmark-data.ts --in <path/to/tpr_timeseries> --dry-run
```

The most common problems, and what to do about them:

| The import says | What it means | What to do |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| "… is not a geography pathway … declares" | The data names a region that is not written exactly like any region in the pathway's description | Check the publication. If the data's name is a typo or differs from the publication's wording, fix it in the preparation repository. If the publication really covers that region and the description leaves it out, add it to the description (see above) and re-import that first. |
| "… is not the id of any pathway" | The data points to a pathway id that has no description | If the id is mistyped, fix it in the preparation repository. If the pathway is new, add its description first. |
| "… is not a segment of …" | A row names a part of the sector that doesn't belong to that sector | Fix it in the preparation repository. |

Once the dry run is clean, run it again without `--dry-run`. It updates existing files and adds new ones next to their pathway's description; it never deletes anything. Then:

```bash
npm run build:timeseries
npm run schema:check
```

3. **Review and publish.** Open a pull request, check the charts and the data download on the preview site, then merge.

The file formats and every validation rule are described in [`src/data/README.md`](src/data/README.md).

## Development

### Set-Up
Expand Down
48 changes: 48 additions & 0 deletions docs/design/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# TPR design reference

Design files for the Transition Pathways Repository, kept next to the code they describe. Nothing in this folder is part of the website: it is never built, deployed, or shown to users.

| File | What it is |
| -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`tpr-design-tokens.json`](tpr-design-tokens.json) | Every brand color, plus type sizes, weights, corner radius, and shadows, in a format Figma can import (via the Tokens Studio plugin). |
| [`tpr-ui-kit.html`](tpr-ui-kit.html) | A visual reference page showing every reusable interface component: badges, buttons, cards, tables, and so on, each labeled with the code names developers use. |

## Opening the UI kit

GitHub shows HTML files as code rather than as a page. To view it:

1. Open [`tpr-ui-kit.html`](tpr-ui-kit.html) on GitHub.
2. Click the **Download raw file** button (the downward arrow, top right of the file).
3. Double-click the downloaded file. It opens in your browser.

The page's last section, **Using this in Figma**, walks through importing the colors and components.

## For the designer: what stays up to date by itself, and what doesn't

### ✅ Automatic: the colors in `tpr-design-tokens.json`

The colors in this file are copied straight from the app's code by a script, never typed by hand. Every proposed code change is checked automatically on GitHub: if a developer changes a color and this file no longer matches, the change is blocked until they update it.

**What this means for you:** the colors in this file always match the app's code on the same branch. You can trust it without double-checking. This folder currently lives on the `epic/v2` branch, so it reflects the v2 redesign rather than the version users see today.

**What it doesn't do:** it doesn't update Figma. When colors change, re-import this file into Tokens Studio to pick up the new values. Checking this file's history on GitHub (the **History** button) shows you when it last changed.

### ✋ Manual: everything else

These parts are maintained by hand, so they can fall behind the code. When the app's look changes, someone needs to update them.

| What | Why it's manual | When to update it |
| ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **The UI kit page** (`tpr-ui-kit.html`) | It's a hand-drawn picture of the components, not the components themselves. No script can redraw it. | When a change adds, removes, or restyles a component. Ask the developer making the change to update the kit in the same pull request, or flag it for you. |
| **Type sizes, weights, corner radius, shadows** in the token file | These are standard defaults that the app's code doesn't define, so there's nothing for the script to copy from. They rarely change. | Only if the team deliberately changes them, for example by adopting a brand typeface. |
| **The "Last checked" line below** | It records when someone last compared the UI kit against the real app. | Every time the UI kit is updated. |
| **Your Figma file** | Figma lives outside this repository. | After any change to either file here. |

**Last checked:** October 2026, against the v2 redesign in [RMI/tpr#937](https://github.com/RMI/tpr/pull/937).

> **Note on v2:** items in the UI kit tagged **v2** come from #937, the v2 redesign on the `epic/v2` branch, which had not been merged into `main` when this was written. Once it merges, remove the "not yet live" note at the top of the UI kit and update the line above.

## For developers

- **Changed a color in `src/index.css`?** Run `npm run tokens:build` and commit the updated `docs/design/tpr-design-tokens.json`. CI fails until you do.
- **Changed how a component looks?** Update `tpr-ui-kit.html` to match (or tell the designer), and update the **Last checked** line above.
Loading
Loading