Skip to content

Commit 0a0ac4b

Browse files
committed
fix: address issues discussed in 7/9/2025 meeting:
- Next button is now in the bottom right corner - The video now autoplays on load - The face task only shows one smiling face in a crowd of unsmiling faces
1 parent 3163cae commit 0a0ac4b

65 files changed

Lines changed: 156 additions & 58 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: 11 additions & 11 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.a12b748b.js",
4+
"main.js": "https://seresl.unl.edu/webcamstudy/static/js/main.d471531e.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",
@@ -19,8 +19,8 @@
1919
"static/media/image-24.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-24.ca8665a3fdc15a9b2151.jpg",
2020
"static/media/image-23.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-23.ff2f5e9e82db160c5125.jpg",
2121
"static/media/image-28.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-28.7d28d711f17a968c24be.jpg",
22-
"static/media/image-3.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-3.001b2aa6575734faf97f.jpg",
23-
"static/media/image-6.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-6.68804431e1fb3e74c03c.jpg",
22+
"static/media/image-3.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-3.4d41a1a54e4bc0df8a7f.jpg",
23+
"static/media/image-6.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-6.16f019470c35f6a35e32.jpg",
2424
"static/media/image-26.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-26.afc90a857b70c3abb925.jpg",
2525
"static/media/image-31.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-31.a7f8f6349d0b533d0222.jpg",
2626
"static/media/image-40.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-40.edd0c17faa58d5300cbf.jpg",
@@ -30,22 +30,21 @@
3030
"static/media/image-41.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-41.ab74b0216df49b4f4cb5.jpg",
3131
"static/media/image-22.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-22.50386a9f5e642121f0c1.jpg",
3232
"static/media/image-49.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-49.3039cfee99162d4fc34b.jpg",
33-
"static/media/image-7.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-7.f0890ea3e97d083f9c3b.jpg",
33+
"static/media/image-7.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-7.b71b22ea52ec87ff58d5.jpg",
3434
"static/media/image-19.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-19.30999ef56331d888bb66.jpg",
3535
"static/media/image-20.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-20.32d3c089fa3aba60c0ba.jpg",
36-
"static/media/image-1.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-1.2cc79ed61b259ebebebe.jpg",
36+
"static/media/image-1.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-1.f8445f6e82d6b3eec2fe.jpg",
3737
"static/media/image-21.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-21.8a6cf99e1b155793b483.jpg",
3838
"static/media/image-42.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-42.ce8803e45d2b75b5d85f.jpg",
3939
"static/media/image-11.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-11.74fab22c3357eecaa375.jpg",
4040
"static/media/image-33.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-33.89e6d1f28582b8c7c0a8.jpg",
41-
"static/media/image-2.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-2.258ff66410b89ac1953d.jpg",
41+
"static/media/image-2.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-2.50d41315d364fe9cc1c8.jpg",
4242
"static/media/image-9.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-9.6ea6ef9977ae8552ba2f.jpg",
4343
"static/media/image-44.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-44.ba9e6c5023ee74d60077.jpg",
44-
"static/media/image-4.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-4.0bb797d5847b3d3a90db.jpg",
44+
"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.b95e98cf488e5dc132b1.jpg",
46+
"static/media/image-5.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-5.353313c6a76212d31eef.jpg",
4747
"static/media/image-58.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-58.4b88b2e810980391c15c.jpg",
48-
"static/media/image-8.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-8.e491c615c0e21b7007f5.jpg",
4948
"static/media/image-12.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-12.14a50f1f842abb188508.jpg",
5049
"static/media/image-45.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-45.5ca7c25e2ca203ca5516.jpg",
5150
"static/media/image-13.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-13.4ba6f86f4421fd57a49e.jpg",
@@ -68,13 +67,14 @@
6867
"static/media/image-57.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-57.a36228f9c14a96563b05.jpg",
6968
"static/media/image-10.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-10.fcdfd9fbc352940b0d95.jpg",
7069
"static/media/image-16.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-16.8583b0dd5e9bb251fc9c.jpg",
70+
"static/media/image-8.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-8.e491c615c0e21b7007f5.jpg",
7171
"index.html": "https://seresl.unl.edu/webcamstudy/index.html",
7272
"main.3de88975.css.map": "https://seresl.unl.edu/webcamstudy/static/css/main.3de88975.css.map",
73-
"main.a12b748b.js.map": "https://seresl.unl.edu/webcamstudy/static/js/main.a12b748b.js.map",
73+
"main.d471531e.js.map": "https://seresl.unl.edu/webcamstudy/static/js/main.d471531e.js.map",
7474
"453.e44939a0.chunk.js.map": "https://seresl.unl.edu/webcamstudy/static/js/453.e44939a0.chunk.js.map"
7575
},
7676
"entrypoints": [
7777
"static/css/main.3de88975.css",
78-
"static/js/main.a12b748b.js"
78+
"static/js/main.d471531e.js"
7979
]
8080
}

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.a12b748b.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";window.addEventListener("DOMContentLoaded",()=>{new EmbeddedPageSdk(!1,null,!1)})</script><script defer="defer" src="https://seresl.unl.edu/webcamstudy/static/js/main.d471531e.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/src/App.jsx

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

44
// Import task components
@@ -51,7 +51,7 @@ function App() {
5151
setCurrentTask((prev) => prev + 1);
5252
};
5353

54-
const downloadAllData = () => {
54+
const downloadAllData = useCallback(() => {
5555
// Create the JSON structure
5656
const jsonData = {
5757
id: parseInt(studyData.consent?.id) || 0,
@@ -124,7 +124,14 @@ function App() {
124124
document.body.appendChild(link);
125125
link.click();
126126
document.body.removeChild(link);
127-
};
127+
}, [studyData]);
128+
129+
// Auto-download data when all tasks are completed
130+
useEffect(() => {
131+
if (currentTask >= taskFiles.length && taskFiles.length > 0) {
132+
downloadAllData();
133+
}
134+
}, [currentTask, taskFiles.length, downloadAllData]);
128135

129136
// Helper function to determine text task correctness
130137
const determineTextCorrectness = (answer) => {
@@ -163,9 +170,7 @@ function App() {
163170
return (
164171
<div style={styles.completionContainer}>
165172
<h2>All tasks completed!</h2>
166-
<button onClick={downloadAllData} style={styles.downloadButton}>
167-
Download Results
168-
</button>
173+
<p>Your results have been automatically downloaded.</p>
169174
</div>
170175
);
171176
}
@@ -232,9 +237,8 @@ const styles = {
232237
},
233238
buttonContainer: {
234239
position: 'fixed',
235-
bottom: '30px',
236-
left: '50%',
237-
transform: 'translateX(-50%)',
240+
bottom: '-30px',
241+
right: '30px',
238242
zIndex: 1000,
239243
},
240244
nextButton: {
@@ -256,15 +260,6 @@ const styles = {
256260
height: '100vh',
257261
gap: '20px',
258262
},
259-
downloadButton: {
260-
padding: '15px 30px',
261-
fontSize: '18px',
262-
backgroundColor: '#27ae60',
263-
color: 'white',
264-
border: 'none',
265-
borderRadius: '5px',
266-
cursor: 'pointer',
267-
},
268263
};
269264

270265
export default App;
-1.02 MB
Binary file not shown.
219 KB
-1000 KB
Binary file not shown.
-998 KB
Binary file not shown.
-1010 KB
Binary file not shown.
-1.01 MB
Binary file not shown.
-1.21 MB
Binary file not shown.

0 commit comments

Comments
 (0)