Skip to content

Commit 556f5cc

Browse files
authored
docs: adds guidelines for contributors (#419)
- Adds guidelines for contributors - Adds lock file to /scripts - Adds engine info to package.json in /scripts - Adds data encryption to feature matrix
1 parent 8dc572a commit 556f5cc

File tree

6 files changed

+261
-42
lines changed

6 files changed

+261
-42
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,4 +478,3 @@ jobs:
478478
with:
479479
name: dist-demo
480480
path: packages/web-forms/dist-demo
481-

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ packages/*/test-results
3232

3333
# Generated fixtures/etc
3434
packages/**/test/**/fixtures/generated/**
35+
/scripts/.yarn/

README.md

Lines changed: 85 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,6 @@ You can try a preview [on the ODK website](https://getodk.org/web-forms-preview/
99
1010
https://github.com/getodk/web-forms/assets/447837/9b25e1bc-d209-462c-8e9e-3259bd8c5aa6
1111

12-
## Contributing
13-
14-
### Requirements
15-
16-
We use [Volta](https://volta.sh/) to ensure consistent `node` and `yarn` versions. Published packages are available [on NPM](https://www.npmjs.com/search?q=getodk).
17-
18-
### Running locally
19-
20-
To run ODK Web Forms from this repository:
21-
22-
```sh
23-
yarn
24-
yarn build
25-
yarn workspace @getodk/web-forms dev
26-
```
27-
28-
This repository uses yarn workspaces, so to run an npm script in any of the packages:
29-
30-
```sh
31-
yarn workspace @getodk/<package-name> <script-name>
32-
```
33-
34-
So instead of `cd packages/web-forms && yarn test`, run `yarn workspace @getodk/web-forms test`.
35-
36-
### Running tests
37-
38-
```sh
39-
yarn
40-
yarn build
41-
TZ=America/Phoenix CI=true npx turbo run test --concurrency=1
42-
```
43-
44-
### Packages
45-
46-
- [web-forms](/packages/web-forms): form-filling frontend built with Vue
47-
- [xforms-engine](/packages/xforms-engine): implementation of the [ODK XForms specification](https://getodk.github.io/xforms-spec/)
48-
- [xpath](/packages/xpath): XPath evaluator with ODK XForms extensions
49-
- [scenario](/packages/scenario): engine client used to express tests on forms
50-
5112
## Project status
5213

5314
ODK Web Forms is developed by the [ODK team](https://getodk.org/).
@@ -292,6 +253,7 @@ This section is auto generated. Please update `feature-matrix.json` and then run
292253
| save as draft | |
293254
| offline entities | |
294255
| MBtiles / offline map layers | |
256+
| Data encryption | |
295257

296258
</details>
297259

@@ -433,14 +395,97 @@ We will be adding color and more styling soon. We intend to expose a way to do b
433395
### In the ODK ecosystem
434396

435397
- [JavaRosa](https://github.com/getodk/javarosa) is the reference implementation for [ODK XForms](https://getodk.github.io/xforms-spec/). It powers the [Collect mobile application](https://github.com/getodk/collect/).
436-
- [Enketo](https://github.com/enketo/enketo) is an ODK XForms web form application that has been maintained by the ODK team since 2021.
398+
- [Enketo](https://github.com/enketo/enketo) is an ODK XForms web form application that was maintained by the ODK team from 2021 to 2024.
437399
- [XLSForm](https://github.com/xlsform/pyxform) is a standard for developing ODK XForms using spreadsheets.
438400

439401
### Outside the ODK ecosystem
440402

441403
- [Orbeon forms](https://www.orbeon.com/) is a web form system that uses the W3C XForms standard.
442404
- [Fore](https://github.com/Jinntec/Fore) is an XForms-inspired framework for defining frontend applications.
443405

406+
## Contributing to the Project
407+
408+
Thank you for contributing! Follow these guidelines for smooth collaboration.
409+
410+
### Requirements
411+
412+
We use [Volta](https://volta.sh/) to ensure consistent `node` and `yarn` versions. Published packages are available [on NPM](https://www.npmjs.com/search?q=getodk).
413+
414+
### Running locally
415+
416+
To run ODK Web Forms from this repository:
417+
418+
```sh
419+
yarn
420+
yarn build
421+
yarn workspace @getodk/web-forms dev
422+
```
423+
424+
This repository uses yarn workspaces, so to run an npm script in any of the packages:
425+
426+
```sh
427+
yarn workspace @getodk/<package-name> <script-name>
428+
```
429+
430+
So instead of `cd packages/web-forms && yarn test`, run `yarn workspace @getodk/web-forms test`.
431+
432+
### Running tests
433+
434+
```sh
435+
yarn
436+
yarn build
437+
TZ=America/Phoenix CI=true npx turbo run test --concurrency=1
438+
```
439+
440+
### Packages
441+
442+
- [web-forms](/packages/web-forms): form-filling frontend built with Vue
443+
- [xforms-engine](/packages/xforms-engine): implementation of the [ODK XForms specification](https://getodk.github.io/xforms-spec/)
444+
- [xpath](/packages/xpath): XPath evaluator with ODK XForms extensions
445+
- [scenario](/packages/scenario): engine client used to express tests on forms
446+
447+
### Commit message
448+
449+
Consider using [Conventional Commits](https://www.conventionalcommits.org/):
450+
451+
```
452+
<type>(<issue>): <description>
453+
454+
<optional body>
455+
456+
<optional footer>
457+
```
458+
459+
- **Type**: `feat`, `fix`, `docs`, `test`, `chore`, `perf`.
460+
- **Issue**: Reference ticket (e.g., `#33`).
461+
- **Description**: ≤50 chars, lowercase, present tense (e.g., `add geopoint input`).
462+
- **Body**: List changes (e.g., `- add geopoint.xml`).
463+
- **Footer**: Use `Co-authored-by: @<username>` for credits to another contributor.
464+
465+
**Example**:
466+
467+
```
468+
feat(#33): add input components
469+
470+
- Add geopoint input in Vue
471+
- Add XPath evaluator
472+
473+
Co-authored-by: @jane_doe
474+
```
475+
476+
## Pull Requests
477+
478+
- **Squash and Merge:** After approval, and when possible "squash and merge" your PR to maintain a clean commit history.
479+
- **Keep PRs Focused:** Break large changes into smaller, focused PRs to simplify review and reduce merge conflicts.
480+
- **Code Style:** Adhere to the project's linting and formatting rules (e.g., ESLint, Prettier). Avoid skipping lint rules.
481+
- **Testing:** Include unit and/or integration tests for new features or bug fixes.
482+
- **PR Description:**
483+
- Reference related issues (e.g., Fixes #123).
484+
- Clearly describe the changes, their purpose, and any impact on existing functionality.
485+
- If applicable, include screenshot and videos of your testing.
486+
487+
Contact maintainers with questions. Happy contributing!
488+
444489
## Releases
445490

446491
If you'd like to try the functionality available on `main`, see the preview [on the ODK website](https://getodk.org/web-forms-preview/) which is updated daily. We try to release frequently and if there's functionality on `main` that you need but isn't released yet, please file an issue to request a release!

feature-matrix.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@
140140
"local persistence (single)": "",
141141
"save as draft": "",
142142
"offline entities": "",
143-
"MBtiles / offline map layers": ""
143+
"MBtiles / offline map layers": "",
144+
"Data encryption": ""
144145
},
145146
"XPath": {
146147
"operators": "",

scripts/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
"version": "0.1.0",
44
"private": true,
55
"type": "module",
6+
"engines": {
7+
"node": "^18.20.5 || ^20.18.1 || ^22.12.0",
8+
"yarn": "1.22.22"
9+
},
10+
"volta": {
11+
"node": "22.12.0",
12+
"yarn": "1.22.22"
13+
},
14+
"packageManager": "[email protected]",
615
"scripts": {
716
"test": "true"
817
},

scripts/yarn.lock

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
"@nodelib/[email protected]":
6+
version "2.1.5"
7+
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
8+
integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==
9+
dependencies:
10+
"@nodelib/fs.stat" "2.0.5"
11+
run-parallel "^1.1.9"
12+
13+
"@nodelib/[email protected]", "@nodelib/fs.stat@^2.0.2":
14+
version "2.0.5"
15+
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
16+
integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
17+
18+
"@nodelib/fs.walk@^1.2.3":
19+
version "1.2.8"
20+
resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a"
21+
integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==
22+
dependencies:
23+
"@nodelib/fs.scandir" "2.1.5"
24+
fastq "^1.6.0"
25+
26+
"@sindresorhus/merge-streams@^2.1.0":
27+
version "2.3.0"
28+
resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz#719df7fb41766bc143369eaa0dd56d8dc87c9958"
29+
integrity sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==
30+
31+
braces@^3.0.3:
32+
version "3.0.3"
33+
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
34+
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
35+
dependencies:
36+
fill-range "^7.1.1"
37+
38+
fast-glob@^3.3.3:
39+
version "3.3.3"
40+
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818"
41+
integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==
42+
dependencies:
43+
"@nodelib/fs.stat" "^2.0.2"
44+
"@nodelib/fs.walk" "^1.2.3"
45+
glob-parent "^5.1.2"
46+
merge2 "^1.3.0"
47+
micromatch "^4.0.8"
48+
49+
fastq@^1.6.0:
50+
version "1.19.1"
51+
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5"
52+
integrity sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==
53+
dependencies:
54+
reusify "^1.0.4"
55+
56+
fill-range@^7.1.1:
57+
version "7.1.1"
58+
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
59+
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
60+
dependencies:
61+
to-regex-range "^5.0.1"
62+
63+
glob-parent@^5.1.2:
64+
version "5.1.2"
65+
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
66+
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
67+
dependencies:
68+
is-glob "^4.0.1"
69+
70+
globby@^14.0.2:
71+
version "14.1.0"
72+
resolved "https://registry.yarnpkg.com/globby/-/globby-14.1.0.tgz#138b78e77cf5a8d794e327b15dce80bf1fb0a73e"
73+
integrity sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==
74+
dependencies:
75+
"@sindresorhus/merge-streams" "^2.1.0"
76+
fast-glob "^3.3.3"
77+
ignore "^7.0.3"
78+
path-type "^6.0.0"
79+
slash "^5.1.0"
80+
unicorn-magic "^0.3.0"
81+
82+
ignore@^7.0.3:
83+
version "7.0.5"
84+
resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9"
85+
integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==
86+
87+
is-extglob@^2.1.1:
88+
version "2.1.1"
89+
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
90+
integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
91+
92+
is-glob@^4.0.1:
93+
version "4.0.3"
94+
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
95+
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
96+
dependencies:
97+
is-extglob "^2.1.1"
98+
99+
is-number@^7.0.0:
100+
version "7.0.0"
101+
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
102+
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
103+
104+
merge2@^1.3.0:
105+
version "1.4.1"
106+
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
107+
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
108+
109+
micromatch@^4.0.8:
110+
version "4.0.8"
111+
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
112+
integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
113+
dependencies:
114+
braces "^3.0.3"
115+
picomatch "^2.3.1"
116+
117+
118+
version "4.2.0"
119+
resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64"
120+
integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==
121+
122+
path-type@^6.0.0:
123+
version "6.0.0"
124+
resolved "https://registry.yarnpkg.com/path-type/-/path-type-6.0.0.tgz#2f1bb6791a91ce99194caede5d6c5920ed81eb51"
125+
integrity sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==
126+
127+
picomatch@^2.3.1:
128+
version "2.3.1"
129+
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
130+
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
131+
132+
queue-microtask@^1.2.2:
133+
version "1.2.3"
134+
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
135+
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
136+
137+
reusify@^1.0.4:
138+
version "1.1.0"
139+
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f"
140+
integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==
141+
142+
run-parallel@^1.1.9:
143+
version "1.2.0"
144+
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
145+
integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==
146+
dependencies:
147+
queue-microtask "^1.2.2"
148+
149+
slash@^5.1.0:
150+
version "5.1.0"
151+
resolved "https://registry.yarnpkg.com/slash/-/slash-5.1.0.tgz#be3adddcdf09ac38eebe8dcdc7b1a57a75b095ce"
152+
integrity sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==
153+
154+
to-regex-range@^5.0.1:
155+
version "5.0.1"
156+
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
157+
integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
158+
dependencies:
159+
is-number "^7.0.0"
160+
161+
unicorn-magic@^0.3.0:
162+
version "0.3.0"
163+
resolved "https://registry.yarnpkg.com/unicorn-magic/-/unicorn-magic-0.3.0.tgz#4efd45c85a69e0dd576d25532fbfa22aa5c8a104"
164+
integrity sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==

0 commit comments

Comments
 (0)