[jspsych.org v8 docs] Deprecated function jsPsych.addNodeToEndOfTimeline() listed in the reference
The website lists addNodeToEndOfTimeline as jspsych method to add new timeline nodes to the end of a running timeline. This function appears to have been deprecated in v8 (but its removal is not listed in the v8 release notes).
I noticed this because a v7 experiment that was working stopped after updating to v8 with an error that addNodeToEndOfTimeline is not a function.
If its removal is intended the website v8 docs should be updated to remove references to it or state that its deprecated.
Related to this discrepancy: Is there an alternative method to add additional trials to the experiment dynamically now that this function is removed?
@bjoluc I know we talked about this functionality. Can you remind me what the way to do it in v8 is?
@jodeleeuw @bjoluc Wanted to re-up this, I was planning to use this for my class in a couple of weeks (updating a working experiment to v8: https://kennysmithed.github.io/oels2022/oels_practical_wk10.html, building the timeline dynamically is crucial).
I'm working on this too. Things I've tried that I didn't expect to work:
- treating timeline as a dynamic parameter
- getTimeline().push(new_thing)
Thing I've yet to try that might work:
- construct new Timeline() object and run in manually in on_finish from the last trial (no reason why it shouldn't work, but seems messy)
All suggestions welcome!
I think we ultimately wanted to allow pushing trials/timelines to timeline definitions at runtime for this. I forgot to add the omission to the changeset when implementing the new core back then – sorry! I'll have a look at this at the weekend and hopefully solve it :crossed_fingers:
#3426 allows pushing trials to timelines at run time. Only that it's not yet documented and obviously the jsPsych.addNodeToEndOfTimeline() docs need to be fixed (ideally also the v8 mirgation guide). @jodeleeuw Any chance you (or any of the hired folks) could finish this off and release it before @kennysmithed needs it?
Yes we can handle it. Thank you!
@jadeddelta or @cchang-vassar do you want to take this one as a high priority task?
Thanks for this folks, really appreciate it!
@kennysmithed this is now fixed in v8.1, which will be released within the next 30 min - hope it is in time for your needs!