jsPsych icon indicating copy to clipboard operation
jsPsych copied to clipboard

[jspsych.org v8 docs] Deprecated function jsPsych.addNodeToEndOfTimeline() listed in the reference

Open jabeim opened this issue 1 year ago • 1 comments

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.

Details

  • addNodeToEndOfTimeline in v7.3.4
  • no such method in v8.0.2
  • 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?

    jabeim avatar Aug 21 '24 18:08 jabeim

    @bjoluc I know we talked about this functionality. Can you remind me what the way to do it in v8 is?

    jodeleeuw avatar Aug 25 '24 15:08 jodeleeuw

    @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).

    kennysmithed avatar Oct 25 '24 13:10 kennysmithed

    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!

    alisdt avatar Oct 29 '24 10:10 alisdt

    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:

    bjoluc avatar Oct 30 '24 18:10 bjoluc

    #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?

    bjoluc avatar Nov 03 '24 18:11 bjoluc

    Yes we can handle it. Thank you!

    jodeleeuw avatar Nov 03 '24 18:11 jodeleeuw

    @jadeddelta or @cchang-vassar do you want to take this one as a high priority task?

    jodeleeuw avatar Nov 04 '24 01:11 jodeleeuw

    Thanks for this folks, really appreciate it!

    kennysmithed avatar Nov 04 '24 08:11 kennysmithed

    @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!

    jodeleeuw avatar Nov 20 '24 18:11 jodeleeuw