Skip to content

Commit

Permalink
Video consent copy (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
okaycj authored Oct 9, 2024
1 parent f2cd2a8 commit 07ce665
Show file tree
Hide file tree
Showing 59 changed files with 7,266 additions and 454 deletions.
11 changes: 7 additions & 4 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
Hello and welcome! This folder has been automatically generated by
`@changesets/cli`, a build tool that works with multi-package repos, or
single-package repos to help you version and publish your code. You can find the
full documentation for it
[in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
We have a quick list of common questions to get you started engaging with this
project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
5 changes: 5 additions & 0 deletions .changeset/gold-tips-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lookit/record": patch
---

Replace MustacheJS with Handlebars
2 changes: 0 additions & 2 deletions .changeset/large-deers-deny.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
"@lookit/surveys": patch
"@lookit/record": patch
"@lookit/style": patch
"@lookit/data": patch
---

Add consent video trial
5 changes: 5 additions & 0 deletions .changeset/soft-trees-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lookit/record": patch
---

Add remaining translations
9 changes: 9 additions & 0 deletions .changeset/stupid-forks-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@lookit/lookit-initjspsych": patch
"@lookit/surveys": patch
"@lookit/record": patch
"@lookit/style": patch
"@lookit/data": patch
---

Update code formatting
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"prettier-plugin-sort-json",
"prettier-plugin-organize-imports",
"prettier-plugin-jsdoc"
]
],
"proseWrap": "always"
}
47 changes: 36 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Lookit jsPsych

Here is the monorepo containing packages developed by Lookit to be used with jsPsych on the lookit.mit.edu project.
Here is the monorepo containing packages developed by Lookit to be used with
jsPsych on the lookit.mit.edu project.

## Create new package

Expand All @@ -12,7 +13,8 @@ To create a new package, run the following at the root of the project:
npm init --scope @lookit --workspace packages/<name of new package>
```

Giving the default answers to `npm init` seems to work okay. I am sure this will change.
Giving the default answers to `npm init` seems to work okay. I am sure this will
change.

Add build and test script to new package's `package.json`:

Expand Down Expand Up @@ -137,25 +139,38 @@ To run a development server:
npm run dev -w @lookit/<name of package>
```

When the server has started, you should see something very similar to `<script src="http://127.0.0.1:10001/index.browser.js"></script>` printed out. Add this html to `web/templates/web/jspsych-study-detail.html` in the Django lookit api project to test the package in your local development environment.
When the server has started, you should see something very similar to
`<script src="http://127.0.0.1:10001/index.browser.js"></script>` printed out.
Add this html to `web/templates/web/jspsych-study-detail.html` in the Django
lookit api project to test the package in your local development environment.

### Serve multiple packages

The above command will serve a single package and wait for changes. If you need to serve multiple packages locally, you can open separate terminals for each package and run the `npm run dev` command in each. Another option is to install [Honcho](https://github.com/nickstenning/honcho) and write a Procfile to serve/watch multiple packages in the same terminal.
The above command will serve a single package and wait for changes. If you need
to serve multiple packages locally, you can open separate terminals for each
package and run the `npm run dev` command in each. Another option is to install
[Honcho](https://github.com/nickstenning/honcho) and write a Procfile to
serve/watch multiple packages in the same terminal.

Create a file called `Procfile` in the root project directory, and list the `npm run dev` commands for each package that you want to serve, preceded by the label you want to give it (to identify the print statements associated with each package in the terminal).
Create a file called `Procfile` in the root project directory, and list the
`npm run dev` commands for each package that you want to serve, preceded by the
label you want to give it (to identify the print statements associated with each
package in the terminal).

```
lookit-initjspsych: npm run dev -w @lookit/lookit-initjspsych
lookit-api: npm run dev -w @lookit/lookit-api
lookit-helpers: npm run dev -w @lookit/lookit-helpers
```

This method is optional (Honcho should not be added to the project dependencies, and Procfile has been added to our gitignore).
This method is optional (Honcho should not be added to the project dependencies,
and Procfile has been added to our gitignore).

## Documentation

To run documentation development server you will need to have Python 3.12 and [Poetry](https://python-poetry.org/docs/#installation) installed. To start the local development server:
To run documentation development server you will need to have Python 3.12 and
[Poetry](https://python-poetry.org/docs/#installation) installed. To start the
local development server:

```
make serve
Expand All @@ -167,10 +182,20 @@ To build the documentation:
make build
```

This will create/update a "site" directory in the project root, containing all of the static files.
This will create/update a "site" directory in the project root, containing all
of the static files.

### Structure

The documentation pages are generated from the README markdown files in the project root directory and the individual package directories. The main project documentation page comes from the root markdown file at `packages/index.md` and the documentation for each package comes from the README markdown files in each package root (e.g. `packages/data/README.md` for the `Data` package.) This documentation structure is defined in `mkdocs.yml`.

The reason for having the documentation pages in these different locations throughout the repository is so that they can be re-used as the package's landing page on NPM. This way, the documentation is bundled into each package, and the NPM site `npmjs.com` will automatically use the README.md file as the package's landing page.
The documentation pages are generated from the README markdown files in the
project root directory and the individual package directories. The main project
documentation page comes from the root markdown file at `packages/index.md` and
the documentation for each package comes from the README markdown files in each
package root (e.g. `packages/data/README.md` for the `Data` package.) This
documentation structure is defined in `mkdocs.yml`.

The reason for having the documentation pages in these different locations
throughout the repository is so that they can be re-used as the package's
landing page on NPM. This way, the documentation is bundled into each package,
and the NPM site `npmjs.com` will automatically use the README.md file as the
package's landing page.
3 changes: 2 additions & 1 deletion jest.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ module.exports.makePackageConfig = () => {
...config,
transform: {
...config.transform,
"^.+\\.mustache$": "<rootDir>/../../jest.text.loader.js",
"^.+\\.hbs$": "<rootDir>/../../jest.text.loader.js",
"^.+\\.svg$": "<rootDir>/../../jest.text.loader.js",
"^.+\\.yaml$": "<rootDir>/../../jest.text.loader.js",
},
moduleNameMapper: { "@lookit/data": "<rootDir>/../../packages/data/src" },
coverageThreshold: {
Expand Down
Loading

0 comments on commit 07ce665

Please sign in to comment.