Skip to main content
Version: v1.0.2

UIConfig

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!",
"sidebar": true,
"windowEventDebounceTime": 500,
"urlParticipantIdParam": "PROLIFIC_ID",
"numSequences": 500
}

In the above, the path/to/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

PropertyTypeDescription
autoDownloadStudy?booleanControls whether the study data is automatically downloaded at the end of the study.
autoDownloadTime?numberThe time in milliseconds to wait before automatically downloading the study data.
contactEmailstringThe email address that used during the study if a participant clicks contact.
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.
helpTextPath?stringThe path to the help text file. This is displayed when a participant clicks help. Markdown is supported.
logoPathstringThe path to the logo image. This is displayed on the landing page and the header.
numSequences?numberThe number of sequences to generate for the study. This is used to generate the random sequences for the study. The default is 1000.
sidebarbooleanControls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question.
sidebarWidth?numberThe width of the left sidebar. Defaults to 300.
studyEndMsg?stringThe message to display when the study ends.
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.
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 second
withProgressBarbooleanControls whether the progress bar is rendered in the study.