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

Add a custom question type #377

Open
wyattis opened this issue Jun 16, 2021 · 0 comments
Open

Add a custom question type #377

wyattis opened this issue Jun 16, 2021 · 0 comments
Labels
enhancement New feature or request feature request A feature that doesn't exist in Trellis, but is desired

Comments

@wyattis
Copy link
Member

wyattis commented Jun 16, 2021

The custom question should be able to access data in Trellis and return datum that can be inserted into the database. It should be possible to do one-time random sampling when the question comes up and display questions in a customizable way.

Custom question display fits well with #373.

One implementation could involve a question lifecycle with some kind of restricted query access to the database. Perhaps using the following lifecycle events:

onInit (api): Runs before the question is visited for the first time
onVisible (api): Runs every time this question is visible on the page
onLeave (api): Runs every time a user navigates away from the page with this question

The api object would need methods for querying data and storing datum.

@wyattis wyattis added enhancement New feature or request feature request A feature that doesn't exist in Trellis, but is desired labels Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request A feature that doesn't exist in Trellis, but is desired
Projects
None yet
Development

No branches or pull requests

1 participant