makebrainwaves / BrainWaves

An easy-to-use platform for EEG experimentation in the classroom
MIT License
60 stars 26 forks source link

Prototype of using Markdown for experiment copy #144

Open jdpigeon opened 3 years ago

jdpigeon commented 3 years ago

Hey Teon, take a look at what I've started doing in this PR.

There's a whole lot of busy work to do converting what we have to markdown, but I think it will be good going forward. This will also require big changes in how experiment descriptions are handled in React, but we're planning to do that anyway

teonbrooks commented 3 years ago

cool, so one thing i discovered when cleaning up all of this is that there was a lot of code rot around from the jspsych implementation. i've been trying to parcel out what is needed for lab.js. the notion of timeline that was in the code seems to be primarily a jspsych thing, right? and the params seem to be the important bits for lab.js.

i would be happy to do convert the experiment files to md.

should we map out how we would like the experiment folder to be arranged? should we keep the strings separate than the params and assets or have it as a unit

teonbrooks commented 3 years ago

closes #93

jdpigeon commented 3 years ago

Yes! There's a lot of crufty confusing stuff around because of our two different experiment frameworks.

There's gonna be two steps to reconciling this I see:

  1. Organized all experiment elements into a reasonable structures. This includes images, copy, and lab.js experiment definitions (as json if possible so we can have kids use the builder to design their own).
  2. Update all app logic to understand this new structure and handle it appropriately. This I'll take charge of. It'll basically involve coming up with new variables and epics in Redux in order to read these experiment elements. By just using lab.js and moving more of the complexity of rendering experiment descriptions to Markdown and (potentially) building custom experiments to lab.js and the builder, this should signifcantly simplify things in the app's components.

Re: your suggestion of keeping all experiment elements as a unit. After some thought I think that's the way to go.

Before really diving into this, it's probably worth taking another look at lab.js's json experiment definitions and thinking about how we might want experiment customization to look in the future.

How important is it for us to allow experiment in the short term? How much control do we want to give students in building their own experiments? Would we want to have students use the lab.js builder instead of the BrainWaves app?

jdpigeon commented 3 years ago

Priority is to get the app working ASAP and remove confusing jspsych remnants.

We'll keep the custom builder feature in but convert redux to store complete labjs jsons for easier development of lab.js builder compatibility.