Feedback
Feedback
The different types of feedback can be found in FeedbackCriterion
. quality
& difficulty
are displayed as stars from 1-5, timeToSolve
as number input. forkThumb
indicates whether a user finds the new version of a question better than the old one. guideline
stands for the answer whether a guideline has been met. questionTags
are (currently) question types such as factoid
, case study
. reply
is the answer of the user. fromAuthor
indicates whether the feedback is from the question creator.
type FeedbackCriterion =
| 'quality'
| 'difficulty'
| 'timeToSolve'
| 'forkThumb'
| 'guideline'
| 'questionTags'
| string
interface Feedback {
id: string
criterion: FeedbackCriterion
questionId: string
userId: string
reply?: any
fromAuthor?: boolean
createdAt: any
details?: FeedbackDetails
}
Definition of FeedbackDetails
:
type FeedbackDetails = GuidelineFeedbackDetails
interface GuidelineFeedbackDetails {
guidelineId: string
}
Special feedback cases:
interface GuidelineFeedback extends Feedback {
criterion: 'guideline'
details: GuidelineFeedbackDetails
}
interface QuestionTagsFeedback extends Feedback {
criterion: 'questionTags'
reply: QuestionTagsFeedbackReply
}
interface QuestionTagsFeedbackReply {
questionTagIdsSelected: string[]
questionTagIdsChecked: string[]
questionTagKeysSelected: string[]
questionTagKeysChecked: string[]
}