-
-
Notifications
You must be signed in to change notification settings - Fork 668
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
Replace uses of Array.from() for Qualtrics compatibility #3368
Conversation
🦋 Changeset detectedLatest commit: 4b080ca The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
Thanks @Max-Lovell ! The sketchpad bug is weird, but definitely there. I'm not sure why that broke. I'd like to fix that and include the change to Array.from in this PR. Hopefully tomorrow. |
Sounds good @jodeleeuw, thanks! |
All set! Hopefully 8.0.2 works on Qualtrics now |
BTW @Max-Lovell if you are interested in contributing a documentation page that briefly covered Qualtrics integration that would be most welcome 😁 |
Thanks Josh!! switched header to:
and all is working: https://universityofsussex.eu.qualtrics.com/jfe/form/SV_9LkywyYb3mtbtgq. Great to get that finally working, thanks for the help. Will write up some documentation when I'm back from AL in 2 weeks! |
Qualtrics have overwritten/incorrectly polyfilled
Array.from()
such that it doesn't work, and so neither does jsPsych when run directly in Qualtrics. This PR then replaces uses ofArray.from()
in jsPsych with equivalent functions. So far, a wrapped spread operator[...array]
is used in the KeyboardResponseAPI, andArray.prototype.slice.call()
in themaxdiff
andfree-sort
plugins.There's also a single
Array.from()
call inpackages/plugin-sketchpad/src/index.ts
, although I can't get this to run on my own fork even in the original version outside of Qualtrics. It also features heavily in the webgazer examples and demos.Probably worth considering this doesn't do much for any extension, anything in contrib, or Survey-js etc, so Qualtrics compatibility isn't guaranteed, but atleast the core library can be used without dealing with an extra hosting site.
Follows from #3347.