This repository has been archived by the owner on Feb 24, 2022. It is now read-only.
[WIP] Generate playtest data collection add-on #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #11, closes #12, closes #13, closes #28, closes #27, closes #26
Remaining tasks:
app.config.js
has only the modules we're using (specifically RS01)This PR overhauls the playtest – there's a lot here. It basically became a framework that has solutions for the various dev challenges I've encountered making my own study pototypes.
The idea: create a framework that makes it much easier to collect data through small, easy-to-use modules for playtesting. A module defines a.) a collector (a content script that collects the data), b.) a reporter (a background script that exposes the collection as it happens to the main backgorund script), and c.) a config entry that defines which modules will be active for this build. The config file that defines these things gets rolled up and outputs a functioning study that collects data and stoers it in a namespaced IndexedDB table, which you can manage in the options page. See bottom of this comment for a screenshot of the page.
More information about the components:
Collector
class makes it easy to hook into thePageManager
events and respond accordingly. It also has a basic state management method that is more functional, leveraging immer.js'sproduce
function to create new proxied deep copies of the state.addListener
function. TheReporter
class makes it easy to pair with a collector & define the schema, but it is not strictly necessary to even use the class.*.collector.js
and*.reporter.js
if these scripts exist) and handles all the rollup stuff needed to turn the modules * config into a working playtest study.This framework should enable us to flexibly try out new data collection modules pretty quickly.