Skip to content

refactor: centralise tech partner config to unblock ecosystem-agnostic deployment#94

Open
Harshit-Mishra2212 wants to merge 1 commit into
seetadev:mainfrom
Harshit-Mishra2212:fix/externalize-tech-partner-config
Open

refactor: centralise tech partner config to unblock ecosystem-agnostic deployment#94
Harshit-Mishra2212 wants to merge 1 commit into
seetadev:mainfrom
Harshit-Mishra2212:fix/externalize-tech-partner-config

Conversation

@Harshit-Mishra2212

Copy link
Copy Markdown

Problem

Partner names, repo URLs, UI colors, and chart colors are hardcoded in three separate places in component files:

  • TechPartnerChart.tsx : TECH_PARTNER_REPOS, PARTNER_COLORS, TechPartnerName union type
  • TimeSeriesView.tsx : COLORS record

Adding any new ecosystem partner currently requires a developer to edit component source files in multiple places and update a TypeScript union type. This directly contradicts the acceptance criteria in #68: "New ecosystems can be added without code changes"

There is also a chart rendering bug caused by this: TimeSeriesView renders a <Bar> for every entry in the hardcoded COLORS object regardless of what partners are present in the actual data. A new ecosystem with different partners would show empty bars for all the old PLDG partners and nothing for the new ones.

Relates to: #68

Fix

  • Added TECH_PARTNER_CONFIG to constants.ts as a single source of truth; each entry holds repoUrl, color (UI), and chartColor (chart)
  • TechPartnerChart.tsx now reads from TECH_PARTNER_CONFIG for repo URLs and colors, with a DEFAULT_PARTNER_COLOR fallback for unknown partners
  • TimeSeriesView.tsx now derives <Bar> elements from the actual data prop instead of the hardcoded list, chart automatically reflects whatever partners exist in the data

Result

Adding a new ecosystem partner now requires exactly one change: adding one entry to TECH_PARTNER_CONFIG in constants.ts.

Files changed

  • src/lib/constants.ts - added partner config block
  • src/components/dashboard/TechPartnerChart.tsx - removed 3 hardcoded blocks, reads from constants
  • src/components/dashboard/views/TimeSeriesView.tsx - removed hardcoded COLORS, derives bars from data

@vercel

vercel Bot commented May 22, 2026

Copy link
Copy Markdown

@Harshit-Mishra2212 is attempting to deploy a commit to the SEETA's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant