Contributing - msupino/NavigationApp GitHub Wiki

🇮🇱 עברית

Contributing

NavAid is a plain HTML/CSS/JavaScript application. Contributions are welcome; keep them focused, bilingual, and tested.

Ground rules

  • No build step, bundler, transpiler, JSX, or TypeScript in docs/.
  • Do not add runtime dependencies without explicit review. The current pinned inventory is in docs/index.html: Leaflet, leaflet-rotate, leaflet-imageoverlay-rotated, and leaflet-velocity.
  • English defaults live in docs/app/core.js; Hebrew overrides live in docs/i18n/he/strings.js. docs/i18n/en/strings.js is intentionally empty.
  • Persist only under navaid.*. Update the sync/device-local registry in tests/settings-sync-allowlist.spec.js and the persistence documentation.
  • Keep all ?v= placeholders in docs/index.html equal. Deploy rewrites app, dataset, version, and service-worker cache markers to the commit SHA.

Required workflow

Every change—even a one-line fix—uses an issue and a feature-branch pull request targeting dev. Never commit or push directly to main or dev.

git fetch origin --prune
git switch dev
git pull --ff-only origin dev
git merge-base --is-ancestor origin/main dev || exit 1
git switch -c feature/<topic>
# edit and test
git push -u origin feature/<topic>
gh pr create --base dev --head feature/<topic> \
  --title "<title>" --body "Fixes #<issue>"

If the ancestry check fails, use a reviewed maintenance PR; do not directly repair a protected branch. Open PRs as drafts by default. Run focused tests locally and let CI run the complete suite. Before another push, confirm the PR is still open.

Same-repository PRs currently also receive a published preview on the production origin. Its storage namespace is not a security boundary; see Deployment. Staging updates after merging into dev; promotion to main is a separate PR.

Checks

Run node --check on every changed JavaScript file and add/update a tests/*.spec.js regression for every behavior change. Use python3 -m http.server -d docs 8000 for local browser testing.

Issues

Open bugs and enhancements at GitHub Issues. Include the browser/OS, reproduction steps, and expected versus actual behavior.

Versioning

The source version stays at 1.0; Deploy appends the short commit SHA to the published toolbar version.

⚠️ **GitHub.com Fallback** ⚠️