Skip to content

Study configurator/study variables#19

Merged
phev8 merged 4 commits intomainfrom
study-configurator/study-variables
Oct 14, 2025
Merged

Study configurator/study variables#19
phev8 merged 4 commits intomainfrom
study-configurator/study-variables

Conversation

@phev8
Copy link
Copy Markdown
Contributor

@phev8 phev8 commented Oct 14, 2025

Summary by CodeRabbit

  • Documentation
    • Added Study Configurator metadata for navigation.
    • Introduced a comprehensive "Study Variables" guide: types (string, number, boolean, date), create/edit/delete flows, UI workflow with screenshots, configuration options (labels, descriptions, priorities, constraints), examples (flags, categories, thresholds), and usage contexts (server-side rules/actions, client-side survey conditions) with preview states.

phev8 added 2 commits October 14, 2025 14:10
- Introduced meta.json for the Study Configurator with title and description.
- Created study-variables.mdx to document study variables, their management, and use cases.
- Added images for study variables configuration and management.
- Clarified the role of study variables in providing dynamic global behavior.
- Expanded the "Using Study Variables" section to include specific applications for study rules and survey conditions.
- Added notes on expressions and actions related to study variables.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 14, 2025

Walkthrough

Adds a new Study Configurator docs section: a metadata file (meta.json) and an MDX page (study-variables.mdx) that defines study variables, types (String, Number, Boolean, Date), UI workflows for create/edit/delete, examples, and usage contexts (server/client).

Changes

Cohort / File(s) Summary
Study Configurator docs
content/docs/study-configurator/meta.json, content/docs/study-configurator/study-variables.mdx
Adds metadata for the Study Configurator (title, description, root) and a comprehensive MDX documentation page describing study variables (structure, supported types, UI creation/edit/delete flows, examples, and usage points).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

Hop, hop, I pen the notes,
Keys and values, tiny motes.
Flags and dates in rows aligned,
Configs neat, for minds to find.
A carrot cheer for docs well-timed 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title merely duplicates the section path without clarifying what change is being made, making it unclear whether the PR adds, updates, or modifies study configurator content; it fails to summarize the primary addition of metadata and MDX documentation for study variables. Please rewrite the title to clearly summarize the change, for example “Add metadata and MDX documentation for Study Configurator’s variables” or “Document Study Variables in the Study Configurator.”
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch study-configurator/study-variables

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bff832d and 1587354.

📒 Files selected for processing (1)
  • content/docs/study-configurator/study-variables.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
content/docs/study-configurator/study-variables.mdx

[grammar] ~6-~6: There might be a mistake here.
Context: ...rom 'fumadocs-ui/components/image-zoom'; import { Step, Steps } from 'fumadocs-ui...

(QB_NEW_EN)


[grammar] ~9-~9: There might be a mistake here.
Context: ...g from './images/variable-config-1.png'; import studyVariablesConfig2Img from './...

(QB_NEW_EN)


[grammar] ~15-~15: There might be a mistake here.
Context: ...hange the study rules or questionnaires. While "participant flags" provide a way ...

(QB_NEW_EN)


[grammar] ~16-~16: Use a hyphen to join words.
Context: ...e way to control dynamic “global” (study specific) behavior. A study variable ha...

(QB_NEW_EN_HYPHEN)


[grammar] ~18-~18: There might be a mistake here.
Context: ...in the study), a value and a value type. The value type can be one of the followi...

(QB_NEW_EN)


[grammar] ~19-~19: There might be a mistake here.
Context: ... value type can be one of the following: - String - Number (integer or float) - Boo...

(QB_NEW_EN)


[grammar] ~20-~20: There might be a mistake here.
Context: ...pe can be one of the following: - String - Number (integer or float) - Boolean - Da...

(QB_NEW_EN)


[grammar] ~21-~21: There might be a mistake here.
Context: ...ng: - String - Number (integer or float) - Boolean - Date Each study can have its ...

(QB_NEW_EN)


[grammar] ~22-~22: There might be a mistake here.
Context: ...ng - Number (integer or float) - Boolean - Date Each study can have its own set of...

(QB_NEW_EN)


[grammar] ~31-~31: Ensure spelling is correct
Context: ...ropdown to change the study flow (e.g., phase1 -> phase2, with different behavior for ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~31-~31: Ensure spelling is correct
Context: ... change the study flow (e.g., phase1 -> phase2, with different behavior for each phase...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~104-~104: There might be a mistake here.
Context: ..., a datepicker or a text / number input. - To edit the "configuration" of a study v...

(QB_NEW_EN)


[grammar] ~105-~105: There might be a mistake here.
Context: ...e's card, and select "Edit configs". - To delete a study variable, use the thre...

(QB_NEW_EN)


[grammar] ~114-~114: There might be a mistake here.
Context: ...les can be used in the following places: - Study rules / study actions (server-si...

(QB_NEW_EN)


[grammar] ~118-~118: There might be a mistake here.
Context: ...vailable study expressions: (todo: link) - Survey conditions (client-side): -...

(QB_NEW_EN)


[grammar] ~123-~123: There might be a mistake here.
Context: ...vailable if the application supports it.

(QB_NEW_EN)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (7)
content/docs/study-configurator/study-variables.mdx (7)

15-17: Tighten wording and fix hyphenation/consistency.

Small grammar/consistency nits (optional):

  • Use American English consistently (“individualized” vs “individualised”).
  • Hyphenate “cohort‑specific” and avoid the spaced slash.
-While the "participant flags" provide a way for individualised logic, study variables provide a simple way for dynamic "global" (study/ cohort specific) behavior.
+While "participant flags" provide a way for individualized logic, study variables provide a simple way to control dynamic “global” (study‑ or cohort‑specific) behavior.

25-27: Fix agreement and clarity.

Improve subject–verb agreement and clarity:

-Studies can have its own set of study variables. The study administrator can manage (create, edit value or configuration, delete) study variables.
+Each study can have its own set of study variables. The study administrator can manage them (create, edit value or configuration, delete).

63-64: Value type list consistency (optional).

For consistency, either capitalize all types or format as code literals:

-Select the value type of the study variable. (string, integer, float, boolean, date)
+Select the value type of the study variable (String, Integer, Float, Boolean, Date).

Or:

-Select the value type of the study variable. (string, integer, float, boolean, date)
+Select the value type of the study variable (`string`, `integer`, `float`, `boolean`, `date`).

90-91: Hyphenate “Type‑specific”.

-Type specific configuration for the study variable, depending on the value type. For example, for numbers and dates you can define a minimum and maximum value. For strings, you can define if a select with options should be used or if a text input should be used.
+Type‑specific configuration for the study variable, depending on the value type. For example, for numbers and dates you can define minimum and maximum values. For strings, you can choose between a select with options or a text input.

118-121: Replace TODOs with links or tracking issue.

The placeholders “(todo: link)” should be resolved or tracked.

I can add the correct links or insert a reference to a tracking issue if links aren’t ready yet.


18-24: Minor list polish (optional).

Consider making type names consistent and concise:

-- String
-- Number, more specifically: integer or float
-- Boolean
-- Date
+- String
+- Number (integer or float)
+- Boolean
+- Date

112-117: Scope clarity (optional).

Earlier you mention “study/ cohort‑specific.” Consider briefly clarifying scoping here (e.g., whether variables can be defined at study level, cohort level, and precedence rules when both exist).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a782e32 and bff832d.

⛔ Files ignored due to path filters (4)
  • content/docs/study-configurator/images/study-variables-empty.png is excluded by !**/*.png
  • content/docs/study-configurator/images/study-variables-with-entries.png is excluded by !**/*.png
  • content/docs/study-configurator/images/variable-config-1.png is excluded by !**/*.png
  • content/docs/study-configurator/images/variable-config-2.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • content/docs/study-configurator/meta.json (1 hunks)
  • content/docs/study-configurator/study-variables.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
content/docs/study-configurator/study-variables.mdx

[grammar] ~6-~6: There might be a mistake here.
Context: ...rom 'fumadocs-ui/components/image-zoom'; import { Step, Steps } from 'fumadocs-ui...

(QB_NEW_EN)


[grammar] ~9-~9: There might be a mistake here.
Context: ...g from './images/variable-config-1.png'; import studyVariablesConfig2Img from './...

(QB_NEW_EN)


[grammar] ~15-~15: There might be a mistake here.
Context: ...hange the study rules or questionnaires. While the "participant flags" provide a ...

(QB_NEW_EN)


[grammar] ~16-~16: Use a hyphen to join words.
Context: ... way for dynamic "global" (study/ cohort specific) behavior. A study variable ha...

(QB_NEW_EN_HYPHEN)


[grammar] ~18-~18: There might be a mistake here.
Context: ...in the study), a value and a value type. The value type can be one of the followi...

(QB_NEW_EN)


[grammar] ~19-~19: There might be a mistake here.
Context: ... value type can be one of the following: - String - Number, more specifically: inte...

(QB_NEW_EN)


[grammar] ~20-~20: There might be a mistake here.
Context: ...pe can be one of the following: - String - Number, more specifically: integer or fl...

(QB_NEW_EN)


[grammar] ~21-~21: There might be a mistake here.
Context: ...ber, more specifically: integer or float - Boolean - Date Studies can have its own...

(QB_NEW_EN)


[grammar] ~22-~22: There might be a mistake here.
Context: ...specifically: integer or float - Boolean - Date Studies can have its own set of st...

(QB_NEW_EN)


[grammar] ~31-~31: Ensure spelling is correct
Context: ...ropdown to change the study flow (e.g., phase1 -> phase2, with different behavior for ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~31-~31: Ensure spelling is correct
Context: ... change the study flow (e.g., phase1 -> phase2, with different behavior for each phase...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~104-~104: There might be a mistake here.
Context: ..., a datepicker or a text / number input. - To edit the "configuration" of a study v...

(QB_NEW_EN)


[grammar] ~105-~105: There might be a mistake here.
Context: ...e's card, and select "Edit configs". - To delete a study variable, use the thre...

(QB_NEW_EN)


[grammar] ~114-~114: There might be a mistake here.
Context: ...les can be used in the following places: - Study rules / study actions (server-si...

(QB_NEW_EN)


[grammar] ~118-~118: There might be a mistake here.
Context: ...vailable study expressions: (todo: link) - Survey conditions (client-side): -...

(QB_NEW_EN)


[grammar] ~123-~123: There might be a mistake here.
Context: ...vailable if the application supports it.

(QB_NEW_EN)

🔇 Additional comments (1)
content/docs/study-configurator/meta.json (1)

1-5: Confirm single-root usage for this section.

"root": true can conflict if multiple pages in the same section declare root. Please verify only one root exists under content/docs/study-configurator or the site’s docs root config.

Comment thread content/docs/study-configurator/study-variables.mdx
Comment thread content/docs/study-configurator/study-variables.mdx
phev8 added 2 commits October 14, 2025 14:34
- Updated description to specify "study specific" behavior instead of "study/cohort specific."
- Corrected image caption to accurately reflect the content of the displayed example.
- Enhanced descriptions for better readability and understanding of study variables.
- Updated terminology for consistency and precision, including value type formatting.
- Clarified management capabilities of study variables for administrators.
@phev8 phev8 merged commit e95ed43 into main Oct 14, 2025
1 check passed
This was referenced Oct 16, 2025
@phev8 phev8 deleted the study-configurator/study-variables branch October 21, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant