-
Notifications
You must be signed in to change notification settings - Fork 1
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
Intro task updates #202
Intro task updates #202
Changes from 3 commits
794bf67
6b0e78d
3564bbb
9f1aa50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,33 +2,39 @@ import jsPsychHTMLMultiResponse from '@jspsych-contrib/plugin-html-multi-respons | |
import { taskStore, PageAudioHandler } from '../helpers'; | ||
import { mediaAssets } from '../../..'; | ||
|
||
export const taskFinished = { | ||
type: jsPsychHTMLMultiResponse, | ||
data: () => { | ||
return { | ||
// save_trial: true, | ||
assessment_stage: 'instructions', | ||
}; | ||
}, | ||
stimulus: () => { | ||
const t = taskStore().translations; | ||
return ` | ||
<div class='lev-stimulus-container'> | ||
<div class='lev-row-container instruction'> | ||
<h1>${t.taskFinished}</h1> | ||
</div> | ||
<footer>${t.generalFooter}</footer> | ||
</div>`; | ||
}, | ||
button_choices: [`Continue`], | ||
keyboard_choices: 'ALL_KEYS', | ||
button_html: '<button class="primary" style=margin-top:10%>Exit</button>', | ||
on_load: () => { | ||
if (mediaAssets.audio.taskFinished) { | ||
PageAudioHandler.playAudio(mediaAssets.audio.taskFinished) | ||
export const taskFinished = (intro = false) => { | ||
return { | ||
type: jsPsychHTMLMultiResponse, | ||
data: () => { | ||
return { | ||
// save_trial: true, | ||
assessment_stage: 'instructions', | ||
}; | ||
}, | ||
stimulus: () => { | ||
const t = taskStore().translations; | ||
const endMessage = intro ? 'introFinished' : 'taskFinished'; | ||
|
||
return ` | ||
<div class='lev-stimulus-container'> | ||
<div class='lev-row-container instruction'> | ||
<h1>${t[endMessage]}</h1> | ||
</div> | ||
<footer>${t.generalFooter}</footer> | ||
</div>`; | ||
}, | ||
button_choices: [`Continue`], | ||
keyboard_choices: 'ALL_KEYS', | ||
button_html: '<button class="primary" style=margin-top:10%>Exit</button>', | ||
on_load: () => { | ||
const endMessage = intro ? 'introFinished' : 'taskFinished'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we rename the mediaAsset to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense. I guess when we pull them both in the common folder that we have been talking about, both can exist. So a config param makes sense. I am wondering though for future proofing should we pass the asset name as the parameter to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense, I switched it so that we now pass in the asset name. |
||
|
||
if (mediaAssets.audio[endMessage]) { | ||
PageAudioHandler.playAudio(mediaAssets.audio[endMessage]) | ||
} | ||
} | ||
// trial_duration: 1000, | ||
} | ||
// trial_duration: 1000, | ||
}; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if these went into the class definitions. You can add a new definition of font size called:
font-size-xs-em: 1.5em
and then update the:Does the width need to be 90vw? or should the max-width be 90vw? We want consistent experience so we will need to just make sure it looks good across different tasks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense, I'll work on adding it to the class definition. I think setting max-width to 90vw would probably be better, so I'll try that - thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up making an
instructions-small
class with the font size and max-width changes and using that for intro - I thought making the font smaller for all tasks didn't look as good. Let me know if you would prefer a different design though!