phetsims / projectile-data-lab

"Projectile Data Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 0 forks source link

CODAP wrapper: Environment should be save/loadable in CODAP file #232

Closed matthew-blackman closed 3 months ago

matthew-blackman commented 5 months ago

Note: We would also like to save/load the simulation state if possible.

samreid commented 5 months ago

Perhaps the documentation at https://github.com/concord-consortium/codap/wiki/CODAP-Data-Interactive-Plugin-API#interactivestate will help

samreid commented 5 months ago

There is a project at https://github.com/concord-consortium/codap-plugin-api that looks like it provides support for saving/loading the state and configuration. I looked to see if we could adapt its pattern in our existing wrapper, but it was unclear. We could try porting our wrapper to use that plugin-api and see if it helps.

samreid commented 5 months ago

I tried building and adding references to the codap-plugin-api and ran into several problems:

Could not get things working and I'm not sure whether this is a good idea.

samreid commented 4 months ago

@matthew-blackman and I got this working yesterday. I improved the state handling logic and committed a working version. This should be reviewed and tested, and we will need to know whether to implement this for the tool data wrapper as well.

matthew-blackman commented 3 months ago

@catherinecarter @samreid and I reviewed this and everything is working well in our testing. The save/load, copy and 'shared view' features are all supported by the wrapper. This includes the simulation state, the checkboxes and the CODAP data. Closing.