Skip to content

Commit 626767d

Browse files
committed
feat: began working on meeting 7/23/2025 notes
- Fixed video task not display correct size - Added fields to consent form - Reworked face task to seperate trials by gender and emotion - Moved instruction text to be displayed before the task
1 parent 8a10953 commit 626767d

79 files changed

Lines changed: 508 additions & 161 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

webcamstudy/asset-manifest.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files": {
33
"main.css": "https://seresl.unl.edu/webcamstudy/static/css/main.3de88975.css",
4-
"main.js": "https://seresl.unl.edu/webcamstudy/static/js/main.48afa8d0.js",
4+
"main.js": "https://seresl.unl.edu/webcamstudy/static/js/main.c0f7ecad.js",
55
"static/js/453.e44939a0.chunk.js": "https://seresl.unl.edu/webcamstudy/static/js/453.e44939a0.chunk.js",
66
"static/media/clip2.mp4": "https://seresl.unl.edu/webcamstudy/static/media/clip2.1e6e426f2cdb61fe74ec.mp4",
77
"static/media/clip3.mp4": "https://seresl.unl.edu/webcamstudy/static/media/clip3.3341365941d9bce4b98b.mp4",
@@ -43,7 +43,6 @@
4343
"static/media/image-44.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-44.ba9e6c5023ee74d60077.jpg",
4444
"static/media/image-4.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-4.2845ed1b901ef46af8a2.jpg",
4545
"static/media/image-37.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-37.3dbffb4f170d1e2fbbd7.jpg",
46-
"static/media/image-5.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-5.353313c6a76212d31eef.jpg",
4746
"static/media/image-58.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-58.4b88b2e810980391c15c.jpg",
4847
"static/media/image-12.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-12.14a50f1f842abb188508.jpg",
4948
"static/media/image-45.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-45.5ca7c25e2ca203ca5516.jpg",
@@ -70,11 +69,11 @@
7069
"static/media/image-8.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-8.e491c615c0e21b7007f5.jpg",
7170
"index.html": "https://seresl.unl.edu/webcamstudy/index.html",
7271
"main.3de88975.css.map": "https://seresl.unl.edu/webcamstudy/static/css/main.3de88975.css.map",
73-
"main.48afa8d0.js.map": "https://seresl.unl.edu/webcamstudy/static/js/main.48afa8d0.js.map",
72+
"main.c0f7ecad.js.map": "https://seresl.unl.edu/webcamstudy/static/js/main.c0f7ecad.js.map",
7473
"453.e44939a0.chunk.js.map": "https://seresl.unl.edu/webcamstudy/static/js/453.e44939a0.chunk.js.map"
7574
},
7675
"entrypoints": [
7776
"static/css/main.3de88975.css",
78-
"static/js/main.48afa8d0.js"
77+
"static/js/main.c0f7ecad.js"
7978
]
8079
}

webcamstudy/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="https://seresl.unl.edu/webcamstudy/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="https://seresl.unl.edu/webcamstudy/logo192.png"/><link rel="manifest" href="https://seresl.unl.edu/webcamstudy/manifest.json"/><title>React App</title><script type="module">import EmbeddedPageSdk from"https://app.realeye.io/sdk/js/testRunnerEmbeddableSdk-1.7.1.js";window.addEventListener("DOMContentLoaded",()=>{new EmbeddedPageSdk(!1,null,!1)})</script><script defer="defer" src="https://seresl.unl.edu/webcamstudy/static/js/main.48afa8d0.js"></script><link href="https://seresl.unl.edu/webcamstudy/static/css/main.3de88975.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="https://seresl.unl.edu/webcamstudy/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="https://seresl.unl.edu/webcamstudy/logo192.png"/><link rel="manifest" href="https://seresl.unl.edu/webcamstudy/manifest.json"/><title>React App</title><script type="module">import EmbeddedPageSdk from"https://app.realeye.io/sdk/js/testRunnerEmbeddableSdk-1.7.1.js";let reSdk=null;window.addEventListener("DOMContentLoaded",()=>{reSdk=new EmbeddedPageSdk(!1,null,!1),reSdk.startNextExposure()}),window.addEventListener("endmeplease",()=>{reSdk&&reSdk.finishEyeTrackingTest()})</script><script defer="defer" src="https://seresl.unl.edu/webcamstudy/static/js/main.c0f7ecad.js"></script><link href="https://seresl.unl.edu/webcamstudy/static/css/main.3de88975.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

webcamstudy/public/index.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,21 @@
2828
<script type="module">
2929
import EmbeddedPageSdk from "https://app.realeye.io/sdk/js/testRunnerEmbeddableSdk-1.7.1.js";
3030

31+
let reSdk = null;
32+
3133
window.addEventListener("DOMContentLoaded", () => {
3234
const debugMode = false;
3335
const stimulusId = null;
3436
const forceRun = false;
3537

36-
const reSdk = new EmbeddedPageSdk(debugMode, stimulusId, forceRun);
38+
reSdk = new EmbeddedPageSdk(debugMode, stimulusId, forceRun);
3739
reSdk.startNextExposure();
3840
});
3941

4042
window.addEventListener("endmeplease", () => {
41-
42-
reSdk.finishEyeTrackingTest();
43+
if (reSdk) {
44+
reSdk.finishEyeTrackingTest();
45+
}
4346
});
4447
</script>
4548
</head>

webcamstudy/src/App.jsx

Lines changed: 51 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { useState, useEffect, useCallback } from 'react';
22
import './App.css';
33

4-
// Import task components
54
import ConsentForm from './components/ConsentForm';
65
import TextTask from './components/TextTask';
76
import TextSurvey from './components/TextSurvey';
@@ -60,6 +59,9 @@ function App() {
6059
ethnicity: studyData.consent?.ethnicity || '',
6160
education: studyData.consent?.classRank || '',
6261
major: studyData.consent?.major || '',
62+
visionStatus: studyData.consent?.visionStatus || '',
63+
wearsGlasses: studyData.consent?.wearsGlasses || '',
64+
wearsContactLenses: studyData.consent?.wearsContactLenses || '',
6365
responses: [],
6466
timestamp: new Date().toISOString()
6567
};
@@ -84,34 +86,40 @@ function App() {
8486

8587
// Add face task responses
8688
if (studyData.faceTask && Array.isArray(studyData.faceTask)) {
87-
const face2x2Results = studyData.faceTask.filter(result => result.gridSize === 2);
88-
const face3x3Results = studyData.faceTask.filter(result => result.gridSize === 3);
89+
// Group results by emotion, gender, and grid size
90+
const emotions = ['happy', 'angry', 'sad'];
91+
const genders = ['male', 'female'];
92+
const gridSizes = [2, 3];
8993

90-
if (face2x2Results.length > 0) {
91-
const face2x2Response = {
92-
task: "Face2x2",
93-
response: face2x2Results.map(result => ({
94-
selectedRow: result.selectedRow || 1,
95-
selectedColumn: result.selectedColumn || 1,
96-
isCorrect: result.correct === 'Yes'
97-
})),
98-
isCorrect: calculateOverallFaceCorrectness(face2x2Results)
99-
};
100-
jsonData.responses.push(face2x2Response);
101-
}
94+
emotions.forEach(emotion => {
95+
genders.forEach(gender => {
96+
gridSizes.forEach(gridSize => {
97+
const filteredResults = studyData.faceTask.filter(result =>
98+
result.emotion === emotion &&
99+
result.gender === gender &&
100+
result.gridSize === gridSize
101+
);
102102

103-
if (face3x3Results.length > 0) {
104-
const face3x3Response = {
105-
task: "Face3x3",
106-
response: face3x3Results.map(result => ({
107-
selectedRow: result.selectedRow || 1,
108-
selectedColumn: result.selectedColumn || 1,
109-
isCorrect: result.correct === 'Yes'
110-
})),
111-
isCorrect: calculateOverallFaceCorrectness(face3x3Results)
112-
};
113-
jsonData.responses.push(face3x3Response);
114-
}
103+
if (filteredResults.length > 0) {
104+
const taskName = `Face_${emotion}_${gender}_${gridSize}x${gridSize}`;
105+
const response = {
106+
task: taskName,
107+
response: filteredResults.map(result => ({
108+
trial: result.trial,
109+
emotion: result.emotion,
110+
gender: result.gender,
111+
gridSize: result.gridSize,
112+
selectedRow: result.selectedRow || 1,
113+
selectedColumn: result.selectedColumn || 1,
114+
isCorrect: result.correct === 'Yes'
115+
})),
116+
isCorrect: calculateOverallFaceCorrectness(filteredResults)
117+
};
118+
jsonData.responses.push(response);
119+
}
120+
});
121+
});
122+
});
115123
}
116124

117125
// Download JSON file
@@ -204,23 +212,23 @@ function App() {
204212
!['ConsentForm', 'TextSurvey', 'VideoSurvey', 'FaceTask'].includes(currentTaskName);
205213

206214
return (
207-
<div id="app" style={styles.appContainer}>
208-
<div className="task-container" style={styles.taskContainer}>
209-
{renderCurrentTask()}
210-
</div>
211-
{showNextButton && (
212-
<div className="button-container" style={styles.buttonContainer}>
213-
<button
214-
id="nextTaskButton"
215-
className="button"
216-
style={styles.nextButton}
217-
onClick={incrementTask}
218-
>
219-
Next Task
220-
</button>
215+
<div id="app" style={styles.appContainer}>
216+
<div className="task-container" style={styles.taskContainer}>
217+
{renderCurrentTask()}
221218
</div>
222-
)}
223-
</div>
219+
{showNextButton && (
220+
<div className="button-container" style={styles.buttonContainer}>
221+
<button
222+
id="nextTaskButton"
223+
className="button"
224+
style={styles.nextButton}
225+
onClick={incrementTask}
226+
>
227+
Next Task
228+
</button>
229+
</div>
230+
)}
231+
</div>
224232
);
225233
}
226234

-1.19 MB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)