From 8587fa654c09082e5498e80764c8c45566c1085d Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Wed, 25 Feb 2026 15:56:18 +1100 Subject: [PATCH 1/4] fix: aria-label typo, missing key props, swapped ARIA labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ProjectFrontmatter.tsx: fix 'aira-label' typo → 'aria-label' - ProjectFrontmatter.tsx: add key prop to span elements in reduce - SidebarToggle.tsx: swap ARIA labels (X → Hide, Menu → Show) --- app/components/ProjectFrontmatter.tsx | 4 ++-- app/components/toolbar/SidebarToggle.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/ProjectFrontmatter.tsx b/app/components/ProjectFrontmatter.tsx index 3838070..b18ab7f 100644 --- a/app/components/ProjectFrontmatter.tsx +++ b/app/components/ProjectFrontmatter.tsx @@ -43,7 +43,7 @@ export function ProjectFrontmatter({ )} {authors && ( -
+
{authors.reduce((acc, a, i, authors) => { let chunk: React.ReactNode = a.name; if (a.url) { @@ -61,7 +61,7 @@ export function ProjectFrontmatter({ chunk = <> and {chunk}; } return ( - + {acc} {chunk} diff --git a/app/components/toolbar/SidebarToggle.tsx b/app/components/toolbar/SidebarToggle.tsx index 3af0d31..7d342c9 100644 --- a/app/components/toolbar/SidebarToggle.tsx +++ b/app/components/toolbar/SidebarToggle.tsx @@ -16,7 +16,7 @@ export function SidebarToggle() { })} width={24} height={24} - aria-label="Show table of contents" + aria-label="Hide table of contents" /> ); From 2d66e357298264f487798ce32eb1ec5bfeb83f1c Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Wed, 25 Feb 2026 15:56:41 +1100 Subject: [PATCH 2/4] ci: add CI workflow for typecheck and build Runs on push/PR to main: npm run compile + npm run prod:build --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e0f0acf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: CI +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + name: Build & Typecheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + - run: npm install + - run: npm run compile + - run: npm run prod:build From e743585b47802e264c09702426a36b25f4d5f671 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Wed, 25 Feb 2026 15:57:08 +1100 Subject: [PATCH 3/4] chore: update Node engine to >=18, add .nvmrc, bump actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - package.json engines.node: >=14 → >=18 (Remix 1.19 requirement) - Add .nvmrc pinned to Node 18 - Update release.yml actions to v4 --- .github/workflows/release.yml | 4 ++-- .nvmrc | 1 + package.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f74722e..dbee44d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,9 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js 18.x - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18.x - run: npm install diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18 diff --git a/package.json b/package.json index cb5cd41..274a665 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "katex": "^0.16.21" }, "engines": { - "node": ">=14" + "node": ">=18" }, "packageManager": "npm@8.10.0" } From c5d0a38d342f1a814ef2750a93884e0d3b3458e1 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Wed, 25 Feb 2026 15:57:45 +1100 Subject: [PATCH 4/4] docs: add CONTRIBUTING.md Development setup, available scripts, project structure, commit conventions, and release process (Changesets). --- CONTRIBUTING.md | 94 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c0e5f0a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,94 @@ +# Contributing to quantecon-theme-src + +Thank you for your interest in contributing to the QuantEcon theme! + +## Prerequisites + +- **Node.js** ≥ 18 (see `.nvmrc`) +- **npm** 8.x (see `packageManager` in `package.json`) + +## Development Setup + +```bash +# Clone the repository +git clone https://github.com/QuantEcon/quantecon-theme-src.git +cd quantecon-theme-src + +# Install dependencies +npm install + +# Start the development server (with hot reload) +npm run dev +``` + +The dev server runs at `http://localhost:3000` by default. + +## Available Scripts + +| Command | Description | +| ------------------- | ------------------------------------------------ | +| `npm run dev` | Start dev server with CSS watch + hot reload | +| `npm run prod:build`| Production build (CSS + Thebe assets + Remix) | +| `npm run compile` | TypeScript type-check (`tsc --noEmit`) | +| `npm run format` | Format code with Prettier | +| `npm run clean` | Remove build artifacts | + +## Project Structure + +``` +app/ + backend/ # Server-side loaders (Remix loader functions) + components/ # React components (toolbar/, sidebar, page layout) + hooks/ # Custom React hooks + routes/ # Remix route modules + root.tsx # App shell (document head, theme providers) +styles/ + app.css # Tailwind CSS entry point +public/ # Static assets (logos, Thebe bundles) +patches/ # patch-package patches for upstream fixes +``` + +## Making Changes + +1. **Create a branch** from `main`: + ```bash + git checkout -b feat/my-feature + ``` + +2. **Run type-checking** before committing: + ```bash + npm run compile + ``` + +3. **Test a production build** to catch build-time issues: + ```bash + npm run prod:build + ``` + +4. **Open a Pull Request** against `main`. CI will run type-check and build automatically. + +## Commit Convention + +We use conventional commits: + +- `fix:` — Bug fixes +- `feat:` — New features +- `chore:` — Maintenance (deps, config, CI) +- `docs:` — Documentation only +- `ci:` — CI/workflow changes + +## Releases + +Releases are managed via [Changesets](https://github.com/changesets/changesets). To propose a version bump: + +```bash +npm run changeset +``` + +Follow the prompts, then commit the generated changeset file with your PR. + +## Notes + +- The theme is built on [Remix v1](https://remix.run/) and [@myst-theme](https://github.com/jupyter-book/myst-theme). +- Tailwind CSS is used for styling — see `tailwind.config.js` for the theme configuration. +- TypeScript strict mode is enabled — all code must pass `tsc --noEmit`.