Skip to content

Commit fad248a

Browse files
committed
Sync survey YAML with Qualtrics updates
1 parent 2d76d56 commit fad248a

5 files changed

Lines changed: 28 additions & 56 deletions

File tree

packages/survey/scripts/qualtrics.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,18 @@ export interface QuestionSignature {
402402
answers: string[]
403403
}
404404

405+
function stableStringify(value: unknown): string {
406+
if (Array.isArray(value)) return `[${value.map(stableStringify).join(',')}]`
407+
if (value && typeof value === 'object') {
408+
const obj = value as Record<string, unknown>
409+
return `{${Object.keys(obj)
410+
.sort()
411+
.map((k) => `${JSON.stringify(k)}:${stableStringify(obj[k])}`)
412+
.join(',')}}`
413+
}
414+
return JSON.stringify(value)
415+
}
416+
405417
interface QuestionLike {
406418
QuestionType?: string
407419
Selector?: string
@@ -426,7 +438,7 @@ export function questionSignature(q: QuestionLike): QuestionSignature {
426438
dataExportTag: q.DataExportTag ?? '',
427439
text: stripTags(q.QuestionText ?? ''),
428440
forceResponse: q.Validation?.Settings?.ForceResponse ?? '',
429-
validation: JSON.stringify(q.Validation?.Settings ?? {}),
441+
validation: stableStringify(q.Validation?.Settings ?? {}),
430442
choices: choiceOrder.map((k) => {
431443
const c = q.Choices?.[k]
432444
const logic = displayLogicSignature(c?.DisplayLogic)

questions/education-career/WorkExp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
question:
33
id: WorkExp
44
version: '2026.1'
5-
title: How many years have you been working professionally in total? Please round to the nearest whole number, excluding any decimal points.
5+
title: How many years have you been working professionally in total? Please round to the nearest whole number, excluding any decimal points.&nbsp; If you have no professional work experience, you can leave this question unanswered.
66
type: free_text
77
required: false
88
lines: single

questions/knowledge/KnowledgeA.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
question:
33
id: KnowledgeA
44
version: '2026.1'
5-
title: In a typical week, how much time do you spend looking for information you need to do your work? Please provide a whole number representing hours per week, rounding up to the nearest whole number if needed.
5+
title: In a typical week, how much time do you spend looking for information you need to do your work?&nbsp; Please provide a whole number representing hours per week, rounding up to the nearest whole number if needed.
66
type: free_text
77
required: false
88
lines: single

questions/survey.yaml

Lines changed: 11 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -202,62 +202,22 @@ flow:
202202
- block: Technology
203203
pages:
204204
- [TechDropDown]
205-
- if:
206-
TechDropDown:
207-
- programming_language
208-
then:
209-
- [Languages]
210-
- [CodeTest]
211-
- if:
212-
TechDropDown:
213-
- database
214-
then:
215-
- [Databases]
216-
- if:
217-
TechDropDown:
218-
- cloud_platform
219-
then:
220-
- [CloudPlat]
221-
- if:
222-
TechDropDown:
223-
- web_technologies
224-
then:
225-
- [WebFramework]
226-
- if:
227-
TechDropDown:
228-
- development_environment
229-
then:
230-
- [DevIDE]
231-
- if:
232-
TechDropDown:
233-
- community_platform
234-
then:
235-
- [CommPlat]
205+
- [Languages]
206+
- [CodeTest]
207+
- [Databases]
208+
- [CloudPlat]
209+
- [WebFramework]
210+
- [DevIDE]
211+
- [CommPlat]
236212
- if:
237213
selected_answer:
238214
question: CommPlat
239215
then:
240216
- [CommPlatAddl]
241-
- if:
242-
TechDropDown:
243-
- llm
244-
then:
245-
- [LLM]
246-
- if:
247-
TechDropDown:
248-
- knowledge_management
249-
then:
250-
- [KnowMgmt]
251-
- if:
252-
TechDropDown:
253-
- enterprise_search
254-
then:
255-
- [EntSearch]
256-
- if:
257-
TechDropDown:
258-
- security_software
259-
then:
260-
- [SecOps]
217+
- [LLM]
218+
- [KnowMgmt]
219+
- [EntSearch]
220+
- [SecOps]
261221
- [BuildTool]
262222
- if:
263223
BuildTool:

questions/technology/TechDropDown.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
question:
33
id: TechDropDown
44
version: '2026.1'
5-
title: In the last 12 months, has your role at work, school, or in personal projects intersected with any of the following types of work involving technology? Consider what you used in each context. If you had more than one role in a context, refer to all roles within that setting that you held in the last 12 months. Select all that apply.
5+
title: In the last 12 months, has your role at work, school, or in personal projects intersected with any of the following types of settings involving technology? We are going to ask you about to ask you about tools you used within each setting next. Select all that apply.
66
type: multi_select
77
required: false
88
options:
9-
- label: I used a programming, scripting, or markup language to create something visual, in software/hardware, or for data
9+
- label: I used a programming, scripting, or markup language for any reason
1010
key: programming_language
1111
- label: I used a database for storage, querying, deployment
1212
key: database

0 commit comments

Comments
 (0)