github jspsych/jsPsych v6.2.0

latest releases: @jspsych/plugin-visual-search-circle@1.2.1, @jspsych/plugin-visual-search-circle@1.2.0, @jspsych/plugin-webgazer-validate@1.0.3...
3 years ago

Note from @jodeleeuw: 6.2 is our first release that is made possible by support from a grant by Mozilla Open Source Support (MOSS). This award has allowed @becky-gilbert to join the team, and she has been essential to all of the work reflected here. So: thanks Mozilla, and thanks @becky-gilbert!

New Features

  • The instructions plugin now has a page_label parameter that allows you to change the default "Page" text when showing the page number/total. This provides better support for non-English languages. Thanks @GEJ1! (#1081, #1082)
  • By default, the survey-* plugins now turn off the autocomplete/autofill feature, so that participants won't see a list of their previous responses in text entry fields. This feature can be turned back on with the new autocomplete parameter. Thanks @chrisbrickhouse! (#1064, #1073)
  • The survey-html-form plugin now includes the autofocus parameter that allows you to specify the ID of the form field that you want the page to focus on when the trial loads. Thanks @chrisbrickhouse and @grocio! (#1072, #1062, #669, #671)
  • In a survey-likert trial, you can now select a response by clicking on the label text. Thanks @kurokida! (#701)
  • You can now set a minimum valid keyboard response time in your experiment using the new minimum_valid_rt parameter in jsPsych.init. This is useful for automatically ignoring key presses that are unreasonably fast. Thanks @andytwoods! (#1139, #546, #542)
  • All audio-*/video-* plugins now include the response_allowed_while_playing parameter. If false, the participant will not be able to respond until the media has finished playing. Before then, keyboard responses will be ignored, and buttons/sliders will be visible but disabled. (#1137, #1145)
  • New canvas-* plugins allow you to use a function to draw the stimulus on a HTML canvas element, and collect a keyboard, button, or slider response. A canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). Thanks @cjungerius! (#700)
  • New maxdiff plugin displays a set of options to be selected as one of two mutually-exclusive categories, typically 'most' or 'least' on some criteria, e.g. importance, preference, similarity. The same option cannot be selected for both categories simultaneously. Thanks @awhug! (#1136)
  • The free-sort plugin now has new parameters to control: sort area shape (square or circle), initial item positioning (inside or outside the sort area), border/background colors indicating when items are in/out of the area, magnification of items while dragging, and text indicating whether and how many items are left to be placed inside. Thanks @pjkohler! (#1018, #1203)
  • The image-*, animation, and categorize-animation plugins now include a render_on_canvas parameter to fix the problem with brief blank screens (white flashes) between consecutive images/trials in Firefox and Edge. Setting render_on_canvas to true fixes this problem, and setting it to false presents the image(s) in an img element, as before. (#891 #969, #1174)
  • New documentation pages in the Overview section on the jsPsych website: Browser and Device Support and Running Experiments.
  • New 'safe mode' feature automatically prevents CORS errors when running experiments offline (e.g. by double-clicking the HTML file). This can be overridden with the new override_safe_mode parameter in jsPsych.init. For more info about CORS errors and safe mode, see https://www.jspsych.org/overview/running-experiments/#offline.

Changes

  • The *-slider-response plugins now automatically save the stimulus and slider start position in the data, and they return an integer rather than string as the response. Thanks @kupiqu! (#736, #689, #1058).
  • In the *-slider-response plugins, the slider starting value parameter is now called slider_start (for consistency with video-slider-response plugin, where start refers to the video start time). The slider's starting value is now stored in the trial data, which is useful if the researcher is randomizing the slider's starting value. (#1060, #736)
  • When require_movement is true in the *-slider-response plugins, the user will be allowed to continue after clicking on the cursor (rather than having to move the cursor and release it). This makes the sliders more user-friendly, especially when using a discrete/sparse scale, and when the participant wants to respond with the slider's starting position. Thanks @kupiqu! (#696)
  • In the same-different-html and same-different-image plugins, the default values for first_stim_duration and second_stim_duration were changed from 1000 ms to null. This fixes a bug that prevented these parameters from being set to null. Thanks @dschreij! (#755)
  • In all *-button-response plugins, the "button_pressed" data is now saved as an integer rather than a string, which is now consistent with the documentation. Thanks @vijaymarupudi! (#682)
  • By default, the image-*, animation, and categorize-animation plugins now draw the images on a canvas element, to fix a problem with brief blank screens (white flashes) between consecutive images in Firefox and Edge. Setting render_on_canvas to false will present the image(s) in an img element, as in previous versions of these plugins. (#891 #969, #1174)
  • In the video-* plugins, the parameter for specifying the video file(s) is now called stimulus rather than sources, for consistency with other plugins. (#1261, #1171)

Bug Fixes

  • The rdk plugin now appropriately changes the fixation cross color based on the fixation_cross_color parameter. Thanks @cthorey and @lukasshannon! (#643 #1217)
  • Incorrect error message no longer displayed when using jsPsych.randomization.shuffleNoRepeats() (#659)
  • jsPsych.randomization.repeat() now fails gracefully when the items and repetitions parameters are ambiguous. Thanks @hrcn ! (#667)
  • The start and slider_start parameters now work as expected in the video-slider-response plugin. Thanks @vijaymarupudi! (#713, #714)
  • The website's tutorials and the library's example HTML files no longer include the unnecessary closing link tag (</link>) after loading the default CSS file. Thanks @vijaymarupudi! (#721)
  • The labels and radio buttons/checkboxes in survey-multi-choice and survey-multi-select plugins are now properly formatted. Thanks @dillonplunkett! (#676)
  • We've fixed several documentation errors, such as out-of-date parameter names and broken links. Thanks @akochari, @CarolynBuck-Gengler, @dschreij, @alisdt, and @gorkang! (#677, #1096, #827, #755, #668, #1225)
  • The rdk plugin no longer shows scroll bars on the page. Thanks @wsr017 and @vijaymarupudi! (#881, #787)
  • jsPsych.addNodeToEndOfTimeline no longer produces an error when the optional callback function is omitted. Thanks @oliveralonzo, @bjmeagher, and @vijaymarupudi! (#688, #918, #690)
  • Data collection .first and .last functions now handle the case where the n argument is greater than the total number of trials in the collection, and they throw a descriptive error when n is zero or negative. Thanks @aridyckovsky! (#976, #751)
  • The image-button-response and image-keyboard-response plugins now produce a console warning when the trial might be deadlocked because a response does not end the trial (response_ends_trial: false) and no trial duration is set (trial_duration: null). Thanks @chrisbrickhouse and @celstark! (#1014, #1028)
  • Incorrect error message "Uncaught TypeError: Cannot read property 'style' of null at update_loading_progress_bar" no longer displayed when playing HTML5 audio. (#648, #1115)
  • Fixed out-of-date Github URLs in package.json file to improve npm install compatibility. Thanks @aridyckovsky! (#971)
  • Added a more informative error message when the timeline parameter is empty in jsPsych.init() (#853)
  • In the case of a timeline with a loop function nested inside a timeline with timeline variables, the timeline variables can now be referenced inside the loop function. (#664)
  • The serial-response-time-mouse plugin now works properly when a prompt is added to the screen. Thanks @takat0-ch (#840, #837)
  • Fixed a bug where an error was thrown if the Array.prototype had been extended and parameters with COMPLEX types were used in plugins. Thanks @egaudrain! (#989, #990)
  • jsPsych.init() will now delay execution until the document is fully loaded (#948). This fixes an issue where jsPsych would create two sets of <body> tags on the document if none existed in the markup (#316). Thanks @bjoluc!
  • Fixed bug on touchscreen-only devices (phones/tablets) that caused the last button that was touched to remain highlighted on successive *-button-response trials. (#977)
  • The preloading progress bar correctly centers when the experiment_width property is set in jsPsych.init(). (#1160)
  • For all video-* plugins in Firefox, if a non-zero video start time is specified, then the first frame of the video is no longer briefly visible when the trial first loads. (#712, #1162)
  • Fixed alignment problems between slider positions and labels in all *-slider-response plugins. (#1193, #695)
  • In the image-* plugins, the maintain_aspect_ratio parameter now works as intended: when only one image dimension is specified and maintain_aspect_ratio is false, the unspecified dimension will be the image's original dimension, and the image will stretch or compress accordingly. (#1174, #1172)
  • Fixed a bug in video-* plugins that was preventing videos from automatically preloading. Thanks @mgorenstein! (#1171)
  • Fixed a bug in audio-button-response that was producing an "undefined startTime" error. Thanks @esolitos! (#1194)
  • The audio-button-response plugin now calculates RTs based on the WebAudio clock when WebAudio is used, which is consistent with the other audio-* plugins.

Don't miss a new jsPsych release

NewReleases is sending notifications on new releases.