Skip to content

Commit

Permalink
WIP for discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
kieftrav committed Nov 18, 2024
1 parent 2d8c929 commit c670a27
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ function Task ({
task,
...props
}) {
// Delilah: This is where the TaskComponent+TaskModel+AnnotationModel gets imported
// If I piggyback on the barrel export this is where it shows up
const TaskPlugin = task.type === 'dropdown-simple'? tasks.dropdownSimple : tasks[task.type]
const TaskComponent = TaskPlugin?.TaskComponent
let annotation
Expand Down
2 changes: 2 additions & 0 deletions packages/lib-classifier/src/plugins/tasks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ export { default as text } from './text'
export { default as highlighter } from './experimental/highlighter'
export { default as textFromSubject } from './experimental/textFromSubject'
export { default as transcription } from './experimental/transcription'

// Delilah: Import VV Tool Component here as barrel import from lib-subject-viewers?
1 change: 1 addition & 0 deletions packages/lib-classifier/src/plugins/tasks/single/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { default as TaskComponent } from './components/SingleChoiceTask'
import { default as TaskModel } from './models/SingleChoiceTask'
import { default as AnnotationModel } from './models/SingleChoiceAnnotation'

// Delilah: This is the interface that should be implemented in lib-subject-viewers, right?
export default {
TaskComponent,
TaskModel,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { types } from 'mobx-state-tree'
import Annotation from '../../models/Annotation'

// Delilah: Where should this live for VV?
// Depends on MobX so if it should live in lib-subject-viewers we'll need to add MobX as a dependency there
// I can use this as the model that gets imported

const SingleChoice = types.model('SingleChoice', {
taskType: types.literal('single'),
value: types.maybeNull(types.number)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { types } from 'mobx-state-tree'
import Task from '../../models/Task'
import SingleChoiceAnnotation from './SingleChoiceAnnotation'

// Delilah: Where should this live for VV?
// TODO: should we make question/instruction consistent between task types?
// What should be it called? I think we should use 'instruction'

Expand Down

0 comments on commit c670a27

Please sign in to comment.