Skip to content

Commit

Permalink
Merge pull request #529 from revisit-studies/dev
Browse files Browse the repository at this point in the history
v2.0.0-rc1
  • Loading branch information
JackWilb authored Jan 11, 2025
2 parents 069ec88 + 6436ba0 commit 4491140
Show file tree
Hide file tree
Showing 280 changed files with 63,097 additions and 821 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:

- name: Run make-release.sh to modify version numbers across the repo
run: |
LANG=C sed -i -E "s/\/re[Vv][Ii][Ss]it-studies\/study\/.*\/src/\/revisit-studies\/study\/${{ github.event.pull_request.title }}\/src/g" src/**/*.* src/*.* public/**/*.* public/*.*
LANG=C sed -i -E "s/\/re[Vv][Ii][Ss]it-studies\/study\/tree\/v[^\/]*\/([^\s]*)/\/revisit-studies\/study\/tree\/${{ github.event.pull_request.title }}\/\1/g" src/**/*.* src/*.* public/**/*.* public/*.*
LANG=C sed -i -E "s/githubusercontent.com\/re[Vv][Ii][Ss]it-studies\/study\/.*\/src/githubusercontent.com\/revisit-studies\/study\/${{ github.event.pull_request.title }}\/src/g" src/**/*.* src/*.* public/**/*.* public/*.*
LANG=C sed -i -E "s/github.com\/re[Vv][Ii][Ss]it-studies\/study\/tree\/v[^\/]*\/([^\s]*)/github.com\/revisit-studies\/study\/tree\/${{ github.event.pull_request.title }}\/\1/g" src/**/*.* src/*.* public/**/*.* public/*.*
- name: Commit changes
run: |
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/release_github.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Create release

on:
push:
tags:
- v*

permissions:
contents: write

jobs:
release:
name: Release pushed tag
runs-on: ubuntu-22.04
steps:
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} ${tag}" \
--generate-notes
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ dist-ssr
/playwright/.cache/

docs/

public/__revisit-widget
src/public/__revisit-widget
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@
"@tabler/icons-react": "^3.5.0",
"@trrack/core": "^1.3.0",
"@trrack/vis-react": "^1.5.0",
"@types/crypto-js": "^4.2.2",
"@types/hjson": "^2.4.3",
"@types/lodash": "^4.14.199",
"@types/node": "^22.7.6",
"ajv": "^8.16.0",
"arquero": "^5.4.0",
"crypto-js": "^4.2.0",
"d3": "^7.9.0",
"dayjs": "1.11.11",
"eslint-config-airbnb": "^19.0.4",
Expand Down Expand Up @@ -64,7 +66,7 @@
"wavesurfer.js": "^7.8.8"
},
"devDependencies": {
"@playwright/test": "^1.44.0",
"@playwright/test": "^1.49.1",
"@types/d3": "^7.4.0",
"@types/react": "^18.0.24",
"@types/react-dom": "^18.0.8",
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
webServer: {
command: 'VITE_CI=true yarn serve',
command: 'yarn serve',
url: 'http://localhost:8080',
reuseExistingServer: !process.env.CI,
stdout: 'ignore',
Expand Down
3 changes: 0 additions & 3 deletions public/demo-survey/assets/introduction.md

This file was deleted.

54 changes: 47 additions & 7 deletions public/demo-survey/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,13 @@
"sidebar": true
},
"components": {
"introduction": {
"type": "markdown",
"path": "demo-survey/assets/introduction.md",
"response": []
},
"survey": {
"type": "questionnaire",
"response": [
{
"id": "q1",
"prompt": "Dropdown example",
"secondaryText": "You can specify secondary text to clarify your question.",
"required": true,
"location": "aboveStimulus",
"type": "dropdown",
Expand All @@ -47,7 +43,8 @@
},
{
"id": "q2",
"prompt": "Numerical example",
"prompt": "Numerical example, required",
"secondaryText": "A numeric example",
"required": true,
"location": "aboveStimulus",
"type": "numerical",
Expand All @@ -58,16 +55,56 @@
{
"id": "q3",
"prompt": "Likert scale example",
"secondaryText": "A likert example with 9 items",
"required": true,
"location": "aboveStimulus",
"type": "likert",
"numItems": 9,
"rightLabel": "Like",
"leftLabel": "Dislike"
},

{
"id": "multi-satisfaction",
"prompt": "Rate your satisfaction from 1 (not enjoyable) to 5 (very enjoyable) for the following items.",
"secondaryText": "A simple matrix of Likert responses with predefined options for satisfaction.",
"required": true,
"location": "aboveStimulus",
"type": "matrix-radio",
"answerOptions": "satisfaction5",
"questionOptions": [
"The tool we created",
"The technique we developed",
"The authors of the tools"
]
},

{
"id": "multi-custom",
"prompt": "Which categories do the following items belong to?",
"secondaryText": "A matrix of checkboxes with custom options for categorization.",
"required": true,
"location": "aboveStimulus",
"type": "matrix-checkbox",
"answerOptions": [
"Has Legs",
"Has Wings",
"Can Swim"
],
"questionOptions": [
"Dog",
"Snake",
"Eagle",
"Salmon",
"Platypus"
]

},

{
"id": "q4",
"prompt": "Short text example",
"secondaryText": "A short text example",
"required": true,
"location": "aboveStimulus",
"type": "shortText",
Expand All @@ -76,6 +113,7 @@
{
"id": "q5",
"prompt": "Long text example",
"secondaryText": "A text box for long text",
"required": true,
"location": "aboveStimulus",
"type": "longText",
Expand All @@ -84,6 +122,7 @@
{
"id": "q7",
"prompt": "Checkbox example",
"secondaryText": "Checkboxes for multi-selection",
"required": true,
"minSelections": 2,
"maxSelections": 2,
Expand All @@ -98,6 +137,7 @@
{
"id": "q-radio",
"prompt": "Radio button example",
"secondaryText": "Radio buttons for single selection",
"required": true,
"location": "aboveStimulus",
"type": "radio",
Expand All @@ -109,6 +149,7 @@
{
"id": "q6",
"prompt": "Slider example",
"secondaryText": "A slider for 0-100 with 3 breakpoints for bad, mid, and good",
"location": "aboveStimulus",
"required": true,
"type": "slider",
Expand All @@ -133,7 +174,6 @@
"sequence": {
"order": "fixed",
"components": [
"introduction",
"survey"
]
}
Expand Down
1 change: 1 addition & 0 deletions public/demo-training/assets/help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Provide help text here to help participants pass the training.
136 changes: 136 additions & 0 deletions public/demo-training/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"$schema": "https://raw.githubusercontent.com/revisit-studies/study/v1.0.6/src/parser/StudyConfigSchema.json",
"studyMetadata": {
"title": "How To Do Training Demo",
"version": "pilot",
"authors": [
"The reVISit Team"
],
"date": "2025-01-10",
"description": "A demo of how to do training.",
"organizations": [
"University of Utah",
"WPI"
]
},
"uiConfig": {
"contactEmail": "[email protected]",
"helpTextPath": "demo-training/assets/help.md",
"logoPath": "revisitAssets/revisitLogoSquare.svg",
"withProgressBar": true,
"autoDownloadStudy": false,
"sidebar": true
},
"components": {
"simple-dropbox": {
"type": "questionnaire",
"nextButtonLocation": "sidebar",
"response": [
{
"id": "q1",
"prompt": "What is the most efficient visual mark?",
"secondaryText": "Hint: it's not round.",
"required": true,
"location": "sidebar",
"type": "dropdown",
"placeholder": "Choose mark",
"options": [
"Bar",
"Bubble",
"Pie",
"Stacked Bar"
]
}
],
"correctAnswer": [
{
"id": "q1",
"answer": "Bar"
}
],
"provideFeedback": true,
"allowFailedTraining": false,
"trainingAttempts": 4
},
"slider-range": {
"type": "questionnaire",
"nextButtonLocation": "sidebar",
"response": [
{
"id": "slider-question",
"prompt": "Pick a value half-way.",
"secondaryText": "Try to get the middle value",
"required": true,
"location": "sidebar",
"type": "slider",
"options": [
{
"label": "0",
"value": 0
},
{
"label": "50",
"value": 50
}
]
}
],
"correctAnswer": [
{
"id": "slider-question",
"answer": 25,
"acceptableLow": 22,
"acceptableHigh": 28
}
],
"provideFeedback": true,
"allowFailedTraining": false,
"trainingAttempts": 4
},
"main-page-text-field": {
"type": "questionnaire",
"nextButtonLocation": "belowStimulus",
"response": [
{
"id": "vowel-question",
"prompt": "Respond with a vowel",
"secondaryText": "Just one! Right now, only a works.",
"required": true,
"location": "belowStimulus",
"type": "shortText",
"placeholder": "Enter a single vowel."
},
{
"id": "consonant-question",
"prompt": "Respond with a consonant",
"secondaryText": "Just one! Right now, only s works.",
"required": true,
"location": "belowStimulus",
"type": "shortText",
"placeholder": "Enter a single consonant."
}
],
"correctAnswer": [
{
"id": "vowel-question",
"answer": "a"
},
{
"id": "consonant-question",
"answer": "s"
}
],
"provideFeedback": true,
"allowFailedTraining": false,
"trainingAttempts": 4
}
},
"sequence": {
"order": "fixed",
"components": [
"simple-dropbox",
"slider-range",
"main-page-text-field"
]
}
}
25 changes: 25 additions & 0 deletions public/demo-vega/assets/help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**Scenario**: Alpacas may need blankets. Assume that
you work at the Red Cross, and your job is to manage
resources for farms in Peru. In previous years, alpacas have
died in Peru from cold temperatures. Alpacas can typically
withstand the cold unless the temperature drops below 32°F.

**Budget**: You are in charge of the Red Cross’s blanket
budget, and it is your job to issue blankets to the alpacas
when temperatures fall below 32°F, which will help them
withstand the cold.

**Budget Constraints**: You have a budget for 48 days of
$48,000. Purchasing and delivering blankets to farmers
costs $1,000 (per night). If you fail to issue blankets to the
farmers and the temperature drops below 32°F, it will cost
$6,000 from your budget.

**Task**: In the experiment, you will be shown a nighttime
temperature forecast like the one below. In the forecast, each
dot represents a 1 out of 20 chance the nighttime low will
be that temperature. You will be asked some questions about
this forecast, including if you will issue blankets to the alpacas.
Compensation: Please respond to the best of your ability.
You will receive an extra $0.15 cents for every $1,000 that
you have in your budget at the end of 48 days.
Loading

0 comments on commit 4491140

Please sign in to comment.