Repository navigation
Add a documentation site for FieldWorks Lite and Lexbox #2790
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8dbd691
Add a documentation site for FieldWorks Lite and Lexbox
myieye c2a189d
Add search, last-updated dates and a collapsible sidebar to the docs
myieye 69a3855
Use lexbox.org's blue and FW Lite's Noto Sans in the docs
myieye a1132fe
Address CodeRabbit review on the docs PR
myieye b34b27d
Merge remote-tracking branch 'origin/develop' into claude/docs-promote
myieye dd73498
Split docs into docs/site and docs/dev; replace the beta Google Doc
myieye 03ad701
Trim the sync explainer to six questions
myieye b59cd38
Drop the dev-facing data-loss warning from the FwHeadless merge page
myieye 2351e6a
Calm the beta page and link lexbox.org where the docs send people there
myieye File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| name: Docs | ||
| on: | ||
| push: | ||
| paths: | ||
| - 'docs/site/**' | ||
| - '.github/workflows/docs.yaml' | ||
| branches: | ||
| - develop | ||
| pull_request: | ||
| paths: | ||
| - 'docs/site/**' | ||
| - '.github/workflows/docs.yaml' | ||
| branches: | ||
| - develop | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| defaults: | ||
| run: | ||
| working-directory: ./docs/site | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| # Full history for each page's "Last updated" date. | ||
| fetch-depth: 0 | ||
| - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 | ||
| with: | ||
| package_json_file: 'docs/site/package.json' | ||
| - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | ||
| with: | ||
| node-version-file: './docs/site/package.json' | ||
| cache: 'pnpm' | ||
| cache-dependency-path: './docs/site/pnpm-lock.yaml' | ||
| - run: pnpm install --frozen-lockfile | ||
| - run: pnpm typecheck | ||
| # Build for this repo's GitHub Pages URL until docs.lexbox.org is set up. | ||
| - run: pnpm build | ||
| env: | ||
| DOCS_URL: https://${{ github.repository_owner }}.github.io | ||
| DOCS_BASE_URL: /${{ github.event.repository.name }}/ | ||
| - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | ||
| if: ${{ github.ref == 'refs/heads/develop' }} | ||
| with: | ||
| path: docs/site/build | ||
|
|
||
| deploy: | ||
| name: Deploy to GitHub Pages | ||
| if: ${{ github.ref == 'refs/heads/develop' }} | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| permissions: | ||
| pages: write | ||
| id-token: write | ||
| concurrency: | ||
| group: pages | ||
| cancel-in-progress: false | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| steps: | ||
| - id: deployment | ||
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 |
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| ### Prerequisites | ||
| * [Docker Desktop for Mac](https://docs.docker.com/desktop/setup/install/mac-install/) | ||
| * enable Kubernetes in the Docker Desktop settings | ||
|
|
||
| ### Setup details | ||
| * to install [Taskfile](https://taskfile.dev/installation/) and [Tilt](https://docs.tilt.dev/), for example with Homebrew: | ||
| * `brew install go-task tilt` | ||
| * check with `task --version` and `tilt version` | ||
| * install ICU4C (macOS does not have ICU installed by default): | ||
| * `brew install icu4c` | ||
| * add the following lines to your ~/.zshrc (Apple Silicon): | ||
| ``` | ||
| export DYLD_LIBRARY_PATH=/opt/homebrew/opt/icu4c/lib:$DYLD_LIBRARY_PATH | ||
| export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false | ||
| ``` | ||
| * run `task setup` and continue with the [main instructions](../../README.md) |
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
File renamed without changes.
File renamed without changes.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # ADR 0002: Product docs site in the monorepo | ||
|
|
||
| Status: Accepted | ||
|
|
||
| ## Context | ||
|
|
||
| There was no documentation home. Technical content (sync architecture, integrations, CI/CD) lived in `AGENTS.md` files and the root README, written for coding agents. User documentation didn't exist in the repo; the apps link out to the FieldWorks help site, Scribe how-tos and the community forum. | ||
|
|
||
| Other SIL products (surveyed 2026-07): Bloom, Scripture Forge and Paratext use Docusaurus with Crowdin for translation; Bloom adds Algolia DocSearch and its Ask AI chat. The Combine uses MkDocs Material for offline in-app bundling. FieldWorks uses WordPress plus GitHub wikis that have gone stale. | ||
|
|
||
| FieldWorks Lite ↔ FieldWorks Classic sync is the hardest thing to explain: several static diagrams and UI iterations still confused people. | ||
|
|
||
| ## Decision | ||
|
|
||
| - **One Docusaurus site** with product sections: `/fw-lite/` (FieldWorks Lite app users), `/lexbox/` (lexbox.org and Send/Receive users) and `/technical/` (how it works, for anyone curious; not how to develop it). One pipeline, one search index. "Which app do you use?" is a factual question; persona labels ("I'm a manager") are a known audience-navigation failure (NN/g). The homepage routes with product tiles; `/lexbox/fw-lite` bridges project managers to the FieldWorks Lite guide. | ||
| - **Source in this monorepo**, so the docs change in the same PR as the code and reviewers see drift in the diff. The site lives in `docs/site/` and everything there is published; developer docs (setup, troubleshooting, ADRs) live in `docs/dev/`. Rules for keeping the site current: `docs/site/AGENTS.md`. | ||
| - **Terminology follows the shipped UI.** CRDT, Harmony, Mercurial and FwHeadless are technical-section vocabulary only. | ||
| - **Link to FieldWorks Classic docs, don't duplicate them.** Sibling products, sibling doc sites. | ||
| - **The sync explainer** (`/fw-lite/how-sync-works`) is an interactive, question-driven stepper over one fixed picture (device → Lexbox holding two copies → colleague's FieldWorks Classic), mirroring the app's Sync dialog. Users pick their question instead of a persona tab; each answer is a learner-paced sequence of short steps (Mayer's segmenting principle; no autoplay). All content is in `syncScenarios.ts`. Its caps are load-bearing: they fix the overwhelm that sank the static diagrams. | ||
| - **React for interactive components** (Docusaurus), accepted though the products are Svelte. Content stays in framework-neutral files. Revisit if product-like components pile up: compile Svelte to web components, or move to Astro Starlight. | ||
| - **Deployment**: GitHub Pages from `.github/workflows/docs.yaml` (build on PR, deploy on develop). Final URL: `docs.lexbox.org`, a Cloudflare CNAME `docs` → `sillsdev.github.io`. Until that's set up, CI builds for the repo's own Pages URL (the site URL is env-configurable). | ||
| - **Later**: Crowdin for the user guides, Algolia DocSearch and Ask AI, screenshots, app help links pointing here, moving architecture content out of `AGENTS.md` files into `technical/` and linking back. |
File renamed without changes
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| /node_modules | ||
| /build | ||
| .docusaurus | ||
| .cache-loader |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Docs site | ||
|
|
||
| Docusaurus site with three sections: `fw-lite/` (FieldWorks Lite users), `lexbox/` (lexbox.org and Send/Receive users) and `technical/` (how the system works, for anyone curious; not how to develop it). Everything in this folder is published. Developer docs (setup, troubleshooting, ADRs) go in `docs/dev/`, CI/CD in `.github/AGENTS.md`. Check a change with `pnpm install && pnpm build` in this folder; broken links and anchors fail the build. `pnpm typecheck` covers the React components. | ||
|
|
||
| ## Which page to update | ||
|
|
||
| | You changed | Update | | ||
| |---|---| | ||
| | FW Lite UI (`frontend/viewer/`) | the `fw-lite/` page that names it; Sync dialog changes also `src/components/SyncExplainer/syncScenarios.ts` | | ||
| | When sync runs or which edit wins (`backend/FwLite/`, `backend/FwHeadless/`) | `fw-lite/how-sync-works.mdx`, `syncScenarios.ts`, `lexbox/fw-lite.md`, `technical/sync/` | | ||
| | lexbox.org UI, roles, invites, orgs, project requests (`frontend/src/`, `backend/LexBoxApi/`, `backend/LexCore/`) | the `lexbox/` page that names it | | ||
|
|
||
| `git grep` the old label or behavior under `docs/site/` to find every page that mentions it. | ||
|
|
||
| ## Adding pages | ||
|
|
||
| - A feature gets its own page in its section (e.g. `fw-lite/views.md` for choosing and customizing views), titled by what the user does, with headings that answer the questions support gets. Order it with `sidebar_position` between the existing pages; the FAQ sits last at 99. | ||
| - No stub pages: every page, section index pages included, must answer something on its own (at least a short intro plus content or a contents list). Fold thin content into its parent page instead. | ||
| - Add the page to its section's `index.md` "In this guide" list. Once a section has more than about six feature pages, group them in a folder with a `_category_.json`. | ||
| - Downloads always link to `https://lexbox.org/fw-lite`, never to files. Only exception: the Mac early-tester build (GitHub releases), with its warning. | ||
|
|
||
| ## Writing rules | ||
|
|
||
| - Name buttons, menus and tabs exactly as the app shows them: FW Lite text is a `msgid` in `frontend/viewer/src/locales/en.po`, lexbox.org text a value in `frontend/src/lib/i18n/locales/en.json`. `fw-lite/` says FieldWorks Classic (FW Lite's name for the desktop app); `lexbox/` says FieldWorks (lexbox.org's name). No doc-only names. | ||
| - `fw-lite/` and `lexbox/` are for non-technical readers: plain words, short sentences, no em-dashes. CRDT, Harmony, Mercurial and FwHeadless belong in `technical/` and the "Under the hood" box. Call the sync engine Harmony; say CRDT only where you explain what Harmony is. | ||
| - Say who can see a feature when not everyone can (role, beta flag, admin only). | ||
| - No real project codes, names, people or project data, in text or screenshots. Example project codes use the private-use language code `qaa`. Screenshots come from FW Lite's example project or a local dev Lexbox. | ||
| - `technical/` explains how the system works; `AGENTS.md` files keep agent procedure (commands, gotchas) and link here. The docs never link to `AGENTS.md` files. Don't copy content between them. | ||
| - The sync explainer's limits are in the `syncScenarios.ts` header. | ||
|
|
||
| ## Links must keep working | ||
|
|
||
| Support replies link to pages, headings and explainer questions (`/fw-lite/how-sync-works#not-seen`: scenario ids in `syncScenarios.ts` are URLs). The apps are meant to link to `/fw-lite/` (FW Lite help), `/lexbox/` (lexbox.org help), `/fw-lite/how-sync-works` (Sync help) and `/lexbox/fw-lite` (turning on FW Lite). | ||
|
|
||
| - Moving or renaming a page: add `@docusaurus/plugin-client-redirects` with a redirect from the old path. | ||
| - Rewording a heading changes its anchor. Keep the old one with `## New wording {/* #old-anchor */}` (`{#id}` doesn't build here because of `future.v4`). | ||
| - Don't rename a scenario id. | ||
|
|
||
| Decisions behind the site: `docs/dev/adr/0002-docs-site.md`. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @AGENTS.md |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.