Skip to content

Conversation

LoicGrobol
Copy link

This means to add a jsPsych plugin for running Maze (Forster et al., 2009) experiments, a version of self-paced
reading that asks to chose between the correct next word and a distractor. I have put together a small demo.

This is currently in a functional state, with very basic tests that check loading and running through one trial (but are by no mean exhaustive). I would love to get this included and I'm willing to keep maintaining it for the foreseeable future. Please tell me if there's anything that needs doing :-)

  • Forster, Kenneth I., Christine Guerrera, and Lisa Elliot. 2009. ‘The Maze Task: Measuring Forced Incremental Sentence Processing Time’. Behavior Research Methods 41 (1): 163–71. https://doi.org/10.3758/BRM.41.1.163.

Copy link

changeset-bot bot commented Jun 17, 2025

⚠️ No Changeset found

Latest commit: e2aaeb1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@jodeleeuw jodeleeuw requested a review from jadeddelta June 17, 2025 12:24
Copy link
Contributor

@jadeddelta jadeddelta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, thanks for the contribution! really appreciate it, though i do have two structural questions:

  • plugins should try to be as atomic as possible, completing one task- so i'm wondering if it's worth keeping the comprehension question parameter and functionality, instead opting for something like having a plugin-html-button-response or plugin-html-keyboard-response that the developer can use instead of being forced to use this (can also make it clear to use comprehension examples via the example)

  • is canvas the best solution for this? i only bring this up as i'm personally working on a new version of a self-paced reading plugin (#145) that uses the DOM and placing the words via paragraph elements without using a canvas. it allows for developers to use CSS to style the text themselves, along with being very supportive of multiple browser sizes (and mobile) without having to change canvas parameters. would it be possible to bring that to this plugin? or rather- if we want to keep this implementation, we could have an plugin-canvas-maze and an plugin-html-maze as well? just wondering your thoughts, and if you have any thoughts @jodeleeuw as well?

@LoicGrobol
Copy link
Author

Thanks for the quick review!

* plugins should try to be as atomic as possible, completing one task- so i'm wondering if it's worth keeping the comprehension `question` parameter and functionality, instead opting for something like having a `plugin-html-button-response` or `plugin-html-keyboard-response` that the developer can use instead of being forced to use this (can also make it clear to use comprehension examples via the example)

So that's one thought I had, in the end I chose to still have an integrated facility for the questions, my rationale being that it makes it a lot easier to have consistent style and placement, and if the developer wants to use something else, they can leave the question undefined in maze and handle it separately. So mostly the idea is quality of life, but I'm of course very open to remove it :-)

* is canvas the best solution for this? i only bring this up as i'm personally working on a new version of a self-paced reading plugin ([Addition of a self-paced reading plugin #145](https://github.com/jspsych/jspsych-contrib/pull/145)) that uses the DOM and placing the words via paragraph elements without using a canvas. it allows for developers to use CSS to style the text themselves, along with being very supportive of multiple browser sizes (and mobile) without having to change canvas parameters. would it be possible to bring that to this plugin? or rather- if we want to keep this implementation, we could have an `plugin-canvas-maze` and an `plugin-html-maze` as well? just wondering your thoughts, and if you have any thoughts @jodeleeuw as well?

Oh good points! I took the canvas idea from the current SPR, assuming that the choice was maybe for reactivity and precise positioning, but now that I think of it, it makes sense to me to change to DOM, so yes, I'll do that.

So. Back to the coding board I go!

@jadeddelta
Copy link
Contributor

awesome! thank you, and feel free to use details from my implementation in that PR that i mentioned (it's under SPR mode 3)

and as for the question parameter, i do think that overall, especially since we're moving towards the DOM as a way of displaying (and will take advantage of jsPsych's CSS), consistent style will be enforced regardless, so i think that just letting the developer choose html-keyboard-response (and including an instance of one in the example as a comprehension) would be great!

@LoicGrobol
Copy link
Author

Noted! I'll be pushing some extra changes to tweak the functionalities as we are dogfooding the canvas version to make sure we get the interface just right, but the switch to DOM is underway in parallel, I'll ping you with a review request once it's done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants