feat: add /grants page with wave data, FAQ, and tests - #106
Open
odarome132 wants to merge 1 commit into
Open
Conversation
Contributor
|
Retarget from |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_Closes #73
Summary
Adds a
/grantsroute atsrc/pages/Grants.tsxgiving Wave applicants a single page explaining the Wraith grant program — how Drips + external funding works, the current open wave with eligibility/review criteria, past-wave highlights with recipient details, and an accordion FAQ covering rewards, eligibility, and how to apply.The current wave data lives in
src/data/wave.jsonso a wave change is one file. No code changes needed to swap waves.What changed
New files
src/pages/Grants.tsx(261 lines)pastWaves[]— shows name, budget, funding source, highlights, and recipients tablefaq[]entriesbg-surface,bg-surface-container,border-outline-variant,text-on-surface,text-on-surface-variant,font-heading/font-body/font-mono)target="_blank" rel="noopener noreferrer"src/data/wave.json(82 lines)currentWave— id, name, status ("open"), openDate, closeDate, budget ($150,000), fundingSource ("Drips + External"), description, howToApply, applyUrl, rewardRange, eligibility (4 items), reviewCriteria (5 items)pastWaves[]— one entry (Wave 0: Protocol Foundation, $75,000, External, 3 highlights, 1 recipient)faq[]— 7 entries: what is Drips, how funded, who can apply, how reviewed, timeline, milestones, multiple wavessrc/__tests__/grants.test.tsx(170 lines, 11 tests)Modified files
src/App.tsxconst Grants = lazy(() => import("./pages/Grants"))<Route path="/grants" element={<Grants />} />src/components/Header.tsx<Link to="/grants">before the Stellar link, usingt("header.nav.grants")onClick={closeMenu}src/i18n/en.json"grants": "Grants"toheader.navsrc/i18n/es.json"grants": "Subvenciones"toheader.navKey design decisions
JSON-driven waves —
src/data/wave.jsonis the single source of truth. To open a new wave, edit thecurrentWaveobject and move the old one topastWaves[]. No component changes needed.Existing page pattern — Follows the same conventions as
Faq.tsxandRoadmap.tsx: lazy-loaded page component,Header+Footercomposition,window.history.replaceStatein tests, data imported fromsrc/data/.No new dependencies — Uses only what the repo already provides (React, react-router-dom, Tailwind, @testing-library/react, vitest, vitest-axe).
Same design tokens — Reuses the exact color palette from CLAUDE.md (surface: #0e0e0e, surface-container: #141414, on-surface: #e6e1e5, etc.). Zero border-radius everywhere. No gradients or glows.
FAQ accordion pattern — Mirrors the existing FAQ page accordion:
<button>witharia-expanded, conditionally rendered answer panel, "Show"/"Hide" text toggle.Acceptance criteria checklist
/grantsroute added and linked from header (desktop + mobile)pnpm exec tsc --noEmitexits cleanlypnpm buildsucceeds (tsc, vite build, inline-css, OG generation, sitemap)Test output
Coverage for changed files
Note: The 95% branch is the
currentWave.status === "open"ternary. To cover the else branch, changestatusto something other than "open" in wave.json. This is expected — a wave is either open or closed, never both simultaneously.Follow-ups
@vitest/coverage-v8to devDependencies and wire--coverageinto the CI test step. Currently absent from the lockfile (I installed it locally for manual verification but did not commit it per the frozen-install convention).src/data/wave.json: setcurrentWave.statusto "closed", move Wave 1 intopastWaves[], and populatecurrentWavewith Wave 2 data. That is it — no code changes.scripts/og.ts.Security