Study variables tutorial#21
Conversation
WalkthroughUpdated and expanded documentation: wording and formatting edits on the Study Variables page, plus added study-variable get/update entries (boolean, string, integer, float, date) and anchors across Study Rules and Survey Editor conditions pages. No code or behavior changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🪛 LanguageToolcontent/docs/study-configurator/study-variables.mdx[grammar] ~21-~21: There might be a mistake here. (QB_NEW_EN) [grammar] ~24-~24: There might be a mistake here. (QB_NEW_EN) [grammar] ~127-~127: There might be a mistake here. (QB_NEW_EN) 🔇 Additional comments (4)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
content/docs/study-configurator/study-variables.mdx (1)
22-22: Use a hyphen in "study-specific" for consistency.Line 22 uses "study specific" without a hyphen; this compound adjective should be hyphenated as "study-specific" for grammatical correctness. This improves consistency with other compound descriptors in the documentation.
Apply this diff to fix the hyphenation:
- While "participant flags" provide a way for individualized logic, study variables provide a simple way to control dynamic "global" (study specific) behavior. + While "participant flags" provide a way for individualized logic, study variables provide a simple way to control dynamic "global" (study-specific) behavior.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
content/docs/study-configurator/study-variables.mdx(5 hunks)content/docs/study-rules-editor/basics/study-rules.mdx(5 hunks)content/docs/survey-editor/basics/conditions.mdx(3 hunks)
🧰 Additional context used
🪛 LanguageTool
content/docs/survey-editor/basics/conditions.mdx
[grammar] ~140-~140: There might be a mistake here.
Context: ...ges only if a variable has been defined. Dis...
(QB_NEW_EN)
[grammar] ~330-~330: There might be a mistake here.
Context: ...e value of a study variable as a string. * Use Case: Use to compare or display te...
(QB_NEW_EN)
[grammar] ~341-~341: There might be a mistake here.
Context: ...ogic based on study-level configuration. Dis...
(QB_NEW_EN)
[grammar] ~351-~351: There might be a mistake here.
Context: ... or thresholds involving decimal values. Dis...
(QB_NEW_EN)
content/docs/study-rules-editor/basics/study-rules.mdx
[grammar] ~83-~83: There might be a mistake here.
Context: ... eligibility, or activating study flows. * How it works: Provide the variable key...
(QB_NEW_EN)
[grammar] ~88-~88: There might be a mistake here.
Context: ...dy phases, or other string-based values. * How it works: Provide the variable key...
(QB_NEW_EN)
[grammar] ~95-~95: There might be a mistake here.
Context: ...de has been assigned to the participant. * Use case: Use when actions should only...
(QB_NEW_EN)
[grammar] ~103-~103: There might be a mistake here.
Context: ...dy phases, or other string-based values. * How it works: Provide the variable key...
(QB_NEW_EN)
[grammar] ~109-~109: There might be a mistake here.
Context: ...onse includes one of the specified keys. * Use case: Use when multiple acceptable...
(QB_NEW_EN)
[grammar] ~116-~116: There might be a mistake here.
Context: ... certain answers should be filtered out. * How it works: Provide the item key and...
(QB_NEW_EN)
[grammar] ~128-~128: There might be a mistake here.
Context: ...ecise matching of responses is required. * How it works: Provide the item and slo...
(QB_NEW_EN)
[grammar] ~133-~133: There might be a mistake here.
Context: ...er surveys meet the specified condition. * Use case: Use when rules should evalua...
(QB_NEW_EN)
[grammar] ~134-~134: There might be a mistake here.
Context: ...for example to detect repeated patterns. * How it works: The condition checks sto...
(QB_NEW_EN)
[grammar] ~139-~139: There might be a mistake here.
Context: ...if the participant has provided consent. * Use case: Use when study actions must ...
(QB_NEW_EN)
[grammar] ~280-~280: There might be a mistake here.
Context: ...it counts, thresholds, or scoring logic. * How it works: Provide the variable key...
(QB_NEW_EN)
[grammar] ~285-~285: There might be a mistake here.
Context: ... such as weight, dosage, or percentages. * How it works: Provide the variable key...
(QB_NEW_EN)
[grammar] ~446-~446: There might be a mistake here.
Context: ...tudy flow, or other string-based values. * How it works: Provide the variable key...
(QB_NEW_EN)
[grammar] ~584-~584: There might be a mistake here.
Context: ...hold of maximal participants is reached. * How it works: Select the variable key ...
(QB_NEW_EN)
[grammar] ~589-~589: There might be a mistake here.
Context: ... a threshold of participants is reached. * How it works: Select the variable key ...
(QB_NEW_EN)
[grammar] ~594-~594: There might be a mistake here.
Context: ...holds for triggering study-wide actions. * How it works: Select the variable key ...
(QB_NEW_EN)
[grammar] ~598-~598: There might be a mistake here.
Context: ... a study variable with a decimal number. * Use Case: Use to track study-wide calc...
(QB_NEW_EN)
[grammar] ~604-~604: There might be a mistake here.
Context: ...efined participant threshold is reached. * How it works: Select the variable key ...
(QB_NEW_EN)
content/docs/study-configurator/study-variables.mdx
[grammar] ~21-~21: There might be a mistake here.
Context: ...hange the study rules or questionnaires. While "participant flags" provide a way ...
(QB_NEW_EN)
[grammar] ~22-~22: 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] ~24-~24: There might be a mistake here.
Context: ...tudy), a value and a value type. The value type can be one of the followi...
(QB_NEW_EN)
[grammar] ~127-~127: There might be a mistake here.
Context: ...ch, a datepicker or a text/number input. - To edit the "configuration" of a study v...
(QB_NEW_EN)
🔇 Additional comments (7)
content/docs/survey-editor/basics/conditions.mdx (2)
122-155: Study variables section in boolean/key checks is well-structured.The new "Study variables" section (lines 122–155) introduces three conditions: Study variable string equals, Study variable key exists, and Get study variable as boolean. The structure, examples, and descriptions are clear and consistent with surrounding sections.
325-365: Anchor naming is consistent and intentional—no action needed.The script results confirm that anchor naming follows a deliberate, consistent pattern:
survey-editor/basics/conditions.mdxusessurvey-*-study-variablesprefix for all anchorsstudy-rules-editor/basics/study-rules.mdxusesstudy-*-study-variablesprefix for all anchorsThe distinction aligns with the documentation's purpose: survey-prefixed anchors document client-side survey conditions, while study-prefixed anchors document server-side study rules configuration. No naming conflicts or inconsistencies exist between the two files.
content/docs/study-rules-editor/basics/study-rules.mdx (4)
78-90: New study variables section in Logical Expressions is well-positioned.The addition of the "Study variables" section with Get study variable as boolean and Study variable string equals is appropriately placed after "Event Properties" and before "Advanced." The structure and descriptions are clear and follow the established documentation pattern.
275-291: Study variables section for numeric/date types is comprehensive.The addition of three subsections—Get study variable as integer, Get study variable as float, and Get study variable as date (POSIX seconds)—provides complete coverage of numeric and temporal study variable operations. Each entry follows the established pattern with clear use cases and implementation guidance.
441-447: New string study variables section is consistent with numeric/date sections.The introduction of Get study variable as string (lines 441–447) completes the type coverage (boolean, integer, float, date, string) for study variable operations. The structure and description align with previous sections and maintain consistent formatting.
581-605: Update study variables section comprehensively covers all types.The new "General Study Actions" subsection (lines 581–605) introduces five Update study variable actions for boolean, string, integer, float, and date types. This provides complete coverage for modifying study variables of any supported type. The descriptions, use cases, and implementation guidance are clear and follow established patterns.
content/docs/study-configurator/study-variables.mdx (1)
140-141: All anchor links are properly defined. ✓The four anchor IDs referenced in lines 140–141 of study-variables.mdx are correctly defined in study-rules.mdx:
#study-bool-study-variables(line 78)#study-int-study-variables(line 275)#study-string-study-variables(line 441)#study-update-study-variables(line 581)No issues found. The documentation links are valid.
Summary by CodeRabbit