Skip to main content
Version: v2.2.0

UIConfig

Defined in: parser/types.ts:141

The UIConfig is used to configure the UI of the app. This includes the logo, contact email, and whether to show a progress bar. The UIConfig is also used to configure the sidebar, which can be used to display the task instructions and capture responses. Below is an example of how the UI Config would look in your study configuration (note, there are optional fields that are not shown here):

uiConfig:{
"contactEmail": "contact@revisit.dev",
"helpTextPath": "<study-name>/assets/help.md",
"logoPath": "<study-name>/assets/logo.jpg",
"withProgressBar": true,
"autoDownloadStudy": true
"autoDownloadTime": 5000,
"studyEndMsg": "Thank you for completing this study. You're the best!",
"withSidebar": true,
"windowEventDebounceTime": 500,
"urlParticipantIdParam": "PROLIFIC_ID",
"numSequences": 500
}

In the above, the <study-name>/assets/ path is referring to the path to your individual study assets. It is common practice to have your study directory contain an assets directory where all components and images relevant to your study reside. Note that this path is relative to the public folder of the repository - as is all other paths you define in reVISit (aside from React components whose paths are relative to src/public.)

Properties

PropertyTypeDescriptionDefined in
allowFailedTraining?booleanControls whether the component should allow failed training. Defaults to true.parser/types.ts:182
autoDownloadStudy?booleanControls whether the study data is automatically downloaded at the end of the study.parser/types.ts:198
autoDownloadTime?numberThe time in milliseconds to wait before automatically downloading the study data.parser/types.ts:200
contactEmailstringThe email address that used during the study if a participant clicks contact.parser/types.ts:146
enumerateQuestions?booleanWhether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar.parser/types.ts:190
helpTextPath?stringThe path to the help text file. This is displayed when a participant clicks help. Markdown is supported.parser/types.ts:162
instructionLocation?ConfigResponseBlockLocationThe location of the instructions.parser/types.ts:160
logoPathstringThe path to the logo image. This is displayed on the landing page and the header.parser/types.ts:144
minHeightSize?numberThe minimum screen height size for the studyparser/types.ts:210
minWidthSize?numberThe minimum screen width size for the studyparser/types.ts:208
nextButtonDisableTime?numberThe time in milliseconds to wait before the next button is disabled.parser/types.ts:172
nextButtonEnableTime?numberThe time in milliseconds to wait before the next button is enabled.parser/types.ts:170
nextButtonLocation?ConfigResponseBlockLocationThe location of the next button.parser/types.ts:168
nextButtonText?stringThe text to display on the next button.parser/types.ts:166
nextOnEnter?booleanWhether enter key should move to the next question. Defaults to false.parser/types.ts:164
numSequences?numberThe number of sequences to generate for the study. This is used to generate the random sequences for the study. Defaults to 1000.parser/types.ts:202
participantNameField?stringThe default name field for a participant. Directs revisit to use the task and response id as a name in UI elements. For example, if you wanted the response 'prolificId' from the task 'introduction' to be the name, this field would be 'introduction.prolificId'parser/types.ts:206
previousButtonText?stringThe text that is displayed on the previous button.parser/types.ts:174
provideFeedback?booleanControls whether the component should provide feedback to the participant, such as in a training trial. Defaults to false.parser/types.ts:178
recordAudio?booleanWhether or not we want to utilize think-aloud features. If true, will record audio on all components unless deactivated on individual components. Defaults to false.parser/types.ts:184
recordScreen?booleanWhether or not we want to utilize screen recording feature. If true, will record audio on all components unless deactivated on individual components. This must be set to true if you want to record audio on any component in your study. Defaults to false. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before any component that you want to record the screen on to ensure permissions are granted and screen capture has started.parser/types.ts:186
recordScreenFPS?numberDesired fps for recording screen. If possible, this value will be used, but if it's not possible, the user agent will use the closest possible match.parser/types.ts:188
responseDividers?booleanWhether to show the response dividers. Defaults to false.parser/types.ts:192
showTitle?booleanControls whether the title should be hidden in the study.parser/types.ts:156
showTitleBar?booleanControls whether the title bar should be hidden in the study.parser/types.ts:158
sidebarWidth?numberThe width of the left sidebar. Defaults to 300.parser/types.ts:154
studyEndMsg?stringThe message to display when the study ends.parser/types.ts:196
stylesheetPath?stringThe path to the external stylesheet file.parser/types.ts:212
timeoutReject?booleanWhether to redirect a timed out participant to a rejection page. This only works for components where the nextButtonDisableTime field is set.parser/types.ts:176
trainingAttempts?numberThe number of training attempts allowed for the component. The next button will be disabled until either the correct answer is given or the number of attempts is reached. When the number of attempts is reached, if the answer is incorrect still, the correct value will be shown to the participant. The default value is 2. Providing a value of -1 will allow infinite attempts and the participant must enter the correct answer to continue, and reVISit will not show the correct answer to the user.parser/types.ts:180
urlParticipantIdParam?stringIf the participant ID is passed in the URL, this is the name of the querystring parameter that is used to capture the participant ID (e.g. PROLIFIC_ID). This will allow a user to continue a study on different devices and browsers.parser/types.ts:204
windowEventDebounceTime?numberDebounce time in milliseconds for automatically tracked window events. Defaults to 100. E.g 100 here means 1000ms / 100ms = 10 times a second, 200 here means 1000ms / 200ms = 5 times per secondparser/types.ts:194
withProgressBarbooleanControls whether the progress bar is rendered in the study.parser/types.ts:148
withSidebarbooleanControls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question.parser/types.ts:150