Skip to content
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

Video consent copy #54

Merged
merged 31 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
279bf2b
Initial features for consent video trial.
okaycj Sep 23, 2024
c5a760f
Move/New templates
okaycj Sep 23, 2024
705fa55
Play is active after playback.
okaycj Sep 23, 2024
6012c32
Remove unused template
okaycj Sep 23, 2024
e89cd56
Change to Rollup processing images
okaycj Sep 24, 2024
ff373f4
Update tests
okaycj Sep 25, 2024
41c11d6
Add dependencies
okaycj Oct 3, 2024
2f6f49c
Have prettier handle mustache files
okaycj Oct 3, 2024
999677e
Add support for Handlbars within Rollup
okaycj Oct 3, 2024
23a984a
English translation file from EFP
okaycj Oct 3, 2024
9ca5200
Update svg icons
okaycj Oct 3, 2024
6b71888
consent video trial style
okaycj Oct 3, 2024
8099d8f
Video consent trial
okaycj Oct 3, 2024
45b7692
Update type files
okaycj Oct 3, 2024
ebf0915
Add initialization for i18next and handlebars
okaycj Oct 3, 2024
de6973f
Update to templates/move template from EFP
okaycj Oct 3, 2024
bcd6a4b
Added error for undefined types in jsPsych timeline.
okaycj Oct 3, 2024
3808684
Update init function name
okaycj Oct 7, 2024
de80fff
Add helper function to generate styles
okaycj Oct 7, 2024
71aea3b
Update style
okaycj Oct 7, 2024
676842d
Update default parameters
okaycj Oct 7, 2024
ea07b09
Formatting changes to video config template
okaycj Oct 7, 2024
dc3c911
Remove record icon from webcam feed
okaycj Oct 7, 2024
f4c8ab5
Add replace webcam feed function with record feed function
okaycj Oct 7, 2024
5dc5284
Fix tests
okaycj Oct 8, 2024
0a4bd68
Update tests
okaycj Oct 8, 2024
a0a1a3b
Replace mustache with handlebars. (#56)
okaycj Oct 8, 2024
82a2773
Add remaining translations (#57)
okaycj Oct 8, 2024
8bda644
Remove unnecessary commented lines.
okaycj Oct 9, 2024
82476ef
Add better typing to "additional_segments"
okaycj Oct 9, 2024
5c9bc23
Fix changesets
okaycj Oct 9, 2024
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
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