Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jabeim opened this issue Aug 21, 2024 · 9 comments · Fixed by #3426

Comments

@jabeim
Copy link

jabeim commented Aug 21, 2024

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?

    @jodeleeuw
    Copy link
    Member

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

    @kennysmithed
    Copy link

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

    @alisdt
    Copy link
    Contributor

    alisdt commented Oct 29, 2024

    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!

    @bjoluc
    Copy link
    Member

    bjoluc commented Oct 30, 2024

    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 🤞

    @bjoluc
    Copy link
    Member

    bjoluc commented Nov 3, 2024

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

    @jodeleeuw
    Copy link
    Member

    Yes we can handle it. Thank you!

    @jodeleeuw
    Copy link
    Member

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

    @kennysmithed
    Copy link

    Thanks for this folks, really appreciate it!

    @jodeleeuw
    Copy link
    Member

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

    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 a pull request may close this issue.

    5 participants