Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Prettier reformat (formatting only). Tell git blame to skip it:
# git config blame.ignoreRevsFile .git-blame-ignore-revs
f15c95643662c452e929e508997e410f262d84ee
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
test:
runs-on: ubuntu-24.04 # Playwright 1.56 has no browsers for Ubuntu 26.04, which ubuntu-latest became
runs-on: ubuntu-24.04 # Playwright 1.56 has no browsers for Ubuntu 26.04, which ubuntu-latest became
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -39,6 +39,8 @@ jobs:
run: python3 tools/vendor_libs.py --check

- run: npm ci
- name: Code is formatted (fix with npx prettier --write .)
run: npx prettier --check .
- run: npx playwright install --with-deps chromium
- name: Browser tests
run: npx playwright test
Expand Down
33 changes: 33 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Dependencies, test output
node_modules/
test-results/
playwright-report/

# Lockfiles
package-lock.json
branding/package-lock.json

# Vendored third-party code (tools/vendor_libs.py checks it byte for byte)
app/vendor/

# Markdown and docs: hand-written prose, left alone
*.md
docs/

# Generated by tools/build.py (it copies shared/ into these; formatting them would be undone on the next build)
/overlay/ink_overlay.html
/index.html
# Also written by tools/build.py (version stamp, offline file list). Its regexes expect the current markup
# (e.g. `content="...">`), so Prettier's rewrite (` />`, wrapped lines) makes `build.py --check` fail
app/sw.js
app/version.json
app/index.html
app/report/index.html

# Old overlay saved as a compatibility fixture; tests load it as-is
tests/fixtures/Old_v13.html

# tools/build_overlay.py inlines this into the overlay and deletes the line ending in `// @strip-inline`
# (the export list). Prettier wraps that export over many lines and moves the marker, so `export` leaks
# into the inline <script> and the overlay stops loading
shared/ink-core.js
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "singleQuote": true, "printWidth": 120, "trailingComma": "es5" }
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- **All words the teacher sees go in `shared/strings.js`**, in all 8 languages (English, Spanish, Mandarin, Tagalog, Vietnamese, French, Brazilian Portuguese, Arabic). Mark HTML with `data-t` (text), `data-tt` (tooltip), `data-ta` (aria-label); in JS use `tr('key', { vars })`. Every toolbar control needs a tooltip. Check that each language still fits a 1080p board (`tests/i18n.spec.js`).
- **Fixing a board report** (a GitHub issue labeled `board-report`): put `Fixes #N` in the PR body, and leave a one-line plain-language comment on the issue saying what changed. Merging closes the issue, and the reports script then emails the teacher (Claude Haiku turns the owner's comments and PR titles into the "what changed" paragraph). Close reports that won't be fixed as "not planned" so no email goes out. See `docs/REPORTS.md`.
- After editing `app/`, `shared/` or the overlay, run `python3 tools/build.py` (CI runs `--check`).
- Run `npx prettier --write` on the files you changed (CI runs `npx prettier --check .`). Some files are listed in `.prettierignore` because `tools/build.py` generates or edits them, or strips lines from them by pattern (`shared/ink-core.js`); leave those as they are.
- The toolbar must fit a 1080p board (`tests/site.spec.js`); there is about 10 px to spare, so split an existing cell rather than adding a row.
- Tests: `npm install && npx playwright install chromium && npm test`.
- Plain-language commit messages and docs; the owner is a teacher, not a full-time developer.
Loading
Loading