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

Added extension version and type to ExtensionManager.ts #3352

Merged
merged 7 commits into from
Jul 18, 2024

Conversation

Bankminer78
Copy link
Contributor

@Bankminer78 Bankminer78 commented Jul 18, 2024

This PR gives JsPsych the general functionality of adding an extension's version and type to the data it generates in a trial data object. It does so by drawing the name and version from the info property of an extension's class. This PR also reverts changes made to extensions to return version and type as extra data fields. All extensions with a complete info property will now experience the benefit of their version and type being appended to their data by JsPsych.

Copy link

changeset-bot bot commented Jul 18, 2024

🦋 Changeset detected

Latest commit: 054ba1b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
jspsych Patch
@jspsych/extension-mouse-tracking Minor
@jspsych/extension-record-video Minor
@jspsych/extension-webgazer Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -58,10 +58,18 @@ class RecordVideoExtension implements JsPsychExtension {

if (!this.currentTrialData.record_video_data) {
this.onUpdateCallback = () => {
resolve(this.currentTrialData);
resolve({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm - shouldn't we be able to add this in the core library so each extension doesn't need to do it manually?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! This has been changed.

@Bankminer78 Bankminer78 changed the title Added extension version and type to record-video Added extension version and type to ExtensionManager.ts Jul 18, 2024
@jodeleeuw jodeleeuw merged commit 9ea0592 into jspsych:main Jul 18, 2024
2 checks passed
@github-actions github-actions bot mentioned this pull request Jul 18, 2024
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 this pull request may close these issues.

2 participants