jsPsych icon indicating copy to clipboard operation
jsPsych copied to clipboard

Modified Visual Search Circle Plugin

Open keshavpabbi opened this issue 4 years ago • 13 comments

I have replaced the visual-search-circle plugin with a modified version of the plugin called visual-search. This plugin allows experimenters to run a visual search experiment with images placed on a grid if they choose not to use the circle format. I have also added a jitter parameter that can be used by experimenters.

(jitter_ratio and usegrid are the 2 parameters I have added to the visual-search plugin)

keshavpabbi avatar Jun 30 '21 16:06 keshavpabbi

Thanks @keshavpabbi !

Would you be willing to modify the corresponding pages in /docs as part of the PR?

jodeleeuw avatar Jun 30 '21 17:06 jodeleeuw

Thanks @keshavpabbi !

Would you be willing to modify the corresponding pages in /docs as part of the PR?

keshavpabbi avatar Jul 02 '21 17:07 keshavpabbi

Thanks @keshavpabbi ! Would you be willing to modify the corresponding pages in /docs as part of the PR?

Sure! Is there anything specific I should modify in the docs folder? Also I closed this by accident. Do I have to submit another pull request?

keshavpabbi avatar Jul 02 '21 17:07 keshavpabbi

Hi @keshavpabbi, I just re-opened this 😃

I think the documentation pages that need editing are:

  • docs/plugins/list-of-plugins.md

    • change plugin name in the list
  • docs/plugins/jspsych-visual-search-circle.md

    • rename the file
    • add your new parameters to the parameters table (along with their defaults, descriptions etc.), and change the default value for the circle diameter
    • update the Examples section

I had a quick look at your changes to the plugin file and didn't notice any other changes to how the plugin works. But if you made any other changes then please mention those on the docs page as well.

Another thing to note is that we're currently making changes to the Examples sections in the documentation pages anyway, which you can read about here: #1923 and here: #164. So if you want to incorporate these changes to the visual search documentation page too, then that would be great, but no problem if not!

Thanks!!

becky-gilbert avatar Jul 02 '21 17:07 becky-gilbert

Hi @keshavpabbi, thanks very much for editing the documentation pages! I'll just test the way your updated version of this plugin works. If I have any questions or issues, I'll let you know, otherwise this looks ready to merge 👍

becky-gilbert avatar Jul 07 '21 00:07 becky-gilbert

And don't worry about the failing Jest test. If you want to, then feel free to fix whatever test is failing and include any plugin or test file modifications in this PR. But if you don't want to or aren't sure how then I can do it.

becky-gilbert avatar Jul 07 '21 00:07 becky-gilbert

Ah, I just checked the Jest test errors and it looks like an easy fix: the old plugin name is used in the file "tests/plugins/plugin-visual-search-circle.test.js". So I'm guessing the tests will pass when this is changed. Again, feel free to change it and include it in this PR, otherwise I can do it :smiley:

becky-gilbert avatar Jul 07 '21 00:07 becky-gilbert

Ah, I just checked the Jest test errors and it looks like an easy fix: the old plugin name is used in the file "tests/plugins/plugin-visual-search-circle.test.js". So I'm guessing the tests will pass when this is changed. Again, feel free to change it and include it in this PR, otherwise I can do it 😃

So just to confirm, am I supposed to change the name of the js file?

keshavpabbi avatar Jul 07 '21 03:07 keshavpabbi

Sorry for not being clear. The name of the file does need to be changed, but the error is actually caused by references to the old plugin name inside of that file. Let me know if you have any other questions or if you'd like me to help out with these final changes. Thank you!

becky-gilbert avatar Jul 07 '21 04:07 becky-gilbert

Sorry for not being clear. The name of the file does need to be changed, but the error is actually caused by references to the old plugin name inside of that file. Let me know if you have any other questions or if you'd like me to help out with these final changes. Thank you!

Alright so I changed the name of the file and wherever it said "visual-search-circle" in the code, I replaced it with "visual-search". Is there anything else I should fix?

keshavpabbi avatar Jul 07 '21 21:07 keshavpabbi

Yep that's perfect, thanks!

Note that this is marked for the 7.1 release. Right now we're working some other changes for the next release (7.0), and then we'll switch to 7.1, which will be focused on adding and improving plugins. So this pull request will be merged sometime after we've finished 7.0, which I'm guessing will be in about a month.

becky-gilbert avatar Jul 07 '21 22:07 becky-gilbert

Yep that's perfect, thanks!

Note that this is marked for the 7.1 release. Right now we're working some other changes for the next release (7.0), and then we'll switch to 7.1, which will be focused on adding and improving plugins. So this pull request will be merged sometime after we've finished 7.0, which I'm guessing will be in about a month.

Sounds good Becky!

keshavpabbi avatar Jul 08 '21 01:07 keshavpabbi

Hi @keshavpabbi,

We created a new community contributions repository that would be a great immediate home for this plugin. We'll definitely keep this on the agenda for merging in the long term, but we have some other priorities so it'll be a few months at least.

jodeleeuw avatar Oct 05 '21 15:10 jodeleeuw