-
Notifications
You must be signed in to change notification settings - Fork 30
Add First Nations financial data pages #257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Create new route structure for First Nations bands: - /first-nations/ - Index with searchable band list - /first-nations/[bcid]/ - Band overview (redirects to latest year) - /first-nations/[bcid]/[year]/ - Year-specific financial data - Add Supabase REST API client with ISR caching (1 hour revalidation) - Display financial data: - Statement of Operations as Sankey diagram - Statement of Financial Position stats grid - Remuneration table with dynamic columns - Notes section accordion - Handle edge cases for bands without fiscal year data - Add First Nations link to navigation (desktop and mobile) - Add i18n translation keys for new content Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Dokploy Preview Deployment
|
- Add configurable amountScalingFactor prop to SankeyChart and JurisdictionSankey
- Default to 1e9 (billions) for backwards compatibility with federal/provincial data
- Use amountScalingFactor={1} for First Nations data which is in raw dollars
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
743e037 to
ac22bdb
Compare
|
@claude fix the build. #21 62.50 Export encountered an error on /[lang]/(main)/first-nations/[bcid]/[year]/page: /en/first-nations/ISC_602/2018, exiting the build. |
Add null check in getActualValue() to handle line items where the values object is null, preventing TypeError during SSG. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add document icon next to section titles that toggles inline PDF viewer
- PDFs display inline filling window width when icon is clicked
- Custom tooltip shows immediately on hover with document type
- Statement of Operations and Financial Position use extraction_metadata.source_file
- Remuneration uses URL pattern: cdn.canadaspends.com/financial_statements/{bcid}/{year}/source/remuneration.pdf
- Add "Download Full Financial Report" link at bottom (opens in new tab)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Display historical and ongoing land claims for each First Nation band, including claim status, key dates timeline, settlement amounts, and tribunal awards. Claims data fetched from the Supabase API. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Sankey diagram was showing ~$10M higher totals than financial statements because d3's hierarchy().sum() adds root amount to children's sum. Fixed by: - Set root amount to 0 so displayed total equals children's sum - Show net deferred revenue as a single item instead of hiding it: - If positive: "Deferred Revenue (Net)" on revenue side - If negative: "Deferred to Future Years" on expenses side - Scale children proportionally to match stated totals Added tests for the sankey transform function. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add external link icon next to Land Claims title pointing to AANDC reporting centre - Display claim status (e.g., "File Closed") in Last Update column above the date Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Convert card layout to full-width table with sticky header - Add year filter dropdown and search functionality - Show FS (Financial Statements) and R (Remuneration) indicators per year - Use auburn color scheme with clickable squares linking to band/year pages - Add placeholder columns for Revenue, Expenses, Surplus, Population - Auto-scroll table to show most recent years by default - Sticky first two columns (First Nation, Province) for horizontal scrolling Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move key prop from inner <tr> to Fragment wrapper to fix "Each child in a list should have a unique key prop" warning. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The root layout includes Plus_Jakarta_Sans font class but the [lang]/layout.tsx was missing it, causing a hydration mismatch between server and client. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The font was loaded but never used - the CSS explicitly sets Financier Text for body, Söhne Kraftig for headings, and Founder's Grotesk Mono for code. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allow the table to fill available vertical space instead of being limited to 70vh. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The difference block was missing pathToRoot and descendants properties, causing highlightNode to crash when trying to spread undefined values. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add province filter dropdown with full province names - Add legend showing FS=Financial Statements, R=Remuneration - Link R buttons to #remuneration section on band pages - Add id="remuneration" to remuneration section for hash linking - Remove unused Revenue/Expenses/Surplus/Population columns - Center table and limit First Nation column to 250px - Rename Province header to Prov. for space - Make FS/R text non-selectable - Add Section id prop support to Layout component Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Show on-reserve population under band names and add sort dropdown to toggle between alphabetical and population-based ordering. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fill in all empty msgstr entries for French locale including: - First Nations financial terms (Total Expenses, Total Liabilities, etc.) - Remuneration table labels (Travel, audited/unaudited) - Tax visualizer labels - Land claims terminology (Tribunal Award, Total Payments) - View action labels Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Retry up to 3 times with exponential backoff (1s, 2s, 4s) when encountering 5xx server errors like 502 Bad Gateway during static generation. Non-5xx errors are thrown immediately. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace all references to "First Nations band(s)" with "First Nations" to use more appropriate terminology. This includes renaming files, types, functions, and updating UI text in both English and French locales. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Test plan
/en/first-nationsand verify band list loads with search functionality/en/first-nations/ISC_490) and verify "no data" page displays/fr/first-nations)🤖 Generated with Claude Code