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

Adjust progress bar for various pages of survey plugin #3381

Open
DominiqueMakowski opened this issue Aug 23, 2024 · 6 comments
Open

Adjust progress bar for various pages of survey plugin #3381

DominiqueMakowski opened this issue Aug 23, 2024 · 6 comments

Comments

@DominiqueMakowski
Copy link

V8 brought a more granular update of the progress bar, able to change for each stimulus. That's great, and I was wondering whether it was possible to integrate it more closely with the survey plugin, and to adjust the progress bar for each "page" of a survey.

Thanks

@jodeleeuw
Copy link
Member

@becky-gilbert maybe you have thoughts on how this might be best accomplished?

@becky-gilbert
Copy link
Collaborator

@DominiqueMakowski sorry that I hadn't already thought to test this! Would it work to update the progress bar manually (using jsPsych.setProgressBar)? If so I can provide an example of how to do this (I should add this to the docs anyway!).

Or are you and/or @jodeleeuw asking how to get jsPsych's automatic progress bar to update with the survey pages?

@DominiqueMakowski
Copy link
Author

The latter, I reckon a control of the JsPsych's progress bar should be automatically enabled :)

@jodeleeuw
Copy link
Member

Given the way that the progress bar is currently implemented that would be a big overhaul. I agree that it would be nice, just want to be realistic about the chances of it happening soon 😁

@DominiqueMakowski
Copy link
Author

No worries, but note that I think surveyJS has some callback method to get the current "page" so maybe just pulling this info would be sufficient to get the current progress within the survey, and then adjusting for the global progress

@jodeleeuw
Copy link
Member

Yeah, I think the issue is that we would have to somehow parse the number of pages when figuring out how many units there are in the overall progress bar. Right now we do a crude count of the number of trials.

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

No branches or pull requests

3 participants